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 serhiy.storchaka, vstinner
Date 2021-01-18.13:54:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Use cases for sys.module_names:

* When computing dependencies of a project, ignore modules which are part of the stdlib:

* Trace the execution of third party code, but ignore stdlib, use --ignore-module option of trace:

* When reformatting a Python source file, group imports of stdlib modules. The isort module contains the list of stdlib modules, one list py Python version: which is generated from the online Python documentation.


The isort uses the following script to generate the list of stdlib modules:

The script uses sphinx.ext.intersphinx.fetch_inventory(...)["py:module"]. This API uses objects.inv from the online Python documentation. Example of Python 3.9:

On the "dev" version, lists 211 modules.
Date User Action Args
2021-01-18 13:54:44vstinnersetrecipients: + vstinner, serhiy.storchaka
2021-01-18 13:54:44vstinnersetmessageid: <>
2021-01-18 13:54:44vstinnerlinkissue42955 messages
2021-01-18 13:54:44vstinnercreate