From fea5a7a4e26f6af191614ad5b86901d1b07c28c1 Mon Sep 17 00:00:00 2001 From: Fidget-Spinner <28750310+Fidget-Spinner@users.noreply.github.com> Date: Mon, 24 May 2021 22:15:20 +0800 Subject: [PATCH 1/6] Export PyStructSequence_UnnamedField --- Include/structseq.h | 2 +- Misc/NEWS.d/next/C API/2021-05-24-22-12-40.bpo-44220.H9CUGl.rst | 2 ++ PC/python3dll.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/C API/2021-05-24-22-12-40.bpo-44220.H9CUGl.rst diff --git a/Include/structseq.h b/Include/structseq.h index 8f51c89163a4e1..e89265a67c322e 100644 --- a/Include/structseq.h +++ b/Include/structseq.h @@ -19,7 +19,7 @@ typedef struct PyStructSequence_Desc { int n_in_sequence; } PyStructSequence_Desc; -extern const char * const PyStructSequence_UnnamedField; +PyAPI_DATA(const char * const) PyStructSequence_UnnamedField; #ifndef Py_LIMITED_API PyAPI_FUNC(void) PyStructSequence_InitType(PyTypeObject *type, diff --git a/Misc/NEWS.d/next/C API/2021-05-24-22-12-40.bpo-44220.H9CUGl.rst b/Misc/NEWS.d/next/C API/2021-05-24-22-12-40.bpo-44220.H9CUGl.rst new file mode 100644 index 00000000000000..ffb4eb6f41c222 --- /dev/null +++ b/Misc/NEWS.d/next/C API/2021-05-24-22-12-40.bpo-44220.H9CUGl.rst @@ -0,0 +1,2 @@ +:c:var:`PyStructSequence_UnnamedField` is now present in ``python3.lib`` and +``python3.dll``. diff --git a/PC/python3dll.c b/PC/python3dll.c index 200d1d14e294d1..ec90e84d8343dd 100755 --- a/PC/python3dll.c +++ b/PC/python3dll.c @@ -841,6 +841,7 @@ EXPORT_DATA(PySeqIter_Type) EXPORT_DATA(PySet_Type) EXPORT_DATA(PySetIter_Type) EXPORT_DATA(PySlice_Type) +EXPORT_DATA(PyStructSequence_UnnamedField) EXPORT_DATA(PySuper_Type) EXPORT_DATA(PyTraceBack_Type) EXPORT_DATA(PyTuple_Type) From 8489db723c299cd2070720dbea72bb15ffd1fa68 Mon Sep 17 00:00:00 2001 From: Fidget-Spinner <28750310+Fidget-Spinner@users.noreply.github.com> Date: Mon, 24 May 2021 22:28:26 +0800 Subject: [PATCH 2/6] Update stable_abi.txt --- Misc/stable_abi.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Misc/stable_abi.txt b/Misc/stable_abi.txt index a78bcb76b41df6..b01b52d8c8a651 100644 --- a/Misc/stable_abi.txt +++ b/Misc/stable_abi.txt @@ -2148,6 +2148,10 @@ function PyGC_Enable function PyGC_IsEnabled added 3.10 +# The following were added in PC/python3.def in Python 3.11: + +data PyStructSequence_UnnamedField + added 3.11 # And also 3.10 # (Detailed comments aren't really needed for further entries: from here on # we can use version control logs.) From 3dbfcf563034c8c9b72cf4208f9431a141eaa520 Mon Sep 17 00:00:00 2001 From: Fidget-Spinner <28750310+Fidget-Spinner@users.noreply.github.com> Date: Mon, 24 May 2021 22:38:43 +0800 Subject: [PATCH 3/6] Update stable_abi.dat --- Doc/data/stable_abi.dat | 1 + 1 file changed, 1 insertion(+) diff --git a/Doc/data/stable_abi.dat b/Doc/data/stable_abi.dat index d582204f5626b9..4d10fc9d614637 100644 --- a/Doc/data/stable_abi.dat +++ b/Doc/data/stable_abi.dat @@ -564,6 +564,7 @@ function,PyStructSequence_GetItem,3.2, function,PyStructSequence_New,3.2, function,PyStructSequence_NewType,3.2, function,PyStructSequence_SetItem,3.2, +var,PyStructSequence_UnnamedField,3.11, var,PySuper_Type,3.2, function,PySys_AddWarnOption,3.2, function,PySys_AddWarnOptionUnicode,3.2, From b2cb917ae4aa1684cf7e877e4403ec03f247cfe2 Mon Sep 17 00:00:00 2001 From: Fidget-Spinner <28750310+Fidget-Spinner@users.noreply.github.com> Date: Tue, 25 May 2021 20:55:35 +0800 Subject: [PATCH 4/6] Change added 3.11 to 3.10 --- Doc/data/stable_abi.dat | 2 +- Misc/stable_abi.txt | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Doc/data/stable_abi.dat b/Doc/data/stable_abi.dat index 4d10fc9d614637..530111840ea544 100644 --- a/Doc/data/stable_abi.dat +++ b/Doc/data/stable_abi.dat @@ -564,7 +564,7 @@ function,PyStructSequence_GetItem,3.2, function,PyStructSequence_New,3.2, function,PyStructSequence_NewType,3.2, function,PyStructSequence_SetItem,3.2, -var,PyStructSequence_UnnamedField,3.11, +var,PyStructSequence_UnnamedField,3.10, var,PySuper_Type,3.2, function,PySys_AddWarnOption,3.2, function,PySys_AddWarnOptionUnicode,3.2, diff --git a/Misc/stable_abi.txt b/Misc/stable_abi.txt index b01b52d8c8a651..2fa0adfedf3298 100644 --- a/Misc/stable_abi.txt +++ b/Misc/stable_abi.txt @@ -2121,6 +2121,8 @@ function PyObject_GetAiter added 3.10 data PyExc_EncodingWarning added 3.10 +data PyStructSequence_UnnamedField + added 3.10 # Support for Stable ABI in debug builds @@ -2148,10 +2150,6 @@ function PyGC_Enable function PyGC_IsEnabled added 3.10 -# The following were added in PC/python3.def in Python 3.11: - -data PyStructSequence_UnnamedField - added 3.11 # And also 3.10 # (Detailed comments aren't really needed for further entries: from here on # we can use version control logs.) From 385f84c2af2b4baf1c4209ea8986a6f7959920f3 Mon Sep 17 00:00:00 2001 From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Tue, 25 May 2021 20:57:31 +0800 Subject: [PATCH 5/6] Update Misc/NEWS.d/next/C API/2021-05-24-22-12-40.bpo-44220.H9CUGl.rst Co-authored-by: Petr Viktorin --- .../NEWS.d/next/C API/2021-05-24-22-12-40.bpo-44220.H9CUGl.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Misc/NEWS.d/next/C API/2021-05-24-22-12-40.bpo-44220.H9CUGl.rst b/Misc/NEWS.d/next/C API/2021-05-24-22-12-40.bpo-44220.H9CUGl.rst index ffb4eb6f41c222..79ba8aa07cde68 100644 --- a/Misc/NEWS.d/next/C API/2021-05-24-22-12-40.bpo-44220.H9CUGl.rst +++ b/Misc/NEWS.d/next/C API/2021-05-24-22-12-40.bpo-44220.H9CUGl.rst @@ -1,2 +1 @@ -:c:var:`PyStructSequence_UnnamedField` is now present in ``python3.lib`` and -``python3.dll``. +:c:var:`PyStructSequence_UnnamedField` is added to the Stable ABI. From 27fab640a3b87003010fd088ad5ae8ac737201fb Mon Sep 17 00:00:00 2001 From: Fidget-Spinner <28750310+Fidget-Spinner@users.noreply.github.com> Date: Wed, 20 Oct 2021 23:28:28 +0800 Subject: [PATCH 6/6] bump to 3.11 --- Doc/data/stable_abi.dat | 2 +- Misc/stable_abi.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/data/stable_abi.dat b/Doc/data/stable_abi.dat index 0ead49c8b39789..46ee321b660c3a 100644 --- a/Doc/data/stable_abi.dat +++ b/Doc/data/stable_abi.dat @@ -569,7 +569,7 @@ function,PyStructSequence_GetItem,3.2, function,PyStructSequence_New,3.2, function,PyStructSequence_NewType,3.2, function,PyStructSequence_SetItem,3.2, -var,PyStructSequence_UnnamedField,3.10, +var,PyStructSequence_UnnamedField,3.11, var,PySuper_Type,3.2, function,PySys_AddWarnOption,3.2, function,PySys_AddWarnOptionUnicode,3.2, diff --git a/Misc/stable_abi.txt b/Misc/stable_abi.txt index e97f73e2873440..23e5b96a0e8a78 100644 --- a/Misc/stable_abi.txt +++ b/Misc/stable_abi.txt @@ -2116,8 +2116,6 @@ function PyObject_GetAIter added 3.10 data PyExc_EncodingWarning added 3.10 -data PyStructSequence_UnnamedField - added 3.10 # Support for Stable ABI in debug builds @@ -2151,6 +2149,8 @@ function PyType_GetName added 3.11 function PyType_GetQualName added 3.11 +data PyStructSequence_UnnamedField + added 3.11 # (Detailed comments aren't really needed for further entries: from here on # we can use version control logs.)