Skip to content

gh-126881: fix finalization of dtoa state #126904

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 4 commits into from
Nov 29, 2024
Merged

Conversation

kumaraditya303
Copy link
Contributor

@kumaraditya303 kumaraditya303 commented Nov 16, 2024

@kumaraditya303 kumaraditya303 added interpreter-core (Objects, Python, Grammar, and Parser dirs) needs backport to 3.13 bugs and security fixes labels Nov 16, 2024
@devdanzin
Copy link
Contributor

Would a test be helpful here?

@cfbolz
Copy link
Contributor

cfbolz commented Nov 17, 2024

Would a test be helpful here?

Yeah, I was also wondering this. Probably a bit annoying to write a regression test, but I also feel like it would be good to have one.

@kumaraditya303
Copy link
Contributor Author

Yeah, I was also wondering this. Probably a bit annoying to write a regression test, but I also feel like it would be good to have one.

Regression tests for these don't work well because it relies on GC calling finalizers at late in finalization which isn't reliable, the order or when it will be called is random. As such I avoid adding such tests and manually test these changes.

@kumaraditya303 kumaraditya303 merged commit 762c603 into python:main Nov 29, 2024
45 checks passed
@miss-islington-app
Copy link

Thanks @kumaraditya303 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 29, 2024
(cherry picked from commit 762c603)

Co-authored-by: Kumar Aditya <[email protected]>
@kumaraditya303 kumaraditya303 deleted the dtoa branch November 29, 2024 09:47
@bedevere-app
Copy link

bedevere-app bot commented Nov 29, 2024

GH-127395 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Nov 29, 2024
@vstinner
Copy link
Member

Ah, Python 3.12 doesn't have the _PyDtoa_Fini() function.

vstinner pushed a commit that referenced this pull request Nov 29, 2024
gh-126881: fix finalization of dtoa state (GH-126904)
(cherry picked from commit 762c603)

Co-authored-by: Kumar Aditya <[email protected]>
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request Jan 8, 2025
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants