bpo-45019: Add a tool to generate list of modules to include for frozen modules by ericsnowcurrently · Pull Request #27980 · python/cpython

Conversation

@ericsnowcurrently

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

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

@ericsnowcurrently

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').)

@brettcannon brettcannon 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 modules

Aug 27, 2021

gvanrossum

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.

gvanrossum

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!

gvanrossum

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

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.