From e137468fe29caafdeb88b01be6454d0fde7eccca Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Mon, 22 Jun 2020 02:45:02 +0300 Subject: [PATCH 1/2] [3.9] bpo-40939: Deprecate PyNode_Compile --- Doc/whatsnew/3.9.rst | 6 +++--- Include/compile.h | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Doc/whatsnew/3.9.rst b/Doc/whatsnew/3.9.rst index 16250317b1ce7d..d18eca8c4c0e42 100644 --- a/Doc/whatsnew/3.9.rst +++ b/Doc/whatsnew/3.9.rst @@ -705,9 +705,9 @@ Deprecated stage, using the :mod:`ast` module. * The Public C API functions :c:func:`PyParser_SimpleParseStringFlags`, - :c:func:`PyParser_SimpleParseStringFlagsFilename` and - :c:func:`PyParser_SimpleParseFileFlags` are deprecated and will be removed - in Python 3.10 together with the old parser. + :c:func:`PyParser_SimpleParseStringFlagsFilename`, + :c:func:`PyParser_SimpleParseFileFlags` and :c:func:`PyNode_Compile` + are deprecated and will be removed in Python 3.10 together with the old parser. * Using :data:`NotImplemented` in a boolean context has been deprecated, as it is almost exclusively the result of incorrect rich comparator diff --git a/Include/compile.h b/Include/compile.h index 12417ce805464b..98adee3d191204 100644 --- a/Include/compile.h +++ b/Include/compile.h @@ -9,6 +9,9 @@ extern "C" { /* Public interface */ struct _node; /* Declare the existence of this type */ +#ifndef Py_BUILD_CORE +Py_DEPRECATED(3.9) +#endif PyAPI_FUNC(PyCodeObject *) PyNode_Compile(struct _node *, const char *); /* XXX (ncoghlan): Unprefixed type name in a public API! */ From 64c5aa34e8a94ef67ca8b60dafff46c855f77e0e Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Sun, 21 Jun 2020 23:48:15 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Core and Builtins/2020-06-21-23-48-12.bpo-40939.RjLl6C.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2020-06-21-23-48-12.bpo-40939.RjLl6C.rst diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-06-21-23-48-12.bpo-40939.RjLl6C.rst b/Misc/NEWS.d/next/Core and Builtins/2020-06-21-23-48-12.bpo-40939.RjLl6C.rst new file mode 100644 index 00000000000000..45620e1947844b --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-06-21-23-48-12.bpo-40939.RjLl6C.rst @@ -0,0 +1 @@ +Deprecate :c:func:`PyNode_Compile`. \ No newline at end of file