Accepting request 1005454 from devel:languages:python

- update to 2022.2.1:
  * matches tzdata 2022b
- avoid bashisms in rpm scripts (bsc#1195391)

OBS-URL: https://build.opensuse.org/request/show/1005454
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytz?expand=0&rev=46
This commit is contained in:
Dominique Leuenberger 2022-09-25 13:34:11 +00:00 committed by Git OBS Bridge
commit ab12d5f1ec
8 changed files with 34 additions and 32 deletions

View File

@ -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')

View File

@ -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):

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Aug 15 20:10:16 UTC 2022 - Dirk Müller <dmueller@suse.com>
- 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 <dmueller@suse.com>

View File

@ -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}

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1e760e2fe6a8163bc0b3d9a19c4f84342afa0a2affebfaa84b01b978a02ecaa7
size 320473

View File

@ -1,6 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iF0EABECAB0WIQTH7MNlq28lXh65uhcB+pmPusY3SgUCYjZ3LQAKCRAB+pmPusY3
SgZsAJ9rdW61H2RimAjmN7IO11RjDj3AZwCgjiKQ1D4TjOjKzkh/XQ12bCGW5y8=
=x6Wn
-----END PGP SIGNATURE-----

3
pytz-2022.2.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cea221417204f2d1a2aa03ddae3e867921971d0d76f14d87abb4414415bbdcf5
size 316105

6
pytz-2022.2.1.tar.gz.asc Normal file
View File

@ -0,0 +1,6 @@
-----BEGIN PGP SIGNATURE-----
iF0EABECAB0WIQTH7MNlq28lXh65uhcB+pmPusY3SgUCYvcHeAAKCRAB+pmPusY3
SnQhAJ9rGiw6Z8gswj+Va4+Q5ujyRjxYSACeL5KGLo4kuMSdgW2Dspj9ly041Eg=
=+tdp
-----END PGP SIGNATURE-----