From 9506a8c7fcc0dae84bc3b7c8f77a12a59febb00092ea1c0805cd96b130372b5e Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 15 Aug 2022 20:14:05 +0000 Subject: [PATCH 1/2] - update to 2022.2.1: * matches tzdata 2022b - avoid bashisms in rpm scripts (bsc#1195391) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pytz?expand=0&rev=103 --- python-pytz.changes | 7 +++++++ python-pytz.spec | 6 +++--- pytz-2022.1.tar.gz | 3 --- pytz-2022.1.tar.gz.asc | 6 ------ pytz-2022.2.1.tar.gz | 3 +++ pytz-2022.2.1.tar.gz.asc | 6 ++++++ 6 files changed, 19 insertions(+), 12 deletions(-) delete mode 100644 pytz-2022.1.tar.gz delete mode 100644 pytz-2022.1.tar.gz.asc create mode 100644 pytz-2022.2.1.tar.gz create mode 100644 pytz-2022.2.1.tar.gz.asc diff --git a/python-pytz.changes b/python-pytz.changes index fcb6374..9ee0578 100644 --- a/python-pytz.changes +++ b/python-pytz.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Aug 15 20:10:16 UTC 2022 - Dirk Müller + +- update to 2022.2.1: + * matches tzdata 2022b +- avoid bashisms in rpm scripts (bsc#1195391) + ------------------------------------------------------------------- Tue Mar 29 11:46:35 UTC 2022 - Dirk Müller diff --git a/python-pytz.spec b/python-pytz.spec index 6a9343d..5ac0ea3 100644 --- a/python-pytz.spec +++ b/python-pytz.spec @@ -18,7 +18,7 @@ # Ensure you update the tzdata_version for any minor version increase # otherwise the update python library has the incorrect timezone data. -%define tzdata_version 2022a +%define tzdata_version 2022b %define oldpython python %{?!python_module:%define python_module() python-%{**} python3-%{**}} %{?!pyunittest:%define pyunittest(+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-=) \\\ @@ -29,7 +29,7 @@ } } Name: python-pytz -Version: 2022.1 +Version: 2022.2.1 Release: 0 Summary: World timezone definitions, modern and historical License: MIT @@ -91,7 +91,7 @@ ln -s %{_datadir}/zoneinfo %{buildroot}%{$python_sitelib}/pytz/zoneinfo %pre if [ $1 -gt 1 ] ; then -[ "$(readlink -e %{python_sitelib}/pytz/zoneinfo)" == "%{python_sitelib}/pytz/zoneinfo" ] && rm -rf %{python_sitelib}/pytz/zoneinfo +[ "$(readlink -e %{python_sitelib}/pytz/zoneinfo)" = "%{python_sitelib}/pytz/zoneinfo" ] && rm -rf %{python_sitelib}/pytz/zoneinfo fi || : %files %{python_files} diff --git a/pytz-2022.1.tar.gz b/pytz-2022.1.tar.gz deleted file mode 100644 index a076a20..0000000 --- a/pytz-2022.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1e760e2fe6a8163bc0b3d9a19c4f84342afa0a2affebfaa84b01b978a02ecaa7 -size 320473 diff --git a/pytz-2022.1.tar.gz.asc b/pytz-2022.1.tar.gz.asc deleted file mode 100644 index bd4a02e..0000000 --- a/pytz-2022.1.tar.gz.asc +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iF0EABECAB0WIQTH7MNlq28lXh65uhcB+pmPusY3SgUCYjZ3LQAKCRAB+pmPusY3 -SgZsAJ9rdW61H2RimAjmN7IO11RjDj3AZwCgjiKQ1D4TjOjKzkh/XQ12bCGW5y8= -=x6Wn ------END PGP SIGNATURE----- diff --git a/pytz-2022.2.1.tar.gz b/pytz-2022.2.1.tar.gz new file mode 100644 index 0000000..99f2bae --- /dev/null +++ b/pytz-2022.2.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cea221417204f2d1a2aa03ddae3e867921971d0d76f14d87abb4414415bbdcf5 +size 316105 diff --git a/pytz-2022.2.1.tar.gz.asc b/pytz-2022.2.1.tar.gz.asc new file mode 100644 index 0000000..0263b07 --- /dev/null +++ b/pytz-2022.2.1.tar.gz.asc @@ -0,0 +1,6 @@ +-----BEGIN PGP SIGNATURE----- + +iF0EABECAB0WIQTH7MNlq28lXh65uhcB+pmPusY3SgUCYvcHeAAKCRAB+pmPusY3 +SnQhAJ9rGiw6Z8gswj+Va4+Q5ujyRjxYSACeL5KGLo4kuMSdgW2Dspj9ly041Eg= +=+tdp +-----END PGP SIGNATURE----- From 5663d1b8138ad86f6b2d17715104e4a4067164dc7f34a67cee14e575abe7c298 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 22 Sep 2022 17:14:58 +0000 Subject: [PATCH 2/2] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pytz?expand=0&rev=104 --- ...ix-tests-for-older-timezone-versions.patch | 25 +++++++------------ fix-tests.patch | 10 +++++--- 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/0001-Fix-tests-for-older-timezone-versions.patch b/0001-Fix-tests-for-older-timezone-versions.patch index 62dab47..46faf34 100644 --- a/0001-Fix-tests-for-older-timezone-versions.patch +++ b/0001-Fix-tests-for-older-timezone-versions.patch @@ -8,9 +8,11 @@ This improves the fix from commit c00dbe290b . src/pytz/tests/test_tzinfo.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) ---- a/pytz/tests/test_tzinfo.py -+++ b/pytz/tests/test_tzinfo.py -@@ -247,12 +247,13 @@ class USEasternDSTStartTestCase(unittest +Index: pytz-2022.2.1/pytz/tests/test_tzinfo.py +=================================================================== +--- pytz-2022.2.1.orig/pytz/tests/test_tzinfo.py ++++ pytz-2022.2.1/pytz/tests/test_tzinfo.py +@@ -253,12 +253,13 @@ class USEasternDSTStartTestCase(unittest def _test_tzname(self, utc_dt, wanted): tzname = wanted['tzname'] @@ -29,7 +31,7 @@ This improves the fix from commit c00dbe290b . ) def _test_utcoffset(self, utc_dt, wanted): -@@ -510,7 +511,7 @@ class NoumeaHistoryStartTestCase(USEaste +@@ -516,7 +517,7 @@ class NoumeaHistoryStartTestCase(USEaste 'dst': timedelta(0), } after = { @@ -38,7 +40,7 @@ This improves the fix from commit c00dbe290b . 'utcoffset': timedelta(hours=11), 'dst': timedelta(0), } -@@ -521,12 +522,12 @@ class NoumeaDSTEndTestCase(USEasternDSTS +@@ -527,12 +528,12 @@ class NoumeaDSTEndTestCase(USEasternDSTS tzinfo = pytz.timezone('Pacific/Noumea') transition_time = datetime(1997, 3, 1, 15, 00, 00, tzinfo=UTC) before = { @@ -53,7 +55,7 @@ This improves the fix from commit c00dbe290b . 'utcoffset': timedelta(hours=11), 'dst': timedelta(0), } -@@ -550,7 +551,7 @@ class TahitiTestCase(USEasternDSTStartTe +@@ -556,7 +557,7 @@ class TahitiTestCase(USEasternDSTStartTe 'dst': timedelta(0), } after = { @@ -62,7 +64,7 @@ This improves the fix from commit c00dbe290b . 'utcoffset': timedelta(hours=-10), 'dst': timedelta(0), } -@@ -563,12 +564,12 @@ class SamoaInternationalDateLineChange(U +@@ -569,12 +570,12 @@ class SamoaInternationalDateLineChange(U tzinfo = pytz.timezone('Pacific/Apia') transition_time = datetime(2011, 12, 30, 10, 0, 0, tzinfo=UTC) before = { @@ -77,12 +79,3 @@ This improves the fix from commit c00dbe290b . 'utcoffset': timedelta(hours=14), 'dst': timedelta(hours=1), } -@@ -618,7 +619,7 @@ class LocalTestCase(unittest.TestCase): - - loc_time = loc_tz.localize(datetime(1940, 5, 10, 0, 0, 0)) - # pre-2017a, abbreviation was NCT -- self.assertEqual(loc_time.strftime('%Z%z'), '+0020+0020') -+ self.assertIn(loc_time.strftime('%Z%z'), ['NET+0020', '+0020+0020']) - - loc_time = loc_tz.localize(datetime(1940, 5, 20, 0, 0, 0)) - self.assertEqual(loc_time.strftime('%Z%z'), 'CEST+0200') diff --git a/fix-tests.patch b/fix-tests.patch index 4917cc1..0ad7dd5 100644 --- a/fix-tests.patch +++ b/fix-tests.patch @@ -1,7 +1,9 @@ ---- a/pytz/tests/test_tzinfo.py -+++ b/pytz/tests/test_tzinfo.py -@@ -726,15 +726,6 @@ class LocalTestCase(unittest.TestCase): - '1914-01-01 13:40:00 UTC+0000' +Index: pytz-2022.2.1/pytz/tests/test_tzinfo.py +=================================================================== +--- pytz-2022.2.1.orig/pytz/tests/test_tzinfo.py ++++ pytz-2022.2.1/pytz/tests/test_tzinfo.py +@@ -685,15 +685,6 @@ class LocalTestCase(unittest.TestCase): + '2004-04-04 01:50:00 EST-0500' ) - def no_testCreateLocaltime(self):