-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
Port zoneinfo module to use module state #99138
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
Comments
I would like to listen to the opinion of the original author @pganssle |
I think I originally planned to do this but it made the implementation a bit more complicated and maybe all the pieces to do it weren't in place / stable yet, and after talking to Eric it seemed like it wasn't time sensitive back then. I don't remember any major show stoppers, just, "This is hard enough, I should spend my effort points on other stuff that matters more." Which isn't to say there aren't show stoppers, just that I don't remember any. I think the big thing to be aware of when doing this is that the weak cache is not for performance, it is guaranteeing specific semantics, detailed in PEP 615. So hopefully it is possible to do this while maintaining the relevant guarantees. |
FWIW, I have a two year old branch (now rebased onto https://github.com/erlend-aasland/cpython/pull/new/isolate-zoneinfo |
I had some time free tonight, so I tried to complete my old branch and created a draft PR (gh-99218). |
* Convert zone info type to heap type and add it to module state * Add global variables to module state
Uh oh!
There was an error while loading. Please reload this page.
Feature or enhancement
Following https://github.com/ericsnowcurrently/multi-core-python/wiki/0-The-Plan we need to convert
_zoneinfo
to use module state.Pitch
Right now there are several global objects:
cpython/Modules/_zoneinfo.c
Lines 23 to 25 in 47ab848
and
cpython/Modules/_zoneinfo.c
Lines 96 to 101 in 47ab848
And one static type definition:
cpython/Modules/_zoneinfo.c
Line 93 in 47ab848
If this is indeed planned to be fixed, I would love to work on it.
The text was updated successfully, but these errors were encountered: