This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author njs
Recipients brett.cannon, njs
Date 2018-01-16.02:23:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1516069397.77.0.467229070634.issue32562@psf.upfronthosting.co.za>
In-reply-to
Content
In 3.6, trying to connect to a AF_UNIX socket using a pathlib.Path object doesn't work:

Python 3.6.4 (default, Dec 27 2017, 13:02:49) 
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket, pathlib
>>> s = socket.socket(family=socket.AF_UNIX)
>>> s.connect(pathlib.Path("asdf"))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: a bytes-like object is required, not 'PosixPath'

It would be good to fix this to use the fspath protocol.
History
Date User Action Args
2018-01-16 02:23:17njssetrecipients: + njs, brett.cannon
2018-01-16 02:23:17njssetmessageid: <1516069397.77.0.467229070634.issue32562@psf.upfronthosting.co.za>
2018-01-16 02:23:17njslinkissue32562 messages
2018-01-16 02:23:16njscreate