[issue43445] Add frozen modules to sys.stdlib_module_names

2021-03-10 Thread STINNER Victor


STINNER Victor  added the comment:

Neal: you may also read the thread on python-dev:
https://mail.python.org/archives/list/python-...@python.org/thread/BTX7SH2CR66QCLER2EXAK2GOUAH2U4CL/

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43445] Add frozen modules to sys.stdlib_module_names

2021-03-10 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 307745aa42196ad3fd97fee4a1ae6496bb895596 by Victor Stinner in 
branch 'master':
bpo-43445: Add frozen modules to sys.stdlib_module_names (GH-24798)
https://github.com/python/cpython/commit/307745aa42196ad3fd97fee4a1ae6496bb895596


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43445] Add frozen modules to sys.stdlib_module_names

2021-03-09 Thread STINNER Victor


STINNER Victor  added the comment:

> The list of available stdlib modules could change after compiling Python.

It's documented:
"[ sys.stdlib_module_names] is the same on all platforms. Modules which are not 
available on some platforms and modules disabled at Python build are also 
listed."
https://docs.python.org/dev/library/sys.html#sys.stdlib_module_names

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43445] Add frozen modules to sys.stdlib_module_names

2021-03-09 Thread STINNER Victor


STINNER Victor  added the comment:

Neil Schemenauer: "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."

For the rationale behind sys.stdlib_module_names, please see the bpo-42955 
where alternative were discussed.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43445] Add frozen modules to sys.stdlib_module_names

2021-03-09 Thread Neil Schemenauer


Neil Schemenauer  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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43445] Add frozen modules to sys.stdlib_module_names

2021-03-09 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +23566
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/24798

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43445] Add frozen modules to sys.stdlib_module_names

2021-03-09 Thread STINNER Victor


New submission from STINNER Victor :

The sys.stdlib_module_names documentation says: "All module kinds are listed: 
pure Python, built-in, frozen and extension modules. Test modules are excluded."
https://docs.python.org/dev/library/sys.html#sys.stdlib_module_names

But I just noticed that frozen modules are not listed!

Attached PR fix this issue.

--
components: Library (Lib)
messages: 388345
nosy: vstinner
priority: normal
severity: normal
status: open
title: Add frozen modules to sys.stdlib_module_names
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com