Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PEP 690: Add flexibility to set_eager_imports() #2571

Merged
merged 4 commits into from
May 7, 2022

Conversation

Kronuz
Copy link
Contributor

@Kronuz Kronuz commented May 3, 2022

This adds a callback to the proposed importlib.set_eager_imports().

This adds a callback to the proposed `importlib.set_eager_imports()`.
@Kronuz Kronuz requested a review from warsaw as a code owner May 3, 2022 19:36
pep-0690.rst Outdated Show resolved Hide resolved
@carljm
Copy link
Member

carljm commented May 3, 2022

Looks reasonable to me. In practice the flexibility we've used at Meta is just to use regex matching on the module name, so we could also add direct support for use_eager_imports to take regex patterns. But a callback is certainly the most flexible option.

@CAM-Gerlach CAM-Gerlach changed the title PEP 960: Add flexibility to set_eager_imports() PEP 690: Add flexibility to set_eager_imports() May 3, 2022
Co-authored-by: Carl Meyer <carl@oddbird.net>
Copy link
Member

@CAM-Gerlach CAM-Gerlach left a comment

Choose a reason for hiding this comment

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

LGTM from a PEP editor perspective

pep-0690.rst Outdated Show resolved Hide resolved
pep-0690.rst Outdated Show resolved Hide resolved
Co-authored-by: Carl Meyer <carl@oddbird.net>
@JelleZijlstra
Copy link
Member

I can merge this unless you want Barry to take a look first.

Copy link
Member

@warsaw warsaw left a comment

Choose a reason for hiding this comment

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

Nice!

Sign up for free to 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.

6 participants