Skip to content

gh-106320: Remove _PyAnextAwaitable_Type from the public C API #108597

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

Merged
merged 2 commits into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions Include/iterobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ extern "C" {

PyAPI_DATA(PyTypeObject) PySeqIter_Type;
PyAPI_DATA(PyTypeObject) PyCallIter_Type;
#ifdef Py_BUILD_CORE
extern PyTypeObject _PyAnextAwaitable_Type;
#endif

#define PySeqIter_Check(op) Py_IS_TYPE((op), &PySeqIter_Type)

Expand Down
7 changes: 4 additions & 3 deletions Objects/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -2049,11 +2049,12 @@ _PyObject_InitState(PyInterpreterState *interp)
}


extern PyTypeObject _Py_GenericAliasIterType;
extern PyTypeObject _PyMemoryIter_Type;
extern PyTypeObject _PyAnextAwaitable_Type;
extern PyTypeObject _PyLegacyEventHandler_Type;
extern PyTypeObject _PyLineIterator;
extern PyTypeObject _PyMemoryIter_Type;
extern PyTypeObject _PyPositionsIterator;
extern PyTypeObject _PyLegacyEventHandler_Type;
extern PyTypeObject _Py_GenericAliasIterType;

static PyTypeObject* static_types[] = {
// The two most important base types: must be initialized first and
Expand Down
1 change: 0 additions & 1 deletion Tools/c-analyzer/c_parser/preprocessor/gcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ def preprocess(filename,
cwd = os.path.abspath(cwd or '.')
filename = _normpath(filename, cwd)

print(filename)
postargs = POST_ARGS
if os.path.basename(filename) not in USE_LIMITED_C_API:
postargs += ('-DPy_BUILD_CORE=1',)
Expand Down
4 changes: 2 additions & 2 deletions Tools/c-analyzer/cpython/globals-to-fix.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Objects/genobject.c - _PyCoroWrapper_Type -
Objects/interpreteridobject.c - PyInterpreterID_Type -
Objects/iterobject.c - PyCallIter_Type -
Objects/iterobject.c - PySeqIter_Type -
Objects/iterobject.c - _PyAnextAwaitable_Type -
Objects/listobject.c - PyListIter_Type -
Objects/listobject.c - PyListRevIter_Type -
Objects/listobject.c - PyList_Type -
Expand All @@ -70,6 +71,7 @@ Objects/moduleobject.c - PyModule_Type -
Objects/namespaceobject.c - _PyNamespace_Type -
Objects/object.c - _PyNone_Type -
Objects/object.c - _PyNotImplemented_Type -
Objects/object.c - _PyAnextAwaitable_Type -
Objects/odictobject.c - PyODictItems_Type -
Objects/odictobject.c - PyODictIter_Type -
Objects/odictobject.c - PyODictKeys_Type -
Expand Down Expand Up @@ -113,8 +115,6 @@ Objects/codeobject.c - _PyLineIterator -
Objects/codeobject.c - _PyPositionsIterator -
Objects/genericaliasobject.c - _Py_GenericAliasIterType -
# Not in a .h file:
Objects/iterobject.c - _PyAnextAwaitable_Type -
# Not in a .h file:
Objects/memoryobject.c - _PyMemoryIter_Type -
Objects/unicodeobject.c - _PyUnicodeASCIIIter_Type -
Objects/unionobject.c - _PyUnion_Type -
Expand Down