8000 gh-117398: Add datetime Module State by ericsnowcurrently · Pull Request #119810 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-117398: Add datetime Module State #119810

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8463ae8
Use the static types directly.
ericsnowcurrently May 28, 2024
ead0083
Use the UTC singleton directly.
ericsnowcurrently May 28, 2024
4c52d5d
Add module state.
ericsnowcurrently May 27, 2024
6b291c8
Clear the module state when destroying the module.
ericsnowcurrently May 28, 2024
69c7e1f
Create PyDateTime_IsoCalendarDateType in init_state().
ericsnowcurrently May 29, 2024
36dbeea
Track the "current" module in the internal per-interpreter dict.
ericsnowcurrently May 29, 2024
d0c0b2d
Copy the "current" module state, if available.
ericsnowcurrently May 29, 2024
0599dd6
Make state usage explicit.
ericsnowcurrently May 29, 2024
1f1f6fc
Reduce churn.
ericsnowcurrently May 29, 2024
d44d6e9
Drop _datetime_global_state.
ericsnowcurrently May 29, 2024
a309474
Drop datetime_state.initialized.
ericsnowcurrently May 29, 2024
ede4415
Fix refleaks.
ericsnowcurrently May 30, 2024
5a8b1aa
Clear the "current" module when finalizing the module.
ericsnowcurrently May 30, 2024
3de1cd3
Use a weakref when tracking the "current" module.
ericsnowcurrently May 30, 2024
62b3d5e
Fix clear_current_module().
ericsnowcurrently May 30, 2024
5c25927
Give each module its own heap types.
ericsnowcurrently May 31, 2024
da24674
Consolidate into init_state().
ericsnowcurrently May 31, 2024
f8420ea
Use _Py_ID() for INTERP_KEY.
ericsnowcurrently May 31, 2024
2a2c0b1
Handle PyWeakref_GetRef() returning None.
ericsnowcurrently May 31, 2024
c519e3c
Fix refleak.
ericsnowcurrently May 31, 2024
05acc56
Make sure the module exists in static type methods.
ericsnowcurrently May 31, 2024
07e3b65
Don't bother making the module temporary.
ericsnowcurrently May 31, 2024
dc4b458
Add a comment about the macros.
ericsnowcurrently Jun 3, 2024
3c55035
Simplify GET_CURRENT_STATE().
ericsnowcurrently Jun 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Include/internal/pycore_global_objects_fini_generated.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Include/internal/pycore_global_strings.h
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ struct _Py_global_strings {
STRUCT_FOR_ID(c_call)
STRUCT_FOR_ID(c_exception)
STRUCT_FOR_ID(c_return)
STRUCT_FOR_ID(cached_datetime_module)
STRUCT_FOR_ID(cached_statements)
STRUCT_FOR_ID(cadata)
STRUCT_FOR_ID(cafile)
Expand Down
1 change: 1 addition & 0 deletions Include/internal/pycore_runtime_init_generated.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Include/internal/pycore_unicodeobject_generated.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading
0