Skip to content
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

gh-102304: Fix 2 New Stable ABI Functions #104762

Merged
merged 7 commits into from
May 30, 2023

Conversation

ericsnowcurrently
Copy link
Member

@ericsnowcurrently ericsnowcurrently commented May 22, 2023

@Yhg1s
Copy link
Member

Yhg1s commented May 22, 2023

I expect you'll want to backport this to 3.12?

@ericsnowcurrently ericsnowcurrently added the needs backport to 3.12 bug and security fixes label May 22, 2023
@ericsnowcurrently ericsnowcurrently enabled auto-merge (squash) May 22, 2023 22:19
@vstinner
Copy link
Member

A different fix is to always implement Py_INCREF() and Py_DECREF() as opaque function calls when Py_DEBUG macro is defined. It may be safer in terms of stable ABI, no?

Misc/stable_abi.toml Show resolved Hide resolved
Misc/stable_abi.toml Show resolved Hide resolved
ericsnowcurrently and others added 3 commits May 22, 2023 16:27
Co-authored-by: T. Wouters <thomas@python.org>
Co-authored-by: T. Wouters <thomas@python.org>
@vstinner
Copy link
Member

A different fix is to always implement Py_INCREF() and Py_DECREF() as opaque function calls when Py_DEBUG macro is defined. It may be safer in terms of stable ABI, no?

I created PR #104763 to implement this idea.

@ericsnowcurrently ericsnowcurrently requested a review from a team as a code owner May 30, 2023 22:15
@ericsnowcurrently ericsnowcurrently merged commit 26e7bbf into python:main May 30, 2023
@miss-islington
Copy link
Contributor

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

@miss-islington
Copy link
Contributor

Sorry, @ericsnowcurrently, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 26e7bbf66e93ee7c94b6e007ec7b2d769c2ced92 3.12

@ericsnowcurrently
Copy link
Member Author

Hmm, I had not meant to merge this before checking with @vstinner about gh-104763. I'm not sure how that happened accidentally. 😟

That said, I was already leaning toward merging this and then letting gh-104763 roll it back if applicable. The most important thing for me is that we get the per-interpreter reftotal working for 3.12+. So I'll go ahead with the backport at this point.

@bedevere-bot
Copy link

GH-105123 is a backport of this pull request to the 3.12 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.12 bug and security fixes label May 30, 2023
@ericsnowcurrently ericsnowcurrently deleted the fix-stable-abi branch May 30, 2023 23:53
@vstinner
Copy link
Member

I'm not convinced that _DO_NOT_USE_THIS suffix is really needed. We have tons of private functions with _Py prefix that must not be called. If people use them, they are already on their own. For me, this long _DO_NOT_USE_THIS suffix is just a burden, for example if you have to manually type the full name in a debugger or a profiler to look for them.

@ericsnowcurrently
Copy link
Member Author

I'm fine with changing the name, but I'd rather gh-104763 make it irrelevant. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants