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.

classification
Title: Drop the "list_frozen" command from _test_embed.
Type: Stage: resolved
Components: Demos and Tools Versions: Python 3.11
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: corona10, eric.snow, vstinner
Priority: normal Keywords: patch

Created on 2021-09-13 23:22 by eric.snow, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 30273 merged corona10, 2021-12-27 13:20
Messages (5)
msg401741 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2021-09-13 23:22
In Programs/_test_embed.c the "list_frozen" command prints out the name of each frozen module (defined in Python/frozen.c).  The only place this is used is in Tools/scripts/generate_stdlib_module_names.py (in list_frozen()).  That script can be updated to call imp._get_frozen_module_names(), which was added in PR GH-28319 for bpo-45019.  Then _test_embed can go back to being used strictly for tests.

(FWIW, the script could also read from Python/frozen_modules/MANIFEST after running "make regen-frozen".  That file was added in GH-27980).
msg401761 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-09-14 06:46
imp._get_frozen_module_names() doesn't exist. I cannot see it in GH-28319. Moreover, the imp module is now deprecated. If something is added, it should be added to the private _imp module.
msg401806 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2021-09-14 23:55
Yeah, sorry, I got the PRs mixed up.  I added it in https://github.com/python/cpython/pull/28320.

_imp._get_frozen_module_names() should work just fine.
msg401816 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-09-15 08:23
I found a new _imp._frozen_module_names() function:

$ ./python 
Python 3.11.0a0 (heads/main:1afc7b3219, Sep 15 2021, 10:22:28) [GCC >>> import _imp; _imp._frozen_module_names()
['_frozen_importlib', '_frozen_importlib_external', 'zipimport']
msg409246 - (view) Author: Dong-hee Na (corona10) * (Python committer) Date: 2021-12-28 02:06
New changeset 196b53eb1e62871ca80dee180e4891b4dd5c52ac by Dong-hee Na in branch 'main':
bpo-45189: Drop the "list_frozen" command from _test_embed. (GH-30273)
https://github.com/python/cpython/commit/196b53eb1e62871ca80dee180e4891b4dd5c52ac
History
Date User Action Args
2022-04-11 14:59:49adminsetgithub: 89352
2021-12-28 02:06:02corona10setmessages: + msg409246
2021-12-28 02:06:01corona10setstatus: open -> closed
stage: patch review -> resolved
2021-12-27 13:20:19corona10setkeywords: + patch
nosy: + corona10

pull_requests: + pull_request28488
stage: needs patch -> patch review
2021-09-15 08:23:50vstinnersetmessages: + msg401816
2021-09-14 23:55:07eric.snowsetmessages: + msg401806
2021-09-14 06:46:00vstinnersetmessages: + msg401761
2021-09-13 23:22:53eric.snowcreate