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: Exclude marshalled-frozen data if deep-freezing to save 300 KB space
Type: Stage: resolved
Components: Build Versions: Python 3.11
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: eric.snow, gvanrossum, kumaraditya, miss-islington, vstinner
Priority: normal Keywords: patch

Created on 2022-02-02 09:08 by kumaraditya, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 31074 merged kumaraditya, 2022-02-02 09:08
PR 31131 merged kumaraditya, 2022-02-04 18:24
Messages (4)
msg412346 - (view) Author: Kumar Aditya (kumaraditya) * (Python triager) Date: 2022-02-02 09:08
This reduces the size of the data segment by 300 KB of the executable because if the modules are deep-frozen then the marshalled frozen data just wastes space. This was inspired by comment by @gvanrossum in #29118 (comment). Note: There is a new option `--deepfreeze-only` in freeze_modules.py to change this behavior, it is on be default to save disk space.

# du -s ./python before
27892   ./python
# du -s ./python after
27524   ./python
msg412521 - (view) Author: miss-islington (miss-islington) Date: 2022-02-04 17:57
New changeset bf95ff91f2c1fc5a57190491f9ccdc63458b089e by Kumar Aditya in branch 'main':
bpo-46608: exclude marshalled-frozen data if deep-freezing to save 300 KB space  (GH-31074)
https://github.com/python/cpython/commit/bf95ff91f2c1fc5a57190491f9ccdc63458b089e
msg412578 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2022-02-05 15:59
New changeset 9d4161a60ca8b470148ffd6c73e3110a0aa6d66f by Kumar Aditya in branch 'main':
bpo-46608: Fix argument parsing in freeze_modules.py (GH-31131)
https://github.com/python/cpython/commit/9d4161a60ca8b470148ffd6c73e3110a0aa6d66f
msg414122 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2022-02-26 23:27
https://docs.python.org/dev/whatsnew/3.11.html#c-api-changes documents the addition of the "is_package" member to the _frozen structure, but it doesn't mention the new "get_code" member. Can it be also documented?
History
Date User Action Args
2022-04-11 14:59:55adminsetgithub: 90766
2022-02-26 23:27:26vstinnersetnosy: + vstinner
messages: + msg414122
2022-02-10 14:11:41kumaradityasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2022-02-05 15:59:57gvanrossumsetmessages: + msg412578
2022-02-04 18:24:42kumaradityasetpull_requests: + pull_request29310
2022-02-04 17:57:12miss-islingtonsetnosy: + miss-islington
messages: + msg412521
2022-02-02 16:40:06gvanrossumsetnosy: + eric.snow
2022-02-02 09:08:50kumaradityasetkeywords: + patch
stage: patch review
pull_requests: + pull_request29259
2022-02-02 09:08:27kumaradityacreate