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

[3.12] gh-102304: Fix Py_INCREF() stable ABI in debug mode (#104763) by vstinner · Pull Request #105352 · python/cpython · GitHub

Repository navigation

[3.12] gh-102304: Fix Py_INCREF() stable ABI in debug mode (#104763) - #105352

Merged
vstinner merged 1 commit into
python:3.12from
vstinner:incref_debug312
Jun 6, 2023
Merged

vstinner merged 1 commit into
python:3.12from
vstinner:incref_debug312

Conversation

vstinner commented Jun 6, 2023 •
edited by github-actions Bot
Loading

Copy link
Copy Markdown
Member

When Python is built in debug mode (if the Py_REF_DEBUG macro is defined), the Py_INCREF() and Py_DECREF() function are now always implemented as opaque functions to avoid leaking implementation details like the "_Py_RefTotal" variable or the
_Py_DecRefTotal_DO_NOT_USE_THIS() function.

  • Remove _Py_IncRefTotal_DO_NOT_USE_THIS() and _Py_DecRefTotal_DO_NOT_USE_THIS() from the stable ABI.
  • Remove _Py_NegativeRefcount() from limited C API.

(cherry picked from commit 92022d8)


📚 Documentation preview 📚: https://cpython-previews--105352.org.readthedocs.build/

vstinner commented Jun 6, 2023

Copy link
Copy Markdown
Member Author

Oh. If this change is merged, Doc/whatsnew/3.13.rst must be updated in the main branch: the build change happens in Python 3.12, not 3.13.

vstinner commented Jun 6, 2023

Copy link
Copy Markdown
Member Author

PR #105347 doc change should be merged first.

)

When Python is built in debug mode (if the Py_REF_DEBUG macro is
defined), the Py_INCREF() and Py_DECREF() function are now always
implemented as opaque functions to avoid leaking implementation
details like the "_Py_RefTotal" variable or the
_Py_DecRefTotal_DO_NOT_USE_THIS() function.

* Remove _Py_IncRefTotal_DO_NOT_USE_THIS() and
  _Py_DecRefTotal_DO_NOT_USE_THIS() from the stable ABI.
* Remove _Py_NegativeRefcount() from limited C API.

(cherry picked from commit 92022d8)
vstinner merged commit 2bbb557 into python:3.12 Jun 6, 2023
vstinner deleted the incref_debug312 branch June 6, 2023 14:22
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL