]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.9] bpo-40939: Deprecate PyNode_Compile (GH-21036)
authorLysandros Nikolaou <lisandrosnik@gmail.com>
Mon, 22 Jun 2020 00:07:39 +0000 (03:07 +0300)
committerGitHub <noreply@github.com>
Mon, 22 Jun 2020 00:07:39 +0000 (17:07 -0700)
Automerge-Triggered-By: @pablogsal
Doc/whatsnew/3.9.rst
Include/compile.h
Misc/NEWS.d/next/Core and Builtins/2020-06-21-23-48-12.bpo-40939.RjLl6C.rst [new file with mode: 0644]

index 16250317b1ce7d9d7a82b8a35b7a4a5c817a40b1..d18eca8c4c0e42f817cdb207f7589020aff15e5a 100644 (file)
@@ -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
index 12417ce805464b9f6ffa11a84ec125ae529b58e4..98adee3d19120407ab43e1c3b7f4249c9bcb0cd1 100644 (file)
@@ -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 (file)
index 0000000..45620e1
--- /dev/null
@@ -0,0 +1 @@
+Deprecate :c:func:`PyNode_Compile`.
\ No newline at end of file