Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-python-pptx for 
openSUSE:Factory checked in at 2024-03-15 20:31:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-python-pptx (Old)
 and      /work/SRC/openSUSE:Factory/.python-python-pptx.new.1905 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-python-pptx"

Fri Mar 15 20:31:45 2024 rev:5 rq:1158252 version:0.6.23

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-python-pptx/python-python-pptx.changes    
2023-12-28 23:02:32.180795261 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-python-pptx.new.1905/python-python-pptx.changes
  2024-03-15 20:32:11.846095750 +0100
@@ -1,0 +2,5 @@
+Fri Mar 15 09:18:12 UTC 2024 - Markéta Machová <mmach...@suse.com>
+
+- Add patch utc.patch to fix the behavior on Python 3.12
+
+-------------------------------------------------------------------

New:
----
  utc.patch

BETA DEBUG BEGIN:
  New:
- Add patch utc.patch to fix the behavior on Python 3.12
BETA DEBUG END:

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

Other differences:
------------------
++++++ python-python-pptx.spec ++++++
--- /var/tmp/diff_new_pack.JrWFOT/_old  2024-03-15 20:32:13.142143096 +0100
+++ /var/tmp/diff_new_pack.JrWFOT/_new  2024-03-15 20:32:13.154143534 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-python-pptx
 #
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
 # Copyright (c) 2021, Martin Hauke <mar...@gmx.de>
 #
 # All modifications and additions to the file contributed by third parties
@@ -17,7 +17,6 @@
 #
 
 
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-python-pptx
 Version:        0.6.23
 Release:        0
@@ -25,6 +24,8 @@
 License:        MIT
 URL:            http://github.com/scanny/python-pptx
 Source:         
https://files.pythonhosted.org/packages/source/p/python-pptx/python-pptx-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM https://github.com/scanny/python-pptx/pull/957 Use 
UTC-aware datetime objects
+Patch:          utc.patch
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  python-rpm-macros
 # SECTION test requirements
@@ -46,7 +47,7 @@
 Generate and manipulate Open XML PowerPoint (.pptx) files.
 
 %prep
-%setup -q -n python-pptx-%{version}
+%autosetup -p1 -n python-pptx-%{version}
 
 %build
 %python_build

++++++ utc.patch ++++++
Index: python-pptx-0.6.23/features/steps/coreprops.py
===================================================================
--- python-pptx-0.6.23.orig/features/steps/coreprops.py
+++ python-pptx-0.6.23/features/steps/coreprops.py
@@ -6,7 +6,7 @@ Gherkin step implementations for core pr
 
 from __future__ import absolute_import
 
-from datetime import datetime, timedelta
+from datetime import datetime, timedelta, timezone
 
 from behave import given, when, then
 
@@ -67,7 +67,7 @@ def step_then_a_core_props_part_with_def
     assert core_props.revision == 1
     # core_props.modified only stores time with seconds resolution, so
     # comparison needs to be a little loose (within two seconds)
-    modified_timedelta = datetime.utcnow() - core_props.modified
+    modified_timedelta = datetime.now(timezone.utc) - core_props.modified
     max_expected_timedelta = timedelta(seconds=2)
     assert modified_timedelta < max_expected_timedelta
 
Index: python-pptx-0.6.23/pptx/parts/coreprops.py
===================================================================
--- python-pptx-0.6.23.orig/pptx/parts/coreprops.py
+++ python-pptx-0.6.23/pptx/parts/coreprops.py
@@ -2,7 +2,7 @@
 
 """Core properties part, corresponds to ``/docProps/core.xml`` part in 
package."""
 
-from datetime import datetime
+from datetime import datetime, timezone
 
 from pptx.opc.constants import CONTENT_TYPE as CT
 from pptx.opc.package import XmlPart
@@ -27,7 +27,7 @@ class CorePropertiesPart(XmlPart):
         core_props.title = "PowerPoint Presentation"
         core_props.last_modified_by = "python-pptx"
         core_props.revision = 1
-        core_props.modified = datetime.utcnow()
+        core_props.modified = datetime.now(timezone.utc)
         return core_props
 
     @property
Index: python-pptx-0.6.23/tests/parts/test_coreprops.py
===================================================================
--- python-pptx-0.6.23.orig/tests/parts/test_coreprops.py
+++ python-pptx-0.6.23/tests/parts/test_coreprops.py
@@ -4,7 +4,7 @@
 
 import pytest
 
-from datetime import datetime, timedelta
+from datetime import datetime, timedelta, timezone
 
 from pptx.opc.constants import CONTENT_TYPE as CT
 from pptx.oxml.coreprops import CT_CoreProperties
@@ -55,7 +55,7 @@ class DescribeCorePropertiesPart(object)
         assert core_props.revision == 1
         # core_props.modified only stores time with seconds resolution, so
         # comparison needs to be a little loose (within two seconds)
-        modified_timedelta = datetime.utcnow() - core_props.modified
+        modified_timedelta = datetime.now(timezone.utc) - core_props.modified
         max_expected_timedelta = timedelta(seconds=2)
         assert modified_timedelta < max_expected_timedelta
 
@@ -70,7 +70,7 @@ class DescribeCorePropertiesPart(object)
     )
     def date_prop_get_fixture(self, request, core_properties):
         prop_name, expected_datetime = request.param
-        return core_properties, prop_name, expected_datetime
+        return core_properties, prop_name, expected_datetime.astimezone() if 
expected_datetime is not None else None
 
     @pytest.fixture(
         params=[
Index: python-pptx-0.6.23/pptx/oxml/coreprops.py
===================================================================
--- python-pptx-0.6.23.orig/pptx/oxml/coreprops.py
+++ python-pptx-0.6.23/pptx/oxml/coreprops.py
@@ -247,7 +247,7 @@ class CT_CoreProperties(BaseOxmlElement)
         dt = None
         for tmpl in templates:
             try:
-                dt = datetime.strptime(parseable_part, tmpl)
+                dt = datetime.strptime(parseable_part, tmpl).astimezone()
             except ValueError:
                 continue
         if dt is None:

Reply via email to