https://github.com/python/cpython/commit/376e037eccdb7a75c28725b470bd7f916a9bb987
commit: 376e037eccdb7a75c28725b470bd7f916a9bb987
branch: 3.14
author: Miss Islington (bot) <31488909+miss-isling...@users.noreply.github.com>
committer: hugovk <1324225+hug...@users.noreply.github.com>
date: 2025-07-08T11:43:57+03:00
summary:

[3.14] gh-120713: Make _Py_NORMALIZE_CENTURY private (GH-135933) (#136387)

Co-authored-by: Petr Viktorin <encu...@gmail.com>

files:
M Modules/_datetimemodule.c
M configure
M configure.ac
M pyconfig.h.in

diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c
index 9bba0e3354b26b..f5a9712b64e4de 100644
--- a/Modules/_datetimemodule.c
+++ b/Modules/_datetimemodule.c
@@ -1928,7 +1928,7 @@ wrap_strftime(PyObject *object, PyObject *format, 
PyObject *timetuple,
             }
             replacement = freplacement;
         }
-#ifdef Py_NORMALIZE_CENTURY
+#ifdef _Py_NORMALIZE_CENTURY
         else if (ch == 'Y' || ch == 'G'
                  || ch == 'F' || ch == 'C'
         ) {
diff --git a/configure b/configure
index a9257ac0b3ac30..1646efe5f061ca 100755
--- a/configure
+++ b/configure
@@ -28234,7 +28234,7 @@ printf "%s\n" "$ac_cv_normalize_century" >&6; }
 if test "$ac_cv_normalize_century" = yes
 then
 
-printf "%s\n" "#define Py_NORMALIZE_CENTURY 1" >>confdefs.h
+printf "%s\n" "#define _Py_NORMALIZE_CENTURY 1" >>confdefs.h
 
 fi
 
diff --git a/configure.ac b/configure.ac
index 225dfc79ab5b29..d868f7b26bad1c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6813,7 +6813,7 @@ int main(void)
 [ac_cv_normalize_century=yes])])
 if test "$ac_cv_normalize_century" = yes
 then
-  AC_DEFINE([Py_NORMALIZE_CENTURY], [1],
+  AC_DEFINE([_Py_NORMALIZE_CENTURY], [1],
   [Define if year with century should be normalized for strftime.])
 fi
 
diff --git a/pyconfig.h.in b/pyconfig.h.in
index d7c496fccc682c..1c533b2bfb7fb4 100644
--- a/pyconfig.h.in
+++ b/pyconfig.h.in
@@ -1737,9 +1737,6 @@
    SipHash13: 3, externally defined: 0 */
 #undef Py_HASH_ALGORITHM
 
-/* Define if year with century should be normalized for strftime. */
-#undef Py_NORMALIZE_CENTURY
-
 /* Define if you want to enable remote debugging support. */
 #undef Py_REMOTE_DEBUG
 
@@ -2026,6 +2023,9 @@
 /* HACL* library can compile SIMD256 implementations */
 #undef _Py_HACL_CAN_COMPILE_VEC256
 
+/* Define if year with century should be normalized for strftime. */
+#undef _Py_NORMALIZE_CENTURY
+
 /* Define to force use of thread-safe errno, h_errno, and other functions */
 #undef _REENTRANT
 

_______________________________________________
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

Reply via email to