Skip to content

bpo-45019: Add a tool to generate list of modules to include for frozen modules - #27980

Merged
ericsnowcurrently merged 41 commits into
python:mainfrom
ericsnowcurrently:frozen-modules-cleanup
Aug 30, 2021
Merged

bpo-45019: Add a tool to generate list of modules to include for frozen modules#27980
ericsnowcurrently merged 41 commits into
python:mainfrom
ericsnowcurrently:frozen-modules-cleanup

Conversation

@ericsnowcurrently

@ericsnowcurrentlyericsnowcurrently commented Aug 26, 2021

Copy link
Copy Markdown
Member

Frozen modules must be added to several files in order to work properly. Before this change this had to be done manually. Here we add a tool to generate the relevant lines in those files instead. This helps us avoid mistakes and omissions.

https://bugs.python.org/issue45019

@gvanrossum

Copy link
Copy Markdown
Member

Is this ready for review (apart from the failing test)?

@gvanrossum
gvanrossum self-requested a review August 27, 2021 03:45
@ericsnowcurrently

Copy link
Copy Markdown
MemberAuthor

Is this ready for review (apart from the failing test)?

Yes.

(I need to figure out why "make regen-keywords" isn't working for me locally. Something about ModuleNotFoundError('dataclasses').)

@brettcannonbrettcannon changed the title bpo-45019: Add a tool to generate lines for frozen modules.bpo-45019: Add a tool to generate list of modules to include for frozen modulesAug 27, 2021

@gvanrossumgvanrossum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've only gotten to frozen.c, I'll review the rest later. So far this is great, I just have a few nits about outdated comments.

Comment threadPython/frozen.c Outdated
Comment threadPCbuild/readme.txt Outdated
Comment threadPrograms/_freeze_module.c Outdated
Comment threadPrograms/_freeze_module.c Outdated
Comment threadPrograms/_freeze_module.c Outdated
Comment threadPython/frozen.c Outdated
Comment threadPython/frozen.c Outdated

@gvanrossumgvanrossum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's the rest. It's looking much better than the version I used for my "codegen" experiments!

Comment threadPython/frozen_modules/hello.h
Comment threadTools/scripts/freeze_modules.py Outdated
Comment threadTools/scripts/freeze_modules.py Outdated
Comment threadTools/scripts/freeze_modules.py
Comment threadTools/scripts/freeze_modules.py Outdated
Comment threadTools/scripts/update_file.py

@gvanrossumgvanrossum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Do you want any other reviewers? Pablo?

@ericsnowcurrently

Copy link
Copy Markdown
MemberAuthor

This change is focused on cleanup, so other reviewers probably aren't necessary. The next PR (freezing some of the stdlib modules) might deserve more than one.

@ericsnowcurrently
ericsnowcurrently merged commit 044e8d8 into python:mainAug 30, 2021
@ericsnowcurrently
ericsnowcurrently deleted the frozen-modules-cleanup branch August 31, 2021 14:08
ericsnowcurrently added a commit that referenced this pull request Sep 13, 2021
There are a few things I missed in gh-27980. This is a follow-up that will make subsequent PRs cleaner. It includes fixes to tests and tools that reference the frozen modules.
https://bugs.python.org/issue45019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@ericsnowcurrently@gvanrossum@the-knights-who-say-ni@bedevere-bot