--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian....@packages.debian.org
Usertags: unblock
Please unblock package python-tz. This version adjusts the unit tests
to fix a failure to build from source with newer tzdata versions,
which remove many unofficial timezone abbreviations in favour of using
numeric equivalents (you've probably already seen this result in FTBFS
bugs that had to be fixed in packages like glib2.0). Debdiff attached.
unblock python-tz/2016.7-0.3
Regards,
S
diffstat for python-tz-2016.7 python-tz-2016.7
changelog | 11 ++++++
control | 2 -
patches/fix-tests-for-2017a.patch | 68 ++++++++++++++++++++++++++++++++++++++
patches/series | 1
4 files changed, 81 insertions(+), 1 deletion(-)
diff -Nru python-tz-2016.7/debian/changelog python-tz-2016.7/debian/changelog
--- python-tz-2016.7/debian/changelog 2016-11-25 11:05:08.000000000 +0000
+++ python-tz-2016.7/debian/changelog 2017-04-02 17:20:24.000000000 +0100
@@ -1,3 +1,14 @@
+python-tz (2016.7-0.3) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Apply patch from upstream to assume tzdata/2017a abbreviations for
+ timezones. Thanks to Graham Inggs for forwarding this to the BTS.
+ (Closes: #858133)
+ - Build-depend on tzdata 2017a, since the tests will now fail in the
+ opposite way with older tzdata
+
+ -- Simon McVittie <s...@debian.org> Sun, 02 Apr 2017 17:20:24 +0100
+
python-tz (2016.7-0.2) unstable; urgency=medium
* Non-maintainer upload
diff -Nru python-tz-2016.7/debian/control python-tz-2016.7/debian/control
--- python-tz-2016.7/debian/control 2016-11-25 08:30:51.000000000 +0000
+++ python-tz-2016.7/debian/control 2017-04-02 17:20:24.000000000 +0100
@@ -11,7 +11,7 @@
python3-setuptools,
python-pytest,
python3-pytest,
- tzdata,
+ tzdata (>= 2017a),
Standards-Version: 3.9.8
Homepage: http://pypi.python.org/pypi/pytz/
X-Python-Version: >= 2.4
diff -Nru python-tz-2016.7/debian/patches/fix-tests-for-2017a.patch python-tz-2016.7/debian/patches/fix-tests-for-2017a.patch
--- python-tz-2016.7/debian/patches/fix-tests-for-2017a.patch 1970-01-01 01:00:00.000000000 +0100
+++ python-tz-2016.7/debian/patches/fix-tests-for-2017a.patch 2017-04-02 17:20:24.000000000 +0100
@@ -0,0 +1,68 @@
+Date: 2017-03-30
+From: Stuart Bishop <stuart.bis...@canonical.com>
+Subject: Fix tests for 2017a tz abbreviation changes
+
+Bug: https://bugs.launchpad.net/pytz/+bug/1677177
+Bug-Debian: https://bugs.debian.org/858133
+Origin: upstream, https://git.launchpad.net/pytz/commit/?id=c00dbe290bd1aa896b01db94f2e93449cf3bfd07
+
+--- a/pytz/tests/test_tzinfo.py
++++ b/pytz/tests/test_tzinfo.py
+@@ -501,7 +501,7 @@
+ 'dst': timedelta(0),
+ }
+ after = {
+- 'tzname': 'NCT',
++ 'tzname': '+11', # pre-2017a, NCT
+ 'utcoffset': timedelta(hours=11),
+ 'dst': timedelta(0),
+ }
+@@ -512,12 +512,12 @@
+ tzinfo = pytz.timezone('Pacific/Noumea')
+ transition_time = datetime(1997, 3, 1, 15, 00, 00, tzinfo=UTC)
+ before = {
+- 'tzname': 'NCST',
++ 'tzname': '+12', # pre-2017a, NCST
+ 'utcoffset': timedelta(hours=12),
+ 'dst': timedelta(hours=1),
+ }
+ after = {
+- 'tzname': 'NCT',
++ 'tzname': '+11', # pre-2017a, NCT
+ 'utcoffset': timedelta(hours=11),
+ 'dst': timedelta(0),
+ }
+@@ -541,7 +541,7 @@
+ 'dst': timedelta(0),
+ }
+ after = {
+- 'tzname': 'TAHT',
++ 'tzname': '-10', # pre-2017a, TAHT
+ 'utcoffset': timedelta(hours=-10),
+ 'dst': timedelta(0),
+ }
+@@ -554,12 +554,12 @@
+ tzinfo = pytz.timezone('Pacific/Apia')
+ transition_time = datetime(2011, 12, 30, 10, 0, 0, tzinfo=UTC)
+ before = {
+- 'tzname': 'SDT',
++ 'tzname': '-10', # pre-2017a, SDT
+ 'utcoffset': timedelta(hours=-10),
+ 'dst': timedelta(hours=1),
+ }
+ after = {
+- 'tzname': 'WSDT',
++ 'tzname': '+14', # pre-2017a, WSDT
+ 'utcoffset': timedelta(hours=14),
+ 'dst': timedelta(hours=1),
+ }
+@@ -611,7 +611,8 @@
+ self.assertEqual(loc_time.strftime('%Z%z'), 'NST+0120')
+
+ loc_time = loc_tz.localize(datetime(1940, 5, 10, 0, 0, 0))
+- self.assertEqual(loc_time.strftime('%Z%z'), 'NET+0020')
++ # pre-2017a, abbreviation was NCT
++ self.assertEqual(loc_time.strftime('%Z%z'), '+0020+0020')
+
+ loc_time = loc_tz.localize(datetime(1940, 5, 20, 0, 0, 0))
+ self.assertEqual(loc_time.strftime('%Z%z'), 'CEST+0200')
diff -Nru python-tz-2016.7/debian/patches/series python-tz-2016.7/debian/patches/series
--- python-tz-2016.7/debian/patches/series 2016-11-25 10:51:04.000000000 +0000
+++ python-tz-2016.7/debian/patches/series 2017-04-02 17:20:24.000000000 +0100
@@ -1 +1,2 @@
tzdata
+fix-tests-for-2017a.patch
--- End Message ---