Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-Django4 for openSUSE:Factory 
checked in at 2025-01-27 20:55:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Django4 (Old)
 and      /work/SRC/openSUSE:Factory/.python-Django4.new.2316 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-Django4"

Mon Jan 27 20:55:21 2025 rev:8 rq:1240460 version:4.2.18

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Django4/python-Django4.changes    
2025-01-15 17:45:38.154731859 +0100
+++ /work/SRC/openSUSE:Factory/.python-Django4.new.2316/python-Django4.changes  
2025-01-27 20:55:58.064398492 +0100
@@ -1,0 +2,5 @@
+Sun Jan 26 00:56:22 UTC 2025 - Bernhard Wiedemann <bwiedem...@suse.com>
+
+- Add fix2038.patch to let tests pass after year 2038 (boo#1102840)
+
+-------------------------------------------------------------------

New:
----
  fix2038.patch

BETA DEBUG BEGIN:
  New:
- Add fix2038.patch to let tests pass after year 2038 (boo#1102840)
BETA DEBUG END:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-Django4.spec ++++++
--- /var/tmp/diff_new_pack.raPnxc/_old  2025-01-27 20:55:58.900432950 +0100
+++ /var/tmp/diff_new_pack.raPnxc/_new  2025-01-27 20:55:58.900432950 +0100
@@ -40,6 +40,8 @@
 # PATCH-FIX-UPSTREAM 
https://github.com/django/django/commit/3426a5c33c36266af42128ee9eca4921e68ea876
 Refs #34900 -- Fixed (...) test on Python 3.13+.
 # sadly, it was not backported to 4.2.x branch
 Patch2:         py313.patch
+# PATCH-FIX-UPSTREAM https://github.com/django/django/pull/16459 fix tests 
afte r year 2038
+Patch3:         fix2038.patch
 BuildRequires:  %{python_module Jinja2 >= 2.9.2}
 BuildRequires:  %{python_module Pillow >= 6.2.0}
 BuildRequires:  %{python_module PyYAML}

++++++ fix2038.patch ++++++
>From b4cdcbf23937dfcba46d6b08996438a4078e03fd Mon Sep 17 00:00:00 2001
From: "Bernhard M. Wiedemann" <bwiedem...@suse.de>
Date: Mon, 16 Jan 2023 05:37:25 +0100
Subject: [PATCH] Removed hardcoded date in
 SetCookieTests.test_far_expiration().

Follow up to a92c83828785f12dcf90477413c2d04e1855fbb9.
---
 tests/responses/test_cookie.py | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/tests/responses/test_cookie.py b/tests/responses/test_cookie.py
index ea925841512b..7e7f356deb5c 100644
--- a/tests/responses/test_cookie.py
+++ b/tests/responses/test_cookie.py
@@ -1,5 +1,6 @@
 import time
-from datetime import datetime, timedelta, timezone
+from datetime import date, datetime, timedelta, timezone
+from email.utils import format_datetime as format_datetime_rfc5322
 from http import cookies
 
 from django.http import HttpResponse
@@ -49,12 +50,18 @@ def test_create_cookie_after_deleting_cookie(self):
     def test_far_expiration(self):
         """Cookie will expire when a distant expiration time is provided."""
         response = HttpResponse()
-        response.set_cookie("datetime", expires=datetime(2038, 1, 1, 4, 5, 6))
+        future_datetime = datetime(
+            date.today().year + 2, 1, 1, 4, 5, 6, tzinfo=timezone.utc
+        )
+        response.set_cookie("datetime", expires=future_datetime)
         datetime_cookie = response.cookies["datetime"]
         self.assertIn(
             datetime_cookie["expires"],
             # assertIn accounts for slight time dependency (#23450)
-            ("Fri, 01 Jan 2038 04:05:06 GMT", "Fri, 01 Jan 2038 04:05:07 GMT"),
+            (
+                format_datetime_rfc5322(future_datetime, usegmt=True),
+                format_datetime_rfc5322(future_datetime.replace(second=7), 
usegmt=True),
+            ),
         )
 
     def test_max_age_expiration(self):

Reply via email to