This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2018-11-13.11:49:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1542109754.28.0.788709270274.issue35229@psf.upfronthosting.co.za>
In-reply-to
Content
The _PyObject_GC_TRACK() and _PyObject_GC_UNTRACK() macros are documented:

* https://docs.python.org/dev/c-api/gcsupport.html#c._PyObject_GC_TRACK
* https://docs.python.org/dev/c-api/gcsupport.html#c._PyObject_GC_UNTRACK

The documentation says "It should not be used for extension modules."

These macros have been broken in Python 3.7 by Eric Snow's work on moving internal APIs to Include/internal/: _PyObject_GC_TRACK() access _PyRuntime.gc.generation0, whereas accessing _PyRuntime requires to include Include/internal/pycore_pystate.h (header previously called Include/internal/pystate.h in Python 3.7) which is not installed by "make install".

My PR 10507 moved these macros to Include/internal/ to clarify that they must not be used outside CPython internals.

I suggest to deprecate them in Python 3.6: just add a note in Python 3.6 and 3.7 documentation.
History
Date User Action Args
2018-11-13 11:49:14vstinnersetrecipients: + vstinner
2018-11-13 11:49:14vstinnersetmessageid: <1542109754.28.0.788709270274.issue35229@psf.upfronthosting.co.za>
2018-11-13 11:49:14vstinnerlinkissue35229 messages
2018-11-13 11:49:14vstinnercreate