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 jaraco
Recipients brett.cannon, chris.jerdonek, eric.araujo, eric.snow, jaraco, jayyin11043, ncoghlan, python-dev, yan12125
Date 2022-03-12.20:54:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1647118448.51.0.529666326139.issue32642@roundup.psfhosted.org>
In-reply-to
Content
I'm in support of adding Path support for sys.path, but I also agree with Eric, there are innumerable consumers of sys.path beyond importlib. and since pathlib.Path isn't a str, it would likely introduce incompatibility. On the other hand, users introducing Path objects to sys.path could be warned that although importlib supports Path objects, other consumers may not, and that support for it in importlib isn't endorsement of the use of those types and the consequences aren't necessarily supported.

As an aside, it's too bad a Path object couldn't have been a str subclass (as it is for [path](https://pypi.org/project/path), which would have made problems like this one much safer to solve.
History
Date User Action Args
2022-03-12 20:54:08jaracosetrecipients: + jaraco, brett.cannon, ncoghlan, eric.araujo, chris.jerdonek, python-dev, eric.snow, yan12125, jayyin11043
2022-03-12 20:54:08jaracosetmessageid: <1647118448.51.0.529666326139.issue32642@roundup.psfhosted.org>
2022-03-12 20:54:08jaracolinkissue32642 messages
2022-03-12 20:54:08jaracocreate