FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.13] gh-120782: Update internal type cache when reloading datetime (GH-120829) by neonene · Pull Request #120855 · python/cpython · GitHub

/ cpython Public

[3.13] gh-120782: Update internal type cache when reloading datetime (GH-120829) - #120855

Merged
kumaraditya303 merged 7 commits into
python:3.13from
neonene:reload313
Jul 3, 2024
Merged

[3.13] gh-120782: Update internal type cache when reloading datetime (GH-120829)#120855
kumaraditya303 merged 7 commits into
python:3.13from
neonene:reload313

Conversation

neonene commented Jun 21, 2024
edited
Loading

Copy link
Copy Markdown
Contributor

When reloading _datetime module, the single-phase version did not invoke the PyInit__datetime function, whereas the current multi-phase version updates the static types through the module init. The outdated static type cache in the interpreter state needs to be invalidated at the end of reloading the multi-phase module.

This PR is a manual backport of a81d434, adding assert statements to the test case.
This also backports e6076d1 (gh-120180) manually.

When reloading _datetime module, the single-phase version did not invoke the PyInit__datetime function, whereas the current multi-phase version updates the static types through the module init. The outdated static type cache in the interpreter state needs to be invalidated at the end of reloading the multi-phase module.

neonene commented Jun 21, 2024

Copy link
Copy Markdown
Contributor Author

neonene commented Jun 22, 2024
edited
Loading

Copy link
Copy Markdown
Contributor Author

@ericsnowcurrently I backported e6076d1 as well. (I can take back the change: 09ec032)

kumaraditya303 merged commit 2c3aa52 into python:3.13 Jul 3, 2024

neonene commented Jul 3, 2024

Copy link
Copy Markdown
Contributor Author

Thanks.

neonene deleted the reload313 branch July 3, 2024 12:34

Copy link
Copy Markdown
Contributor

This backport appears to have broken the iOS buildbot. I’m AFK for the next week; I’ll take a look when I’m back at my desk.

neonene commented Jul 10, 2024

Copy link
Copy Markdown
Contributor Author

This backport appears to have broken the iOS buildbot.

#121561 should be effective for fixing it.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL