New submission from Nathaniel Smith <n...@pobox.com>: 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. ---------- messages: 310034 nosy: brett.cannon, njs priority: normal severity: normal status: open title: Support fspath protocol in AF_UNIX sockaddr resolution versions: Python 3.7, Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32562> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com