| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:0085a8f3-4453-2027-7eb3-b741b9f05932 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C8DA:2E7615:142011:1A0E9C:696B35CB |
| html-safe-nonce | 07d83b298959e7dead825a2572fa06104850135b956b0d3d2991946bc1b04e7f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOERBOjJFNzYxNToxNDIwMTE6MUEwRTlDOjY5NkIzNUNCIiwidmlzaXRvcl9pZCI6IjQwNzc2NzM2NjY2Mjk1NDc0NjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | fa2661c9eb9e744d5c354d66c108b0feb9ab26d8eebbe12deaafb892db7de509 |
| hovercard-subject-tag | pull_request:1545468524 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | ///pull_requests/show/files |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/110475/files |
| twitter:image | https://avatars.githubusercontent.com/u/13780613?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/13780613?s=400&v=4 |
| og:image:alt | Establish global state
Put singletons in global state
Issue: gh-71587 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| Skip to content | https://github.com/python/cpython/pull/110475/files#start-of-content |
|
| https://github.com/ |
|
Sign in
| https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F110475%2Ffiles |
| GitHub CopilotWrite better code with AI | https://github.com/features/copilot |
| GitHub SparkBuild and deploy intelligent apps | https://github.com/features/spark |
| GitHub ModelsManage and compare prompts | https://github.com/features/models |
| MCP RegistryNewIntegrate external tools | https://github.com/mcp |
| ActionsAutomate any workflow | https://github.com/features/actions |
| CodespacesInstant dev environments | https://github.com/features/codespaces |
| IssuesPlan and track work | https://github.com/features/issues |
| Code ReviewManage code changes | https://github.com/features/code-review |
| GitHub Advanced SecurityFind and fix vulnerabilities | https://github.com/security/advanced-security |
| Code securitySecure your code as you build | https://github.com/security/advanced-security/code-security |
| Secret protectionStop leaks before they start | https://github.com/security/advanced-security/secret-protection |
| Why GitHub | https://github.com/why-github |
| Documentation | https://docs.github.com |
| Blog | https://github.blog |
| Changelog | https://github.blog/changelog |
| Marketplace | https://github.com/marketplace |
| View all features | https://github.com/features |
| Enterprises | https://github.com/enterprise |
| Small and medium teams | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| App Modernization | https://github.com/solutions/use-case/app-modernization |
| DevSecOps | https://github.com/solutions/use-case/devsecops |
| DevOps | https://github.com/solutions/use-case/devops |
| CI/CD | https://github.com/solutions/use-case/ci-cd |
| View all use cases | https://github.com/solutions/use-case |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| View all industries | https://github.com/solutions/industry |
| View all solutions | https://github.com/solutions |
| AI | https://github.com/resources/articles?topic=ai |
| Software Development | https://github.com/resources/articles?topic=software-development |
| DevOps | https://github.com/resources/articles?topic=devops |
| Security | https://github.com/resources/articles?topic=security |
| View all topics | https://github.com/resources/articles |
| Customer stories | https://github.com/customer-stories |
| Events & webinars | https://github.com/resources/events |
| Ebooks & reports | https://github.com/resources/whitepapers |
| Business insights | https://github.com/solutions/executive-insights |
| GitHub Skills | https://skills.github.com |
| Documentation | https://docs.github.com |
| Customer support | https://support.github.com |
| Community forum | https://github.com/orgs/community/discussions |
| Trust center | https://github.com/trust-center |
| Partners | https://github.com/partners |
| GitHub SponsorsFund open source developers | https://github.com/sponsors |
| Security Lab | https://securitylab.github.com |
| Maintainer Community | https://maintainers.github.com |
| Accelerator | https://github.com/accelerator |
| Archive Program | https://archiveprogram.github.com |
| Topics | https://github.com/topics |
| Trending | https://github.com/trending |
| Collections | https://github.com/collections |
| Enterprise platformAI-powered developer platform | https://github.com/enterprise |
| GitHub Advanced SecurityEnterprise-grade security features | https://github.com/security/advanced-security |
| Copilot for BusinessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/premium-support |
| Pricing | https://github.com/pricing |
| Search syntax tips | https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax |
| documentation | https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax |
|
Sign in
| https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F110475%2Ffiles |
|
Sign up
| https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython |
| Reload | https://github.com/python/cpython/pull/110475/files |
| Reload | https://github.com/python/cpython/pull/110475/files |
| Reload | https://github.com/python/cpython/pull/110475/files |
|
python
| https://github.com/python |
| cpython | https://github.com/python/cpython |
| Please reload this page | https://github.com/python/cpython/pull/110475/files |
|
Notifications
| https://github.com/login?return_to=%2Fpython%2Fcpython |
|
Fork
33.9k
| https://github.com/login?return_to=%2Fpython%2Fcpython |
|
Star
71.1k
| https://github.com/login?return_to=%2Fpython%2Fcpython |
|
Code
| https://github.com/python/cpython |
|
Issues
5k+
| https://github.com/python/cpython/issues |
|
Pull requests
2.1k
| https://github.com/python/cpython/pulls |
|
Actions
| https://github.com/python/cpython/actions |
|
Projects
31
| https://github.com/python/cpython/projects |
|
Security
Uh oh!
There was an error while loading. Please reload this page.
| https://github.com/python/cpython/security |
| Please reload this page | https://github.com/python/cpython/pull/110475/files |
|
Insights
| https://github.com/python/cpython/pulse |
|
Code
| https://github.com/python/cpython |
|
Issues
| https://github.com/python/cpython/issues |
|
Pull requests
| https://github.com/python/cpython/pulls |
|
Actions
| https://github.com/python/cpython/actions |
|
Projects
| https://github.com/python/cpython/projects |
|
Security
| https://github.com/python/cpython/security |
|
Insights
| https://github.com/python/cpython/pulse |
| Sign up for GitHub
| https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose |
| terms of service | https://docs.github.com/terms |
| privacy statement | https://docs.github.com/privacy |
| Sign in | https://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose |
| erlend-aasland | https://github.com/erlend-aasland |
| python:main | https://github.com/python/cpython/tree/main |
| erlend-aasland:isolate-datetime/part1-establish-global-state | https://github.com/erlend-aasland/cpython/tree/isolate-datetime/part1-establish-global-state |
|
Conversation
38
| https://github.com/python/cpython/pull/110475 |
|
Commits
21
| https://github.com/python/cpython/pull/110475/commits |
|
Checks
0
| https://github.com/python/cpython/pull/110475/checks |
|
Files changed
| https://github.com/python/cpython/pull/110475/files |
| Please reload this page | https://github.com/python/cpython/pull/110475/files |
|
gh-71587: Establish global state in _datetime
| https://github.com/python/cpython/pull/110475/files#top |
|
Show all changes
21 commits
| https://github.com/python/cpython/pull/110475/files |
|
cacf1e8
Consistency: use explicit initialiser for m_base
erlend-aasland Feb 15, 2023
| https://github.com/python/cpython/pull/110475/commits/cacf1e84f7dd5091159bc6d96dde52c5cc587c2c |
|
c2eba8f
Add module state stub; establish global state on stack
erlend-aasland Feb 15, 2023
| https://github.com/python/cpython/pull/110475/commits/c2eba8fcf2be2ae0ca228baa6092c284fda2acfa |
|
8d54ecd
Put conversion factors in state struct
erlend-aasland Feb 15, 2023
| https://github.com/python/cpython/pull/110475/commits/8d54ecdc4e71e6f7dcfbb0ee3d5aa9cbc729453a |
|
360397a
Move PyDateTime_TimeZone_UTC to state
erlend-aasland Feb 15, 2023
| https://github.com/python/cpython/pull/110475/commits/360397a30f4f77abe01b4233fe88006f6d2b13b1 |
|
4f509f9
Move PyDateTime_Epoch to state struct
erlend-aasland Feb 15, 2023
| https://github.com/python/cpython/pull/110475/commits/4f509f9fa586991db27a7d831ed9d552851c7f6d |
|
6b14c8c
Remove datetime_strptime globals entry
erlend-aasland Feb 15, 2023
| https://github.com/python/cpython/pull/110475/commits/6b14c8cac3bae3217e30fde5efd49d3e5fcb2cf0 |
|
2eb3315
Apply Victor's suggestions from gh-102995
erlend-aasland Oct 6, 2023
| https://github.com/python/cpython/pull/110475/commits/2eb3315327f6d1de711fb8bc8309eb8ec236afeb |
|
f5ede1e
Apply PEP-7 to modified code
erlend-aasland Oct 6, 2023
| https://github.com/python/cpython/pull/110475/commits/f5ede1e9bb477c1618dbb6b16c3a02982c77afc4 |
|
f6ac875
Merge branch 'main' into isolate-datetime/part1-establish-global-state
erlend-aasland Oct 6, 2023
| https://github.com/python/cpython/pull/110475/commits/f6ac875cb302e90a58c921c3450891b4ba4f7149 |
|
7139569
Fix check-c-globals
erlend-aasland Oct 6, 2023
| https://github.com/python/cpython/pull/110475/commits/713956903195bb798b0c3f58a5d103cb83f173be |
|
26e6454
Merge PR updates
erlend-aasland Oct 6, 2023
| https://github.com/python/cpython/pull/110475/commits/26e6454b42c8f2fce1361840eafb65d81bf08d9b |
|
227dd2c
Pull in main
erlend-aasland Oct 10, 2023
| https://github.com/python/cpython/pull/110475/commits/227dd2c442c984899105a7136303b76c8e05732a |
|
beb0977
Address review: use shorter names
erlend-aasland Oct 10, 2023
| https://github.com/python/cpython/pull/110475/commits/beb0977b0e1924f2eaa784fd5efd81b9b2136be2 |
|
8525be6
Pull in main
erlend-aasland Oct 11, 2023
| https://github.com/python/cpython/pull/110475/commits/8525be670cb410802c1a8d6da109e95360c8519e |
|
6863f76
Address review: rename global_state => _datetime_global_state
erlend-aasland Oct 11, 2023
| https://github.com/python/cpython/pull/110475/commits/6863f763c07909fa3e921e933d2ed68091b603a6 |
|
0738205
Pull in main
erlend-aasland Oct 11, 2023
| https://github.com/python/cpython/pull/110475/commits/0738205d3fadf45b3c835e02614a0cd9fb10bbbf |
|
c56b5e1
Address review
erlend-aasland Oct 11, 2023
| https://github.com/python/cpython/pull/110475/commits/c56b5e1fa7673705a1806abb8779058f1deca5e2 |
|
3ee48d2
Fix ref leak in init
erlend-aasland Oct 11, 2023
| https://github.com/python/cpython/pull/110475/commits/3ee48d295e8a36cd8f241b38b02dcff3e8c789bb |
|
0a1d770
Pull in main
erlend-aasland Oct 11, 2023
| https://github.com/python/cpython/pull/110475/commits/0a1d770d9e390aeb01e63b90d2b645b2c7db44a9 |
|
a9e8d1a
Clean up initialisation
erlend-aasland Oct 11, 2023
| https://github.com/python/cpython/pull/110475/commits/a9e8d1ab544add7db66e85f31e9dfe9afd736474 |
|
c3ba7fe
Preserve comment
erlend-aasland Oct 11, 2023
| https://github.com/python/cpython/pull/110475/commits/c3ba7fec5b5fa5d46d0af8f99a5ffd421d01de65 |
|
Clear filters
| https://github.com/python/cpython/pull/110475/files |
| Please reload this page | https://github.com/python/cpython/pull/110475/files |
| Please reload this page | https://github.com/python/cpython/pull/110475/files |
|
_datetimemodule.c
| https://github.com/python/cpython/pull/110475/files#diff-3ee250e3806e884518fd872e9148baf532de6ec54c1cdb4e7679fbb2869d9c47 |
|
globals-to-fix.tsv
| https://github.com/python/cpython/pull/110475/files#diff-8d1e9a0d5771dfc3a628047509e2d4a1027327bd89392e5a3ec5fbd3d08cfa19 |
| Please reload this page | https://github.com/python/cpython/pull/110475/files |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |