diff options
author | Pablo Galindo <Pablogsal@gmail.com> | 2020-06-21 20:26:59 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-21 20:26:59 (GMT) |
commit | 5b1a311512fb74d47a7beb223b93e5f28f3f98ab (patch) | |
tree | 789f0757b1fc011b0f6ba3bc91c8fdc7607c8e1e /Include | |
parent | 26f6126b2aa116b5c613c104bde0bb5b791a0bfc (diff) | |
download | cpython-5b1a311512fb74d47a7beb223b93e5f28f3f98ab.zip cpython-5b1a311512fb74d47a7beb223b93e5f28f3f98ab.tar.gz cpython-5b1a311512fb74d47a7beb223b93e5f28f3f98ab.tar.bz2 |
[3.9] Do not emit deprecation warnings inside CPython for old parser APIs (GH-21025)
Diffstat (limited to 'Include')
-rw-r--r-- | Include/pythonrun.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/Include/pythonrun.h b/Include/pythonrun.h index d601005..5752907 100644 --- a/Include/pythonrun.h +++ b/Include/pythonrun.h @@ -72,15 +72,23 @@ PyAPI_FUNC(struct _mod *) PyParser_ASTFromFileObject( #define PyParser_SimpleParseFile(FP, S, B) \ PyParser_SimpleParseFileFlags(FP, S, B, 0) #endif -Py_DEPRECATED(3.9) PyAPI_FUNC(struct _node *) PyParser_SimpleParseStringFlags(const char *, - int, int); + +#ifndef Py_BUILD_CORE +Py_DEPRECATED(3.9) +#endif +PyAPI_FUNC(struct _node *) PyParser_SimpleParseStringFlags(const char *, int, int); #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000 -Py_DEPRECATED(3.9) PyAPI_FUNC(struct _node *) PyParser_SimpleParseStringFlagsFilename(const char *, - const char *, - int, int); +#ifndef Py_BUILD_CORE +Py_DEPRECATED(3.9) +#endif +PyAPI_FUNC(struct _node *) PyParser_SimpleParseStringFlagsFilename(const char *, + const char *, + int, int); +#endif +#ifndef Py_BUILD_CORE +Py_DEPRECATED(3.9) #endif -Py_DEPRECATED(3.9) PyAPI_FUNC(struct _node *) PyParser_SimpleParseFileFlags(FILE *, const char *, - int, int); +PyAPI_FUNC(struct _node *) PyParser_SimpleParseFileFlags(FILE *, const char *, int, int); #ifndef Py_LIMITED_API PyAPI_FUNC(PyObject *) PyRun_StringFlags(const char *, int, PyObject *, PyObject *, PyCompilerFlags *); |