Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-dirty-equals for 
openSUSE:Factory checked in at 2023-10-19 22:47:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-dirty-equals (Old)
 and      /work/SRC/openSUSE:Factory/.python-dirty-equals.new.1945 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-dirty-equals"

Thu Oct 19 22:47:16 2023 rev:4 rq:1118345 version:0.7.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-dirty-equals/python-dirty-equals.changes  
2022-11-14 14:29:10.507022854 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-dirty-equals.new.1945/python-dirty-equals.changes
        2023-10-19 22:49:38.223475520 +0200
@@ -1,0 +2,10 @@
+Tue Oct 17 12:30:50 UTC 2023 - Markéta Calábková <meggy.calabk...@gmail.com>
+
+- Update to 0.7.0
+  * add some new functions
+  * move to Python 3.11 final
+  * numeric exact
+- add datetime.patch to fix compatibility with Python 3.12
+  * sent upstream: https://github.com/samuelcolvin/dirty-equals/pull/86
+
+-------------------------------------------------------------------

Old:
----
  dirty-equals-0.5.0.tar.gz

New:
----
  datetime.patch
  dirty-equals-0.7.0.tar.gz

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

Other differences:
------------------
++++++ python-dirty-equals.spec ++++++
--- /var/tmp/diff_new_pack.OONRP3/_old  2023-10-19 22:49:38.755494815 +0200
+++ /var/tmp/diff_new_pack.OONRP3/_new  2023-10-19 22:49:38.759494960 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-dirty-equals
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,26 +17,24 @@
 
 
 Name:           python-dirty-equals
-Version:        0.5.0
+Version:        0.7.0
 Release:        0
 Summary:        Doing dirty (but useful) things with equals
 License:        MIT
 URL:            https://dirty-equals.helpmanual.io
 Source:         
https://github.com/samuelcolvin/dirty-equals/archive/refs/tags/v%{version}.tar.gz#/dirty-equals-%{version}.tar.gz
+Patch:          datetime.patch
 BuildRequires:  %{python_module base >= 3.7}
 BuildRequires:  %{python_module hatchling}
 BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module poetry-core}
+BuildRequires:  %{python_module pydantic}
 BuildRequires:  %{python_module pytest-mock}
 BuildRequires:  %{python_module pytest}
-BuildRequires:  %{python_module python-typing-extensions >= 4.0.1 if 
%python-base < 3.8}
 BuildRequires:  %{python_module pytz >= 2021.3}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 Requires:       python-pytz >= 2021.3
-%if 0%{?python_version_nodots} < 38
-Requires:       python-typing-extensions >= 4.0.1
-%endif
 BuildArch:      noarch
 %python_subpackages
 
@@ -44,10 +42,7 @@
 Doing dirty (but extremely useful) things with equals.
 
 %prep
-%setup -q -n dirty-equals-%{version}
-# https://github.com/samuelcolvin/dirty-equals/issues/45
-sed -i 's/version = "0"/version = "%{version}"/' pyproject.toml
-sed -i 's/0.0.dev0/%{version}/' dirty_equals/__init__.py
+%autosetup -p1 -n dirty-equals-%{version}
 
 %build
 %pyproject_wheel
@@ -57,7 +52,8 @@
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 %check
-%pytest
+# Doc tests need new pytest plugin, pytest-examples. Too much work for too low 
importance.
+%pytest --ignore "tests/test_docs.py"
 
 %files %{python_files}
 %doc README.md

++++++ datetime.patch ++++++
Index: dirty-equals-0.6.0/tests/test_datetime.py
===================================================================
--- dirty-equals-0.6.0.orig/tests/test_datetime.py
+++ dirty-equals-0.6.0/tests/test_datetime.py
@@ -99,7 +99,12 @@ def test_repr():
 
 
 def test_is_now_tz():
-    now_ny = 
datetime.utcnow().replace(tzinfo=timezone.utc).astimezone(pytz.timezone('America/New_York'))
+    try:
+        from datetime import UTC
+        utc_now = datetime.now(UTC).replace(tzinfo=timezone.utc)
+    except ImportError:
+        utc_now = datetime.utcnow().replace(tzinfo=timezone.utc)
+    now_ny = utc_now.astimezone(pytz.timezone('America/New_York'))
     assert now_ny == IsNow(tz='America/New_York')
     # depends on the time of year and DST
     assert now_ny == IsNow(tz=timezone(timedelta(hours=-5))) | 
IsNow(tz=timezone(timedelta(hours=-4)))
@@ -111,7 +116,6 @@ def test_is_now_tz():
     assert now.isoformat() == IsNow(iso_string=True)
     assert now.isoformat() != IsNow
 
-    utc_now = datetime.utcnow().replace(tzinfo=timezone.utc)
     assert utc_now == IsNow(tz=timezone.utc)
 
 
Index: dirty-equals-0.6.0/dirty_equals/_datetime.py
===================================================================
--- dirty-equals-0.6.0.orig/dirty_equals/_datetime.py
+++ dirty-equals-0.6.0/dirty_equals/_datetime.py
@@ -184,7 +184,12 @@ class IsNow(IsDatetime):
         if self.tz is None:
             return datetime.now()
         else:
-            return 
datetime.utcnow().replace(tzinfo=timezone.utc).astimezone(self.tz)
+            try:
+                from datetime import UTC
+                utc_now = datetime.now(UTC).replace(tzinfo=timezone.utc)
+            except ImportError:
+                utc_now = datetime.utcnow().replace(tzinfo=timezone.utc)
+            return utc_now.astimezone(self.tz)
 
     def prepare(self, other: Any) -> datetime:
         # update approx for every comparing, to check if other value is dirty 
equal

++++++ dirty-equals-0.5.0.tar.gz -> dirty-equals-0.7.0.tar.gz ++++++
++++ 2522 lines of diff (skipped)

Reply via email to