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 vstinner
Recipients corona10, ronaldoussoren, serhiy.storchaka, vstinner
Date 2021-01-19.16:15:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> BTW. A list of stdlib module names is not sufficient to determine if a module is in the stdlib, thanks to .pth files it is possible to have entries on sys.path before the stdlib.

Yeah, I wrote it in my first message. I solved this issue with documentation:

"Note: If a third party module has the same name than a standard library module and it comes before the standard library in sys.path, it overrides the standard library module on import."

I updated sys.module_names documentation in my PR.

IMO it's an acceptable limitation.
Date User Action Args
2021-01-19 16:15:13vstinnersetrecipients: + vstinner, ronaldoussoren, serhiy.storchaka, corona10
2021-01-19 16:15:13vstinnersetmessageid: <>
2021-01-19 16:15:13vstinnerlinkissue42955 messages
2021-01-19 16:15:13vstinnercreate