Skip to content

[3.9] bpo-40939: Deprecate PyNode_Compile #21036

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Doc/whatsnew/3.9.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions Include/compile.h
Original file line number Diff line number Diff line change
Expand Up @@ -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! */

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Deprecate :c:func:`PyNode_Compile`.