Title: Freezing modules has manual steps but could be automated.
Type: enhancement Stage: resolved
Components: Build Versions: Python 3.11
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: eric.snow Nosy List: brett.cannon, eric.snow, gvanrossum, lukasz.langa, xtreak
Priority: normal Keywords: patch

Created on 2021-08-26 19:06 by eric.snow, last changed 2021-09-15 20:15 by eric.snow. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 27980 merged eric.snow, 2021-08-26 19:13
PR 28125 merged lukasz.langa, 2021-09-02 14:49
PR 28319 merged eric.snow, 2021-09-13 21:26
PR 28362 merged eric.snow, 2021-09-15 17:58
PR 28374 merged eric.snow, 2021-09-15 19:34
Messages (9)
msg400369 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2021-08-26 19:06
Currently we freeze the 3 main import-related modules, as well as one module for testing.  Adding more modules or otherwise making any adjustments requires manually editing several files (frozen.c,, ...).  Those files aren't particularly obvious and it's easy to miss one.  So it would be helpful to have a tool that generates the necessary lines in the relevant files, to avoid manual editing.

I'll be putting up a PR shortly.
msg400676 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2021-08-30 23:25
New changeset 044e8d866fdde3804bdb2282c7d23a8074de8f6f by Eric Snow in branch 'main':
bpo-45019: Add a tool to generate list of modules to include for frozen modules (gh-27980)
msg400677 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2021-08-31 00:09
Is this ready to close?
msg400679 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2021-08-31 00:44
I'm just waiting for the buildbots to finish.
msg401738 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2021-09-13 22:18
New changeset a2d8c4b81b8e68e2ffe10945f7ca69174c14e52a by Eric Snow in branch 'main':
bpo-45019: Do some cleanup related to frozen modules. (gh-28319)
msg401838 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2021-09-15 13:50
The PR 28319 seems to have introduced a new deprecation warning in tests : 

0:00:13 load avg: 2.82 [ 98/427] test_ctypes passed
Hello world!
/home/karthikeyan/stuff/python/cpython/Lib/ctypes/test/ DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
  import imp
msg401861 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2021-09-15 17:25
On Wed, Sep 15, 2021 at 7:51 AM Karthikeyan Singaravelan
<> wrote:
> The PR 28319 seems to have introduced a new deprecation warning in tests :

I'll fix that.
msg401894 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2021-09-15 19:33
New changeset 4b30aaa0c9dc4da956199dbd48af9c06089cb271 by Eric Snow in branch 'main':
bpo-45019: Silence a warning in test_ctypes. (gh-28362)
msg401901 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2021-09-15 20:15
New changeset 3814e2036d96e2b6c69afce61926bb0a2a34d2d9 by Eric Snow in branch 'main':
bpo-45019: Clean up the frozen __hello__ module. (gh-28374)
Date User Action Args
2021-09-15 20:15:44eric.snowsetmessages: + msg401901
2021-09-15 19:34:08eric.snowsetpull_requests: + pull_request26788
2021-09-15 19:33:09eric.snowsetmessages: + msg401894
2021-09-15 17:58:28eric.snowsetpull_requests: + pull_request26776
2021-09-15 17:25:57eric.snowsetmessages: + msg401861
2021-09-15 13:50:40xtreaksetnosy: + xtreak
messages: + msg401838
2021-09-13 22:18:45eric.snowsetmessages: + msg401738
2021-09-13 21:26:02eric.snowsetpull_requests: + pull_request26728
2021-09-02 14:49:48lukasz.langasetnosy: + lukasz.langa

pull_requests: + pull_request26565
2021-08-31 14:07:12eric.snowsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2021-08-31 00:44:22eric.snowsetmessages: + msg400679
2021-08-31 00:09:45gvanrossumsetmessages: + msg400677
2021-08-30 23:25:20eric.snowsetmessages: + msg400676
2021-08-26 19:13:44eric.snowsetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request26428
2021-08-26 19:06:19eric.snowcreate