https://github.com/python/cpython/commit/3f57d9be8bccf628d20ca24c654bc3d1e1ce2816 commit: 3f57d9be8bccf628d20ca24c654bc3d1e1ce2816 branch: 3.13 author: Kumar Aditya <kumaradi...@python.org> committer: kumaraditya303 <kumaradi...@python.org> date: 2025-07-28T12:19:32Z summary:
[3.13] gh-136759: revert rename `lock.h` to `pylock.h` (GH-137041) (#137075) (#137166) Revert "[3.13] gh-136759: rename `lock.h` to `pylock.h` (GH-137041) (#137075)" This reverts commit 74503acba7d6c563aeef307ccf2d0cee141838b0. files: A Include/cpython/lock.h A Include/lock.h D Include/cpython/pylock.h D Include/pylock.h D Misc/NEWS.d/next/C API/2025-07-23-22-30-23.gh-issue-136759.ffB4wO.rst M Include/Python.h M Include/internal/pycore_lock.h M Makefile.pre.in M PCbuild/pythoncore.vcxproj M PCbuild/pythoncore.vcxproj.filters diff --git a/Include/Python.h b/Include/Python.h index 77c291e5d9f410..fb2d32d7110447 100644 --- a/Include/Python.h +++ b/Include/Python.h @@ -68,7 +68,7 @@ #include "pybuffer.h" #include "pystats.h" #include "pyatomic.h" -#include "pylock.h" +#include "lock.h" #include "object.h" #include "objimpl.h" #include "typeslots.h" diff --git a/Include/cpython/pylock.h b/Include/cpython/lock.h similarity index 100% rename from Include/cpython/pylock.h rename to Include/cpython/lock.h diff --git a/Include/internal/pycore_lock.h b/Include/internal/pycore_lock.h index b4ef9caf55e244..2a18bb7644725f 100644 --- a/Include/internal/pycore_lock.h +++ b/Include/internal/pycore_lock.h @@ -13,7 +13,7 @@ extern "C" { # error "this header requires Py_BUILD_CORE define" #endif -//_Py_UNLOCKED is defined as 0 and _Py_LOCKED as 1 in Include/cpython/pylock.h +//_Py_UNLOCKED is defined as 0 and _Py_LOCKED as 1 in Include/cpython/lock.h #define _Py_HAS_PARKED 2 #define _Py_ONCE_INITIALIZED 4 diff --git a/Include/pylock.h b/Include/lock.h similarity index 87% rename from Include/pylock.h rename to Include/lock.h index 1939ef269d3090..782b9dbc70d056 100644 --- a/Include/pylock.h +++ b/Include/lock.h @@ -6,7 +6,7 @@ extern "C" { #ifndef Py_LIMITED_API # define Py_CPYTHON_LOCK_H -# include "cpython/pylock.h" +# include "cpython/lock.h" # undef Py_CPYTHON_LOCK_H #endif diff --git a/Makefile.pre.in b/Makefile.pre.in index a6a6a5a556d0ce..70d549589ed3bc 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1039,7 +1039,7 @@ PYTHON_HEADERS= \ $(srcdir)/Include/intrcheck.h \ $(srcdir)/Include/iterobject.h \ $(srcdir)/Include/listobject.h \ - $(srcdir)/Include/pylock.h \ + $(srcdir)/Include/lock.h \ $(srcdir)/Include/longobject.h \ $(srcdir)/Include/marshal.h \ $(srcdir)/Include/memoryobject.h \ @@ -1113,7 +1113,7 @@ PYTHON_HEADERS= \ $(srcdir)/Include/cpython/import.h \ $(srcdir)/Include/cpython/initconfig.h \ $(srcdir)/Include/cpython/listobject.h \ - $(srcdir)/Include/cpython/pylock.h \ + $(srcdir)/Include/cpython/lock.h \ $(srcdir)/Include/cpython/longintrepr.h \ $(srcdir)/Include/cpython/longobject.h \ $(srcdir)/Include/cpython/memoryobject.h \ diff --git a/Misc/NEWS.d/next/C API/2025-07-23-22-30-23.gh-issue-136759.ffB4wO.rst b/Misc/NEWS.d/next/C API/2025-07-23-22-30-23.gh-issue-136759.ffB4wO.rst deleted file mode 100644 index 79819b4735ff17..00000000000000 --- a/Misc/NEWS.d/next/C API/2025-07-23-22-30-23.gh-issue-136759.ffB4wO.rst +++ /dev/null @@ -1 +0,0 @@ -Rename ``lock.h`` to ``pylock.h`` to avoid potential include conflicts. diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj index e0717e336f9f8d..70212903c83781 100644 --- a/PCbuild/pythoncore.vcxproj +++ b/PCbuild/pythoncore.vcxproj @@ -158,7 +158,7 @@ <ClInclude Include="..\Include\cpython\import.h" /> <ClInclude Include="..\Include\cpython\initconfig.h" /> <ClInclude Include="..\Include\cpython\listobject.h" /> - <ClInclude Include="..\Include\cpython\pylock.h" /> + <ClInclude Include="..\Include\cpython\lock.h" /> <ClInclude Include="..\Include\cpython\longintrepr.h" /> <ClInclude Include="..\Include\cpython\longobject.h" /> <ClInclude Include="..\Include\cpython\memoryobject.h" /> @@ -313,7 +313,7 @@ <ClInclude Include="..\Include\intrcheck.h" /> <ClInclude Include="..\Include\iterobject.h" /> <ClInclude Include="..\Include\listobject.h" /> - <ClInclude Include="..\Include\pylock.h" /> + <ClInclude Include="..\Include\lock.h" /> <ClInclude Include="..\Include\longobject.h" /> <ClInclude Include="..\Include\marshal.h" /> <ClInclude Include="..\Include\memoryobject.h" /> diff --git a/PCbuild/pythoncore.vcxproj.filters b/PCbuild/pythoncore.vcxproj.filters index 9d4651d8fbd96a..3eed5a9465bca4 100644 --- a/PCbuild/pythoncore.vcxproj.filters +++ b/PCbuild/pythoncore.vcxproj.filters @@ -117,7 +117,7 @@ <ClInclude Include="..\Include\listobject.h"> <Filter>Include</Filter> </ClInclude> - <ClInclude Include="..\Include\pylock.h"> + <ClInclude Include="..\Include\lock.h"> <Filter>Include</Filter> </ClInclude> <ClInclude Include="..\Include\longobject.h"> @@ -402,7 +402,7 @@ <ClInclude Include="..\Include\cpython\listobject.h"> <Filter>Include\cpython</Filter> </ClInclude> - <ClInclude Include="..\Include\cpython\pylock.h"> + <ClInclude Include="..\Include\cpython\lock.h"> <Filter>Include</Filter> </ClInclude> <ClInclude Include="..\Include\cpython\longintrepr.h"> _______________________________________________ Python-checkins mailing list -- python-checkins@python.org To unsubscribe send an email to python-checkins-le...@python.org https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: arch...@mail-archive.com