cpython icon indicating copy to clipboard operation
cpython copied to clipboard

socket.bind(Path(...)) does not work

Open socketpair opened this issue 1 year ago • 0 comments

s = socket(AF_UNIX, SOCK_DGRAM)
s.bind(Path('/tmp/qwe3333'))

gives:

TypeError: a bytes-like object is required, not 'PosixPath'

According to some PEP all path-related functions should accept Path.

socketpair avatar Nov 10 '22 21:11 socketpair