From: Nicholas Sim Date: Wed, 17 Feb 2021 18:30:31 +0000 (+0800) Subject: bpo-35134: Move Include/{pyarena.h,pyctype.h} to Include/cpython/ (GH-24550) X-Git-Tag: v3.10.0a6~76 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=366dc3a1354078e38808b9c16276e97cca5b8aaf;p=thirdparty%2FPython%2Fcpython.git bpo-35134: Move Include/{pyarena.h,pyctype.h} to Include/cpython/ (GH-24550) Move non-limited C API headers pyarena.h and pyctype.h into Include/cpython/ directory. --- diff --git a/Include/Python.h b/Include/Python.h index 76ead9e5765e..c71a71f875e3 100644 --- a/Include/Python.h +++ b/Include/Python.h @@ -137,7 +137,7 @@ #include "pystate.h" #include "context.h" -#include "pyarena.h" +#include "cpython/pyarena.h" #include "modsupport.h" #include "compile.h" #include "pythonrun.h" @@ -154,7 +154,7 @@ #include "eval.h" -#include "pyctype.h" +#include "cpython/pyctype.h" #include "pystrtod.h" #include "pystrcmp.h" #include "fileutils.h" diff --git a/Include/pyarena.h b/Include/cpython/pyarena.h similarity index 100% rename from Include/pyarena.h rename to Include/cpython/pyarena.h diff --git a/Include/pyctype.h b/Include/cpython/pyctype.h similarity index 100% rename from Include/pyctype.h rename to Include/cpython/pyctype.h diff --git a/Makefile.pre.in b/Makefile.pre.in index d3ac2dab893f..593da93a6bc2 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1057,9 +1057,7 @@ PYTHON_HEADERS= \ $(srcdir)/Include/osmodule.h \ $(srcdir)/Include/patchlevel.h \ $(srcdir)/Include/picklebufobject.h \ - $(srcdir)/Include/pyarena.h \ $(srcdir)/Include/pycapsule.h \ - $(srcdir)/Include/pyctype.h \ $(srcdir)/Include/pydebug.h \ $(srcdir)/Include/pydtrace.h \ $(srcdir)/Include/pyerrors.h \ @@ -1113,6 +1111,8 @@ PYTHON_HEADERS= \ $(srcdir)/Include/cpython/methodobject.h \ $(srcdir)/Include/cpython/object.h \ $(srcdir)/Include/cpython/objimpl.h \ + $(srcdir)/Include/cpython/pyarena.h \ + $(srcdir)/Include/cpython/pyctype.h \ $(srcdir)/Include/cpython/pyerrors.h \ $(srcdir)/Include/cpython/pylifecycle.h \ $(srcdir)/Include/cpython/pymem.h \ diff --git a/Misc/NEWS.d/next/C API/2021-02-17-18-51-26.bpo-35134.YoQdk8.rst b/Misc/NEWS.d/next/C API/2021-02-17-18-51-26.bpo-35134.YoQdk8.rst new file mode 100644 index 000000000000..c3534fce68f8 --- /dev/null +++ b/Misc/NEWS.d/next/C API/2021-02-17-18-51-26.bpo-35134.YoQdk8.rst @@ -0,0 +1,3 @@ +Move pyarena.h, pyctype.h, and pytime.h into the cpython/ directory. They +must not be included directly, as they are already included by Python.h: +:ref:`Include Files `. diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj index 711a68fcc5c7..89b6218a2739 100644 --- a/PCbuild/pythoncore.vcxproj +++ b/PCbuild/pythoncore.vcxproj @@ -142,6 +142,8 @@ + + @@ -226,9 +228,7 @@ - - diff --git a/PCbuild/pythoncore.vcxproj.filters b/PCbuild/pythoncore.vcxproj.filters index ab826427acc6..bd8fd3433bce 100644 --- a/PCbuild/pythoncore.vcxproj.filters +++ b/PCbuild/pythoncore.vcxproj.filters @@ -177,15 +177,9 @@ Include - - Include - Include - - Include - Include @@ -438,6 +432,12 @@ Include\cpython + + Include + + + Include + Include\cpython diff --git a/Parser/pegen.h b/Parser/pegen.h index 2a165c12d252..3765b2425fff 100644 --- a/Parser/pegen.h +++ b/Parser/pegen.h @@ -5,7 +5,6 @@ #include #include #include -#include #if 0 #define PyPARSE_YIELD_IS_KEYWORD 0x0001 diff --git a/Tools/scripts/stable_abi.py b/Tools/scripts/stable_abi.py index 117dfeb3cb57..44f426e096ad 100755 --- a/Tools/scripts/stable_abi.py +++ b/Tools/scripts/stable_abi.py @@ -22,9 +22,7 @@ EXCLUDED_HEADERS = { "genobject.h", "longintrepr.h", "parsetok.h", - "pyarena.h", "pyatomic.h", - "pyctype.h", "pydebug.h", "pytime.h", "symtable.h",