Skip to content

Commit

Permalink
Fix trio.socket.SocketType.bind to work with PathLike arguments again
Browse files Browse the repository at this point in the history
  • Loading branch information
regnarg committed Jul 31, 2024
1 parent 20f9291 commit 555eb5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/trio/_socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ async def _resolve_address_nocp(
)
elif hasattr(_stdlib_socket, "AF_UNIX") and family == _stdlib_socket.AF_UNIX:
# unwrap path-likes
assert isinstance(address, (str, bytes))
assert isinstance(address, (str, bytes, os.PathLike))
return os.fspath(address)
else:
return address
Expand Down

0 comments on commit 555eb5f

Please sign in to comment.