summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLysandros Nikolaou <lisandrosnik@gmail.com>2020-06-22 03:07:39 +0300
committerGitHub <noreply@github.com>2020-06-21 17:07:39 -0700
commit8ae5e8ec8147e6434454e66953c25848b848711a (patch)
treeb94e1f849fbff0b814a501bb73f9c7d6901b4dec
parent5b1a311512fb74d47a7beb223b93e5f28f3f98ab (diff)
downloadcpython-git-8ae5e8ec8147e6434454e66953c25848b848711a.tar.gz
[3.9] bpo-40939: Deprecate PyNode_Compile (GH-21036)
Automerge-Triggered-By: @pablogsal
-rw-r--r--Doc/whatsnew/3.9.rst6
-rw-r--r--Include/compile.h3
-rw-r--r--Misc/NEWS.d/next/Core and Builtins/2020-06-21-23-48-12.bpo-40939.RjLl6C.rst1
3 files changed, 7 insertions, 3 deletions
diff --git a/Doc/whatsnew/3.9.rst b/Doc/whatsnew/3.9.rst
index 16250317b1..d18eca8c4c 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 12417ce805..98adee3d19 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! */
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 0000000000..45620e1947
--- /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