-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
Lazy loading conflicts with modules overriding ModuleType #117182
Labels
Comments
effigies
added a commit
to effigies/cpython
that referenced
this issue
Mar 23, 2024
effigies
added a commit
to effigies/cpython
that referenced
this issue
Mar 23, 2024
effigies
added a commit
to effigies/cpython
that referenced
this issue
Mar 29, 2024
effigies
added a commit
to effigies/cpython
that referenced
this issue
Mar 29, 2024
FFY00
pushed a commit
that referenced
this issue
Apr 9, 2024
diegorusso
pushed a commit
to diegorusso/cpython
that referenced
this issue
Apr 17, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Bug description:
Discovered while working on #117178.
PEP 726 notes that the existing way for a module to override default methods is:
If I want to load this module lazily, I can use this MRE (adapted from #117178):
This currently (with the fix in #117179) produces:
Making the following change:
Results in:
If instead we change to:
We get:
I believe making this change is the best way to respect the intentions of the module writer.
I've tagged this as a bug because these things have not worked together, but it might be more of a feature for them to start to, as neither is exactly standard practice.
CPython versions tested on:
3.11, 3.13, CPython main branch
Operating systems tested on:
Linux
Linked PRs
The text was updated successfully, but these errors were encountered: