You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sphinx.errors.SphinxParallelError: sphinx.errors.ExtensionError: Handler <function add_annotations at 0x7af8150d5fd0> for event 'doctree-read' threw an exception (exception: Object type mismatch in limited API annotation for PyObject_New: 'function' != 'macro')
I documented PyObject_New() as a function in stable_abi.toml ([function.PyObject_New]) to fix to fix Doctest, but it doesn't work as expected.
Problem: macros declared as functions by stable_abi.toml are checked by Lib/test/test_stable_abi_ctypes.py which fails since they are macros and not functions...
sphinx.errors.SphinxParallelError: sphinx.errors.ExtensionError: Handler <function add_annotations at 0x7353c3fd9fd0> for event 'doctree-read' threw an exception (exception: Object type mismatch in limited API annotation for PyImport_ImportModuleEx: 'macro' != 'function')
Could you limit this PR to the refcounting macros, and keep the issue open for the rest?
I don't think they should all be added at once.
One problem is that this annotates macros as “Part of the stable ABI”:
But, macros are not ABI.
We already have this issue with, for example, Py_BEGIN_ALLOW_THREADS, but there it's at least clear from the prose (or context) that it's a macro. Adding this to things documented as functions would be misleading.
For macros like Py_ULL or PyAPI_DATA, I think it would be better to treat them as exposed by mistake, rather than limited API. For ones like Py_IS_FINITE, we probably need more discussion (or not -- we can leave them in a gray area and focus on other stuff).
For macros like PyBytes_Check, IMO we should document the (approximate) expansion, so wrappers like PyO3 can reimplement them using just the stable ABI.
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Misc/stable_abi.toml#158886