Jason R. Coombs <jar...@jaraco.com> added the comment:
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. ---------- nosy: +jaraco _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32642> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com