Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
I think you are trying to solve a wrong problem. > This wasn't obvious because Path objects appear as strings in normal debug > output, etc. How is it? >>> pathlib.Path('/usr/lib') PosixPath('/usr/lib') >>> [pathlib.Path('/usr/lib')] [PosixPath('/usr/lib')] I think the problem is with the debug output. Always use repr() for it, otherwise you will trick yourself. > but the corresponding imports weren't working as they should It would be easier to catch if it was never working with non-string. I think we should deprecate any non-string elements in sys.path. As I shown above some code only works correctly with strings anyway. ---------- _______________________________________ 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