[issue43445] Add frozen modules to sys.stdlib_module_names

Neil Schemenauer report at bugs.python.org
Tue Mar 9 14:13:03 EST 2021


Neil Schemenauer <nas-python at arctrix.com> added the comment:

Not sure the proper place to discuss this but I wonder if putting this stdlib module names list in the executable is the best idea.  The list of available stdlib modules could change after compiling Python.  I understand you don't want to dynamically crawl the library path the build the list.  That's too slow.  However, is there a really strong reason to embed it in the Python executable?

Did you consider generating a .py module, containing the list.  E.g. "_stdlib_modules.py" inside the lib folder.  Then, you can have site.py or some similar startup logic import that module and assign it to sys.stdlib_module_names.

----------
nosy: +nascheme

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43445>
_______________________________________


More information about the Python-bugs-list mailing list