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 serhiy.storchaka
Recipients brett.cannon, chris.jerdonek, eric.araujo, eric.snow, jaraco, jayyin11043, ncoghlan, ncohen, python-dev, serhiy.storchaka
Date 2022-03-26.10:58:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1648292288.79.0.154358335971.issue32642@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2022-03-26 10:58:09serhiy.storchakasetrecipients: + serhiy.storchaka, brett.cannon, jaraco, ncoghlan, eric.araujo, chris.jerdonek, python-dev, eric.snow, jayyin11043, ncohen
2022-03-26 10:58:08serhiy.storchakasetmessageid: <1648292288.79.0.154358335971.issue32642@roundup.psfhosted.org>
2022-03-26 10:58:08serhiy.storchakalinkissue32642 messages
2022-03-26 10:58:08serhiy.storchakacreate