New submission from Chris Jerdonek <chris.jerdo...@gmail.com>: This issue is to suggest enhancing sys.path to recognize path-like objects, per PEP 519.
I recently ran into an issue where a path was getting added to sys.path, but the corresponding imports weren't working as they should, even though sys.path showed the path as being present. Eventually I tracked this down to the path being a pathlib.Path object rather than a string. This wasn't obvious because Path objects appear as strings in normal debug output, etc. The sys.path docs currently say this: > Only strings and bytes should be added to sys.path; all other data types are > ignored during import. ---------- components: Library (Lib) messages: 310560 nosy: brett.cannon, chris.jerdonek priority: normal severity: normal status: open title: add support for path-like objects in sys.path type: enhancement versions: Python 3.7 _______________________________________ 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