Skip to content

Conversation

@vstinner
Copy link
Member

@vstinnervstinner commented Jun 9, 2023

When Python is built in debug mode (Py_REF_DEBUG macro), Py_INCREF() and Py_DECREF() of the limited C API 3.9 (and older) now call Py_IncRef() and Py_DecRef(), since _Py_IncRef() and _Py_DecRef() were added to Python 3.10.

When Python is built in debug mode (Py_REF_DEBUG macro), Py_INCREF() and Py_DECREF() of the limited C API 3.9 (and older) now call Py_IncRef() and Py_DecRef(), since _Py_IncRef() and _Py_DecRef() were added to Python 3.10.
@vstinnervstinnerforce-pushed the fix_limited_incref branch from 7a6df6f to c0ade7aCompareJune 9, 2023 09:04
@vstinnervstinner enabled auto-merge (squash) June 9, 2023 09:06
@vstinnervstinner merged commit 7ba0fd9 into python:mainJun 9, 2023
@miss-islington
Copy link
Contributor

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

@bedevere-bot
Copy link

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

@bedevere-botbedevere-bot removed the needs backport to 3.12 only security fixes label Jun 9, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 9, 2023
When Python is built in debug mode (Py_REF_DEBUG macro), Py_INCREF() and Py_DECREF() of the limited C API 3.9 (and older) now call Py_IncRef() and Py_DecRef(), since _Py_IncRef() and _Py_DecRef() were added to Python 3.10. (cherry picked from commit 7ba0fd9) Co-authored-by: Victor Stinner <vstinner@python.org>
@vstinnervstinner deleted the fix_limited_incref branch June 9, 2023 09:34
vstinner added a commit to vstinner/cpython that referenced this pull request Jun 9, 2023
When Python is built in debug mode (Py_REF_DEBUG macro), Py_INCREF() and Py_DECREF() of the limited C API 3.9 (and older) now call Py_IncRef() and Py_DecRef(), since _Py_IncRef() and _Py_DecRef() were added to Python 3.10. (cherry picked from commit 7ba0fd9)
vstinner added a commit that referenced this pull request Jun 9, 2023
* gh-102304: Fix Py_INCREF() for limited C API 3.9 (#105550) When Python is built in debug mode (Py_REF_DEBUG macro), Py_INCREF() and Py_DECREF() of the limited C API 3.9 (and older) now call Py_IncRef() and Py_DecRef(), since _Py_IncRef() and _Py_DecRef() were added to Python 3.10. (cherry picked from commit 7ba0fd9) * gh-102304: Remove Py_INCREF() doc change (#105552) Py_INCREF() was made compatible again with Python 3.9 and older in the limited API of Python debug mode. (cherry picked from commit 58e4b69)
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@vstinner@miss-islington@bedevere-bot