[Python-checkins] bpo-29084: Exclude C API for OrderedDict from the limited C API. (GH-4900) (#5007)

Serhiy Storchaka webhook-mailer at python.org
Mon Dec 25 02:40:30 EST 2017


https://github.com/python/cpython/commit/d62b7412c18bd5dfa6d7346abfaf8a922818e6db
commit: d62b7412c18bd5dfa6d7346abfaf8a922818e6db
branch: 3.6
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: Serhiy Storchaka <storchaka at gmail.com>
date: 2017-12-25T09:40:27+02:00
summary:

bpo-29084: Exclude C API for OrderedDict from the limited C API. (GH-4900) (#5007)

(cherry picked from commit 1b3029ac8370ac76fa9571aef540e10aed0667ff)

files:
A Misc/NEWS.d/next/C API/2017-12-16-09-59-35.bpo-29084.ZGJ-LJ.rst
M Include/odictobject.h

diff --git a/Include/odictobject.h b/Include/odictobject.h
index 381de58ba4c..692194daee8 100644
--- a/Include/odictobject.h
+++ b/Include/odictobject.h
@@ -6,6 +6,7 @@ extern "C" {
 
 
 /* OrderedDict */
+/* This API is optional and mostly redundant. */
 
 #ifndef Py_LIMITED_API
 
@@ -21,10 +22,6 @@ PyAPI_DATA(PyTypeObject) PyODictValues_Type;
 #define PyODict_CheckExact(op) (Py_TYPE(op) == &PyODict_Type)
 #define PyODict_SIZE(op) ((PyDictObject *)op)->ma_used
 
-#endif /* Py_LIMITED_API */
-
-#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
-
 PyAPI_FUNC(PyObject *) PyODict_New(void);
 PyAPI_FUNC(int) PyODict_SetItem(PyObject *od, PyObject *key, PyObject *item);
 PyAPI_FUNC(int) PyODict_DelItem(PyObject *od, PyObject *key);
diff --git a/Misc/NEWS.d/next/C API/2017-12-16-09-59-35.bpo-29084.ZGJ-LJ.rst b/Misc/NEWS.d/next/C API/2017-12-16-09-59-35.bpo-29084.ZGJ-LJ.rst
new file mode 100644
index 00000000000..940f7160772
--- /dev/null
+++ b/Misc/NEWS.d/next/C API/2017-12-16-09-59-35.bpo-29084.ZGJ-LJ.rst	
@@ -0,0 +1,2 @@
+Undocumented C API for OrderedDict has been excluded from the limited C API.
+It was added by mistake and actually never worked in the limited C API.



More information about the Python-checkins mailing list