-
-
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
Importing module with capsule attribute fails in sub interpreter #112100
Comments
@ericsnowcurrently this is one of the issues I've found trying to run Django inside a sub interpreter |
This is the specific line that's failing. https://github.com/python/cpython/blob/main/Modules/_zoneinfo.c#L2717 The There is no check for whether the datetime module has been imported and is initialised. |
I'm not sure, but it's probably related to the fact that |
|
Yep, looking at that PR and the related changes it would probably cause the behaviour I'm seeing in this test |
@tonybaloney, could you verify if this is still a problem in 3.13? |
Just confirmed this test case was fixed since 3.13b1 (tested 3.13b3) |
Hey! To clarify, was this backported to a patch version in 3.12? I assume not - just checking |
This wasn't backported because there was no fix 🙂 But if you're talking about datetime isolation, it wasn't backported to 3.12. |
Bug report
Bug description:
When importing certain modules (
zoneinfo
is an example), attributes are missing when inside a sub interpreter.Importing these modules works inside the main interpreter.
I've written a test to demonstrate the bug
I haven't seen this behaviour on any other modules, the thing that seemed special with
datetime
and this attribute is that it is a PyCapsule. So the issue is likely related to that?CPython versions tested on:
3.13, CPython main branch
Operating systems tested on:
macOS
Linked PRs
The text was updated successfully, but these errors were encountered: