https://github.com/python/cpython/commit/fb170cf50d0c71d7a036ac6f0db5ee19b46f6b57
commit: fb170cf50d0c71d7a036ac6f0db5ee19b46f6b57
branch: main
author: Petr Viktorin <encu...@gmail.com>
committer: encukou <encu...@gmail.com>
date: 2025-07-07T17:57:48+02:00
summary:

gh-120713: Make _Py_NORMALIZE_CENTURY private (GH-135933)

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 eb90be81c8d34c..7a6426593d021f 100644
--- a/Modules/_datetimemodule.c
+++ b/Modules/_datetimemodule.c
@@ -1934,7 +1934,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 9df366697b8546..4a0f8959c8727d 100755
--- a/configure
+++ b/configure
@@ -28218,7 +28218,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 cb7f2144345b37..10d7a0c6056107 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6803,7 +6803,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