Skip to content

Commit 8ae5e8e

Browse files
authored
[3.9] bpo-40939: Deprecate PyNode_Compile (GH-21036)
Automerge-Triggered-By: @pablogsal
1 parent 5b1a311 commit 8ae5e8e

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

Doc/whatsnew/3.9.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -705,9 +705,9 @@ Deprecated
705705
stage, using the :mod:`ast` module.
706706

707707
* The Public C API functions :c:func:`PyParser_SimpleParseStringFlags`,
708-
:c:func:`PyParser_SimpleParseStringFlagsFilename` and
709-
:c:func:`PyParser_SimpleParseFileFlags` are deprecated and will be removed
710-
in Python 3.10 together with the old parser.
708+
:c:func:`PyParser_SimpleParseStringFlagsFilename`,
709+
:c:func:`PyParser_SimpleParseFileFlags` and :c:func:`PyNode_Compile`
710+
are deprecated and will be removed in Python 3.10 together with the old parser.
711711

712712
* Using :data:`NotImplemented` in a boolean context has been deprecated,
713713
as it is almost exclusively the result of incorrect rich comparator

Include/compile.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ extern "C" {
99

1010
/* Public interface */
1111
struct _node; /* Declare the existence of this type */
12+
#ifndef Py_BUILD_CORE
13+
Py_DEPRECATED(3.9)
14+
#endif
1215
PyAPI_FUNC(PyCodeObject *) PyNode_Compile(struct _node *, const char *);
1316
/* XXX (ncoghlan): Unprefixed type name in a public API! */
1417

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Deprecate :c:func:`PyNode_Compile`.

0 commit comments

Comments
 (0)