Accepting request 578203 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/578203 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytz?expand=0&rev=27
This commit is contained in:
commit
1f0c539e69
@ -12,14 +12,15 @@ diff --git a/src/pytz/tests/test_tzinfo.py b/src/pytz/tests/test_tzinfo.py
|
||||
index 3166322..0ecb8c0 100644
|
||||
--- a/src/pytz/tests/test_tzinfo.py
|
||||
+++ b/src/pytz/tests/test_tzinfo.py
|
||||
@@ -235,12 +235,14 @@ class USEasternDSTStartTestCase(unittest.TestCase):
|
||||
@@ -249,13 +249,14 @@ class USEasternDSTStartTestCase(unittest.TestCase):
|
||||
|
||||
def _test_tzname(self, utc_dt, wanted):
|
||||
tzname = wanted['tzname']
|
||||
+ if not isinstance(tzname, list):
|
||||
+ tzname = [tzname]
|
||||
dt = utc_dt.astimezone(self.tzinfo)
|
||||
- self.assertEqual(dt.tzname(), tzname,
|
||||
- self.assertEqual(
|
||||
- dt.tzname(), tzname,
|
||||
- 'Expected %s as tzname for %s. Got %s' % (
|
||||
- tzname, str(utc_dt), dt.tzname()
|
||||
- )
|
||||
@ -32,7 +33,7 @@ index 3166322..0ecb8c0 100644
|
||||
|
||||
def _test_utcoffset(self, utc_dt, wanted):
|
||||
utcoffset = wanted['utcoffset']
|
||||
@@ -501,7 +503,7 @@ class NoumeaHistoryStartTestCase(USEasternDSTStartTestCase):
|
||||
@@ -512,7 +514,7 @@ class NoumeaHistoryStartTestCase(USEasternDSTStartTestCase):
|
||||
'dst': timedelta(0),
|
||||
}
|
||||
after = {
|
||||
@ -41,7 +42,7 @@ index 3166322..0ecb8c0 100644
|
||||
'utcoffset': timedelta(hours=11),
|
||||
'dst': timedelta(0),
|
||||
}
|
||||
@@ -512,12 +514,12 @@ class NoumeaDSTEndTestCase(USEasternDSTStartTestCase):
|
||||
@@ -523,12 +525,12 @@ class NoumeaDSTEndTestCase(USEasternDSTStartTestCase):
|
||||
tzinfo = pytz.timezone('Pacific/Noumea')
|
||||
transition_time = datetime(1997, 3, 1, 15, 00, 00, tzinfo=UTC)
|
||||
before = {
|
||||
@ -56,7 +57,7 @@ index 3166322..0ecb8c0 100644
|
||||
'utcoffset': timedelta(hours=11),
|
||||
'dst': timedelta(0),
|
||||
}
|
||||
@@ -541,7 +543,7 @@ class TahitiTestCase(USEasternDSTStartTestCase):
|
||||
@@ -552,7 +554,7 @@ class TahitiTestCase(USEasternDSTStartTestCase):
|
||||
'dst': timedelta(0),
|
||||
}
|
||||
after = {
|
||||
@ -65,7 +66,7 @@ index 3166322..0ecb8c0 100644
|
||||
'utcoffset': timedelta(hours=-10),
|
||||
'dst': timedelta(0),
|
||||
}
|
||||
@@ -554,12 +556,12 @@ class SamoaInternationalDateLineChange(USEasternDSTStartTestCase):
|
||||
@@ -565,12 +567,12 @@ class SamoaInternationalDateLineChange(USEasternDSTStartTestCase):
|
||||
tzinfo = pytz.timezone('Pacific/Apia')
|
||||
transition_time = datetime(2011, 12, 30, 10, 0, 0, tzinfo=UTC)
|
||||
before = {
|
||||
@ -80,7 +81,7 @@ index 3166322..0ecb8c0 100644
|
||||
'utcoffset': timedelta(hours=14),
|
||||
'dst': timedelta(hours=1),
|
||||
}
|
||||
@@ -612,7 +614,7 @@ class LocalTestCase(unittest.TestCase):
|
||||
@@ -620,7 +622,7 @@ class LocalTestCase(unittest.TestCase):
|
||||
|
||||
loc_time = loc_tz.localize(datetime(1940, 5, 10, 0, 0, 0))
|
||||
# pre-2017a, abbreviation was NCT
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/pytz/tests/test_tzinfo.py
|
||||
+++ b/pytz/tests/test_tzinfo.py
|
||||
@@ -694,15 +694,6 @@
|
||||
@@ -728,15 +728,6 @@
|
||||
'1914-01-01 13:40:00 UTC+0000'
|
||||
)
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Feb 17 18:35:20 UTC 2018 - arun@gmx.de
|
||||
|
||||
- specfile:
|
||||
* update copyright year
|
||||
* move from zip to tar.gz
|
||||
* updated line number in patches and fixed whitespace issues:
|
||||
o 0001-Fix-tests-for-older-timezone-versions.patch
|
||||
o fix-tests.patch
|
||||
o system-zoneinfo.patch
|
||||
|
||||
- update to version 2018.3:
|
||||
* Test updates for Iana 2018c changes
|
||||
* delint
|
||||
* lint target & update iana build rule
|
||||
* Bump version numbers to 2018.3/2018c
|
||||
* Include license file in the generated wheel package
|
||||
* Update travis config
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 2 03:10:52 UTC 2017 - arun@gmx.de
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-pytz
|
||||
#
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -19,14 +19,14 @@
|
||||
%define oldpython python
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-pytz
|
||||
Version: 2017.3
|
||||
Version: 2018.3
|
||||
Release: 0
|
||||
Summary: World timezone definitions, modern and historical
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
Url: http://pytz.sourceforge.net
|
||||
Source: https://files.pythonhosted.org/packages/source/p/pytz/pytz-%{version}.zip
|
||||
Source2: https://files.pythonhosted.org/packages/source/p/pytz/pytz-%{version}.zip.asc
|
||||
Source: https://files.pythonhosted.org/packages/source/p/pytz/pytz-%{version}.tar.gz
|
||||
Source2: https://files.pythonhosted.org/packages/source/p/pytz/pytz-%{version}.tar.gz.asc
|
||||
Source90: pytz.keyring
|
||||
# PATCH-FIX-UPSTREAM fix-tests.patch -- Remote tests which are known to be broken
|
||||
Patch0: fix-tests.patch
|
||||
@ -37,7 +37,6 @@ Patch2: 0001-Fix-tests-for-older-timezone-versions.patch
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: unzip
|
||||
# Test requirements
|
||||
BuildRequires: %{python_module nose}
|
||||
BuildRequires: timezone
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:fae4cffc040921b8a2d60c6cf0b5d662c1190fe54d718271db4eb17d44a185b7
|
||||
size 527977
|
@ -1,7 +0,0 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v2
|
||||
|
||||
iEYEABECAAYFAln3MrQACgkQAfqZj7rGN0pzowCggUYhB+WYN2w6SPryflzhs1II
|
||||
HxQAn1a0zf16Al5FA4ATvq4R26PDThut
|
||||
=qZkB
|
||||
-----END PGP SIGNATURE-----
|
3
pytz-2018.3.tar.gz
Normal file
3
pytz-2018.3.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:410bcd1d6409026fbaa65d9ed33bf6dd8b1e94a499e32168acfc7b332e4095c0
|
||||
size 314214
|
7
pytz-2018.3.tar.gz.asc
Normal file
7
pytz-2018.3.tar.gz.asc
Normal file
@ -0,0 +1,7 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v2
|
||||
|
||||
iEYEABECAAYFAlp9VJYACgkQAfqZj7rGN0pSTwCbBDpA5qZ5+WHLEnYlWWLeef6+
|
||||
qVEAoIIQFcOLP7M2bDT2ep6n6lSRdW21
|
||||
=aTry
|
||||
-----END PGP SIGNATURE-----
|
@ -2,12 +2,12 @@ Index: pytz-2016.10/pytz/__init__.py
|
||||
===================================================================
|
||||
--- pytz-2016.10.orig/pytz/__init__.py
|
||||
+++ pytz-2016.10/pytz/__init__.py
|
||||
@@ -87,23 +87,7 @@ def open_resource(name):
|
||||
@@ -90,23 +90,7 @@ def open_resource(name):
|
||||
for part in name_parts:
|
||||
if part == os.path.pardir or os.path.sep in part:
|
||||
raise ValueError('Bad path segment: %r' % part)
|
||||
- zoneinfo_dir = os.environ.get('PYTZ_TZDATADIR', None)
|
||||
- if zoneinfo_dir != None:
|
||||
- if zoneinfo_dir is not None:
|
||||
- filename = os.path.join(zoneinfo_dir, *name_parts)
|
||||
- else:
|
||||
- filename = os.path.join(os.path.dirname(__file__),
|
||||
@ -31,12 +31,12 @@ Index: pytz-2016.10/pytz/tzfile.py
|
||||
===================================================================
|
||||
--- pytz-2016.10.orig/pytz/tzfile.py
|
||||
+++ pytz-2016.10/pytz/tzfile.py
|
||||
@@ -127,7 +127,7 @@ def build_tzinfo(zone, fp):
|
||||
@@ -126,7 +126,7 @@ def build_tzinfo(zone, fp):
|
||||
if __name__ == '__main__':
|
||||
import os.path
|
||||
from pprint import pprint
|
||||
- base = os.path.join(os.path.dirname(__file__), 'zoneinfo')
|
||||
+ base = '/usr/share/zoneinfo'
|
||||
tz = build_tzinfo('Australia/Melbourne',
|
||||
open(os.path.join(base,'Australia','Melbourne'), 'rb'))
|
||||
open(os.path.join(base, 'Australia', 'Melbourne'), 'rb'))
|
||||
tz = build_tzinfo('US/Eastern',
|
||||
|
Loading…
Reference in New Issue
Block a user