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: Freeze the runpy module.
Type: behavior Stage: resolved
Components: Build Versions: Python 3.11
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: FFY00, christian.heimes, eric.snow, gvanrossum, kumaraditya
Priority: normal Keywords: patch

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

Pull Requests
URL Status Linked Edit
PR 29903 merged kumaraditya, 2021-12-03 11:17
PR 30028 merged christian.heimes, 2021-12-10 13:39
Messages (6)
msg405212 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2021-10-28 18:13
Currently we are freezing the modules that are imported during startup.  However, if someone uses "python -m module" then the runtime imports the runpy module and uses it.  Given that this case is quite common, runpy and its dependencies should be frozen.
msg405235 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2021-10-28 19:26
(See https://bugs.python.org/issue45020#msg402118.)
msg408140 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2021-12-09 16:51
New changeset 44b0e76f2a80c9a78242b7542b8b1218d244af07 by Kumar Aditya in branch 'main':
bpo-45654: Freeze the runpy module and stuff it imports (GH-29903)
https://github.com/python/cpython/commit/44b0e76f2a80c9a78242b7542b8b1218d244af07
msg408142 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2021-12-09 16:55
Thanks Kumar!
msg408210 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2021-12-10 13:42
I noticed that the types module is only used for ModuleType. PR GH-30028 gets rid of 205 kB object code:

   205K  Python/deepfreeze/types.o
msg408235 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2021-12-10 18:09
New changeset 16638a4bdb802ae52d386a39d2dbef14de3fbc92 by Christian Heimes in branch 'main':
bpo-45654: No need to freeze types (GH-30028)
https://github.com/python/cpython/commit/16638a4bdb802ae52d386a39d2dbef14de3fbc92
History
Date User Action Args
2022-04-11 14:59:51adminsetgithub: 89817
2021-12-10 18:09:15christian.heimessetmessages: + msg408235
2021-12-10 13:42:49christian.heimessetmessages: + msg408210
2021-12-10 13:39:45christian.heimessetnosy: + christian.heimes

pull_requests: + pull_request28253
2021-12-09 16:55:11gvanrossumsetstatus: open -> closed
resolution: fixed
messages: + msg408142

stage: patch review -> resolved
2021-12-09 16:51:17gvanrossumsetnosy: + gvanrossum
messages: + msg408140
2021-12-03 11:17:38kumaradityasetkeywords: + patch
nosy: + kumaraditya

pull_requests: + pull_request28127
stage: needs patch -> patch review
2021-10-28 19:26:56eric.snowsetmessages: + msg405235
2021-10-28 18:13:50eric.snowcreate