summarylogtreecommitdiffstats
path: root/0110-time-fix-strftime-not-raising-for-invalid-year-value.patch
diff options
context:
space:
mode:
authoratomlong2021-08-28 11:19:04 +0800
committeratomlong2021-08-28 13:15:13 +0800
commit89a67c05174951d172252b1db96ff93cc4ec4bcd (patch)
treed8c39fa79b201cf9aea28c51e7446a252ed8fee4 /0110-time-fix-strftime-not-raising-for-invalid-year-value.patch
parentcf8d8d8771493a2aa8370ed323d06dc733a84181 (diff)
downloadaur-89a67c05174951d172252b1db96ff93cc4ec4bcd.tar.gz
Update to 3.9.6
Diffstat (limited to '0110-time-fix-strftime-not-raising-for-invalid-year-value.patch')
-rw-r--r--0110-time-fix-strftime-not-raising-for-invalid-year-value.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/0110-time-fix-strftime-not-raising-for-invalid-year-value.patch b/0110-time-fix-strftime-not-raising-for-invalid-year-value.patch
new file mode 100644
index 000000000000..32bb8332f301
--- /dev/null
+++ b/0110-time-fix-strftime-not-raising-for-invalid-year-value.patch
@@ -0,0 +1,28 @@
+From 57bb29b796eca27031584a75e6b44182e4c6b2e5 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Fri, 23 Jul 2021 08:52:50 +0200
+Subject: [PATCH 110/N] time: fix strftime not raising for invalid year
+ values
+
+It's crt specific and not compiler specific.
+This fixes a test case in test_time
+---
+ Modules/timemodule.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Modules/timemodule.c b/Modules/timemodule.c
+index 80eab30..f0cdcfa 100644
+--- a/Modules/timemodule.c
++++ b/Modules/timemodule.c
+@@ -754,7 +754,7 @@ time_strftime(PyObject *self, PyObject *args)
+ return NULL;
+ }
+
+-#if defined(_MSC_VER) || (defined(__sun) && defined(__SVR4)) || defined(_AIX) || defined(__VXWORKS__)
++#if defined(MS_WINDOWS) || (defined(__sun) && defined(__SVR4)) || defined(_AIX) || defined(__VXWORKS__)
+ if (buf.tm_year + 1900 < 1 || 9999 < buf.tm_year + 1900) {
+ PyErr_SetString(PyExc_ValueError,
+ "strftime() requires year in [1; 9999]");
+--
+2.32.0
+