diff -Nru python-tz-2019.3/debian/changelog python-tz-2019.3/debian/changelog --- python-tz-2019.3/debian/changelog 2019-10-13 16:05:24.000000000 +0200 +++ python-tz-2019.3/debian/changelog 2022-11-16 15:54:36.000000000 +0100 @@ -1,3 +1,10 @@ +python-tz (2019.3-1ubuntu0.20.04.0) focal; urgency=medium + + * test: Revert inclusion of PACKRATDATA=backzone + * Update timezones to tzdata 2022f (LP: #1995864) + + -- Benjamin Drung Wed, 16 Nov 2022 15:54:36 +0100 + python-tz (2019.3-1) unstable; urgency=medium * New upstream release diff -Nru python-tz-2019.3/debian/control python-tz-2019.3/debian/control --- python-tz-2019.3/debian/control 2019-10-13 16:05:24.000000000 +0200 +++ python-tz-2019.3/debian/control 2022-11-16 15:54:36.000000000 +0100 @@ -1,7 +1,8 @@ Source: python-tz Section: python Priority: optional -Maintainer: Debian Python Modules Team +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian Python Modules Team Uploaders: Alastair McKinstry , Debian/Ubuntu Zope Team , Fabio Tranchitella diff -Nru python-tz-2019.3/debian/patches/Revert-inclusion-of-PACKRATDATA-backzone.patch python-tz-2019.3/debian/patches/Revert-inclusion-of-PACKRATDATA-backzone.patch --- python-tz-2019.3/debian/patches/Revert-inclusion-of-PACKRATDATA-backzone.patch 1970-01-01 01:00:00.000000000 +0100 +++ python-tz-2019.3/debian/patches/Revert-inclusion-of-PACKRATDATA-backzone.patch 2022-11-16 15:53:00.000000000 +0100 @@ -0,0 +1,117 @@ +From: Stuart Bishop +Date: Sat, 13 Aug 2022 12:00:26 +1000 +Subject: Revert inclusion of PACKRATDATA=backzone + +Per https://github.com/python/tzdata/issues/53#issuecomment-1213628767 + +I chose to include backzone in pytz in an attempt to head off problems: + + Changes to past timestamps + + Finish moving to 'backzone' the location-based zones whose + timestamps since 1970 are duplicates; adjust links accordingly. + This change ordinarily affects only pre-1970 timestamps, and with + the new PACKRATLIST option it does not affect any timestamps. + In this round the affected zones are Antarctica/Vostok, + Asia/Brunei, Asia/Kuala_Lumpur, Atlantic/Reykjavik, + Europe/Amsterdam, Europe/Copenhagen, Europe/Luxembourg, + Europe/Monaco, Europe/Oslo, Europe/Stockholm, Indian/Christmas, + Indian/Cocos, Indian/Kerguelen, Indian/Mahe, Indian/Reunion, + Pacific/Chuuk, Pacific/Funafuti, Pacific/Majuro, Pacific/Pohnpei, + Pacific/Wake and Pacific/Wallis, and the affected links are + Arctic/Longyearbyen, Atlantic/Jan_Mayen, Iceland, Pacific/Ponape, + Pacific/Truk, and Pacific/Yap. + +This upstream change modifies some of the pre-1970 transitions in obscure +ways that almost zero users will actually care about, and where quite +likely dubious in any case. Such as the times pre-1970 when Belfast was +not on London time or when Amsterdam switched from being 18-20 minutes +ahead of GMT to GMT. Changes to historical timezones has always happened +in the upstream database, and normally they are called corrections +(which only causes breakage if you area storing wallclock times rather +than UTC timestamps). + +Origin: https://github.com/stub42/pytz/commit/07aa4d962dae5cb7ced4f61fe85a9001a01676df +--- + README.txt | 2 +- + pytz/tests/test_tzinfo.py | 47 ----------------------------------------------- + 2 files changed, 1 insertion(+), 48 deletions(-) + +diff --git a/README.txt b/README.txt +index eff1a6b..4421265 100644 +--- a/README.txt ++++ b/README.txt +@@ -83,7 +83,7 @@ Unfortunately using the tzinfo argument of the standard datetime + constructors ''does not work'' with pytz for many timezones. + + >>> datetime(2002, 10, 27, 12, 0, 0, tzinfo=amsterdam).strftime(fmt) # /!\ Does not work this way! +-'2002-10-27 12:00:00 LMT+0020' ++'2002-10-27 12:00:00 LMT+0018' + + It is safe for timezones without daylight saving transitions though, such + as UTC: +diff --git a/pytz/tests/test_tzinfo.py b/pytz/tests/test_tzinfo.py +index 7d759af..d426400 100644 +--- a/pytz/tests/test_tzinfo.py ++++ b/pytz/tests/test_tzinfo.py +@@ -612,33 +612,6 @@ class ReferenceUSEasternDSTEndTestCase(USEasternDSTEndTestCase): + + class LocalTestCase(unittest.TestCase): + def testLocalize(self): +- loc_tz = pytz.timezone('Europe/Amsterdam') +- +- loc_time = loc_tz.localize(datetime(1930, 5, 10, 0, 0, 0)) +- # Actually +00:19:32, but Python datetime rounds this +- self.assertEqual(loc_time.strftime('%Z%z'), 'AMT+0020') +- +- loc_time = loc_tz.localize(datetime(1930, 5, 20, 0, 0, 0)) +- # Actually +00:19:32, but Python datetime rounds this +- self.assertEqual(loc_time.strftime('%Z%z'), 'NST+0120') +- +- 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') +- +- loc_time = loc_tz.localize(datetime(1940, 5, 20, 0, 0, 0)) +- self.assertEqual(loc_time.strftime('%Z%z'), 'CEST+0200') +- +- loc_time = loc_tz.localize(datetime(2004, 2, 1, 0, 0, 0)) +- self.assertEqual(loc_time.strftime('%Z%z'), 'CET+0100') +- +- loc_time = loc_tz.localize(datetime(2004, 4, 1, 0, 0, 0)) +- self.assertEqual(loc_time.strftime('%Z%z'), 'CEST+0200') +- +- loc_time = loc_tz.localize(datetime(1943, 3, 29, 1, 59, 59)) +- self.assertEqual(loc_time.strftime('%Z%z'), 'CET+0100') +- +- # Switch to US + loc_tz = pytz.timezone('US/Eastern') + + # End of DST ambiguity check +@@ -712,26 +685,6 @@ class LocalTestCase(unittest.TestCase): + '2004-04-04 01:50:00 EST-0500' + ) + +- def testPartialMinuteOffsets(self): +- # utcoffset in Amsterdam was not a whole minute until 1937 +- # However, we fudge this by rounding them, as the Python +- # datetime library +- tz = pytz.timezone('Europe/Amsterdam') +- utc_dt = datetime(1914, 1, 1, 13, 40, 28, tzinfo=UTC) # correct +- utc_dt = utc_dt.replace(second=0) # But we need to fudge it +- loc_dt = utc_dt.astimezone(tz) +- self.assertEqual( +- loc_dt.strftime('%Y-%m-%d %H:%M:%S %Z%z'), +- '1914-01-01 14:00:00 AMT+0020' +- ) +- +- # And get back... +- utc_dt = loc_dt.astimezone(UTC) +- self.assertEqual( +- utc_dt.strftime('%Y-%m-%d %H:%M:%S %Z%z'), +- '1914-01-01 13:40:00 UTC+0000' +- ) +- + def no_testCreateLocaltime(self): + # It would be nice if this worked, but it doesn't. + tz = pytz.timezone('Europe/Amsterdam') diff -Nru python-tz-2019.3/debian/patches/series python-tz-2019.3/debian/patches/series --- python-tz-2019.3/debian/patches/series 2017-04-10 12:45:11.000000000 +0200 +++ python-tz-2019.3/debian/patches/series 2022-11-16 15:53:00.000000000 +0100 @@ -1 +1,3 @@ tzdata +Revert-inclusion-of-PACKRATDATA-backzone.patch +Update-timezones-to-tzdata-2022f.patch diff -Nru python-tz-2019.3/debian/patches/Update-timezones-to-tzdata-2022f.patch python-tz-2019.3/debian/patches/Update-timezones-to-tzdata-2022f.patch --- python-tz-2019.3/debian/patches/Update-timezones-to-tzdata-2022f.patch 1970-01-01 01:00:00.000000000 +0100 +++ python-tz-2019.3/debian/patches/Update-timezones-to-tzdata-2022f.patch 2022-11-16 15:53:00.000000000 +0100 @@ -0,0 +1,151 @@ +From: Benjamin Drung +Date: Wed, 16 Nov 2022 15:17:52 +0100 +Subject: Update timezones to tzdata 2022f + +Update `all_timezones` and `common_timezones` to tzdata 2022f. + +Bug-Ubuntu: https://launchpad.net/bugs/1995864 +Signed-off-by: Benjamin Drung +--- + pytz/__init__.py | 17 +++++++---------- + pytz/tests/test_tzinfo.py | 2 +- + 2 files changed, 8 insertions(+), 11 deletions(-) + +diff --git a/pytz/__init__.py b/pytz/__init__.py +index 69d2c96..713673d 100644 +--- a/pytz/__init__.py ++++ b/pytz/__init__.py +@@ -22,7 +22,7 @@ from pytz.tzfile import build_tzinfo + + + # The IANA (nee Olson) database is updated several times a year. +-OLSON_VERSION = '2019c' ++OLSON_VERSION = '2022f' + VERSION = '2019.3' # pip compatible version number. + __version__ = VERSION + +@@ -683,6 +683,7 @@ all_timezones = \ + 'America/North_Dakota/Beulah', + 'America/North_Dakota/Center', + 'America/North_Dakota/New_Salem', ++ 'America/Nuuk', + 'America/Ojinaga', + 'America/Panama', + 'America/Pangnirtung', +@@ -956,6 +957,7 @@ all_timezones = \ + 'Europe/Kaliningrad', + 'Europe/Kiev', + 'Europe/Kirov', ++ 'Europe/Kyiv', + 'Europe/Lisbon', + 'Europe/Ljubljana', + 'Europe/London', +@@ -1050,6 +1052,7 @@ all_timezones = \ + 'Pacific/Guam', + 'Pacific/Honolulu', + 'Pacific/Johnston', ++ 'Pacific/Kanton', + 'Pacific/Kiritimati', + 'Pacific/Kosrae', + 'Pacific/Kwajalein', +@@ -1210,7 +1213,6 @@ common_timezones = \ + 'America/Fort_Nelson', + 'America/Fortaleza', + 'America/Glace_Bay', +- 'America/Godthab', + 'America/Goose_Bay', + 'America/Grand_Turk', + 'America/Grenada', +@@ -1258,12 +1260,12 @@ common_timezones = \ + 'America/Montserrat', + 'America/Nassau', + 'America/New_York', +- 'America/Nipigon', + 'America/Nome', + 'America/Noronha', + 'America/North_Dakota/Beulah', + 'America/North_Dakota/Center', + 'America/North_Dakota/New_Salem', ++ 'America/Nuuk', + 'America/Ojinaga', + 'America/Panama', + 'America/Pangnirtung', +@@ -1274,7 +1276,6 @@ common_timezones = \ + 'America/Porto_Velho', + 'America/Puerto_Rico', + 'America/Punta_Arenas', +- 'America/Rainy_River', + 'America/Rankin_Inlet', + 'America/Recife', + 'America/Regina', +@@ -1295,7 +1296,6 @@ common_timezones = \ + 'America/Swift_Current', + 'America/Tegucigalpa', + 'America/Thule', +- 'America/Thunder_Bay', + 'America/Tijuana', + 'America/Toronto', + 'America/Tortola', +@@ -1412,7 +1412,6 @@ common_timezones = \ + 'Australia/Adelaide', + 'Australia/Brisbane', + 'Australia/Broken_Hill', +- 'Australia/Currie', + 'Australia/Darwin', + 'Australia/Eucla', + 'Australia/Hobart', +@@ -1448,8 +1447,8 @@ common_timezones = \ + 'Europe/Istanbul', + 'Europe/Jersey', + 'Europe/Kaliningrad', +- 'Europe/Kiev', + 'Europe/Kirov', ++ 'Europe/Kyiv', + 'Europe/Lisbon', + 'Europe/Ljubljana', + 'Europe/London', +@@ -1477,7 +1476,6 @@ common_timezones = \ + 'Europe/Tallinn', + 'Europe/Tirane', + 'Europe/Ulyanovsk', +- 'Europe/Uzhgorod', + 'Europe/Vaduz', + 'Europe/Vatican', + 'Europe/Vienna', +@@ -1485,7 +1483,6 @@ common_timezones = \ + 'Europe/Volgograd', + 'Europe/Warsaw', + 'Europe/Zagreb', +- 'Europe/Zaporozhye', + 'Europe/Zurich', + 'GMT', + 'Indian/Antananarivo', +@@ -1506,7 +1503,6 @@ common_timezones = \ + 'Pacific/Chuuk', + 'Pacific/Easter', + 'Pacific/Efate', +- 'Pacific/Enderbury', + 'Pacific/Fakaofo', + 'Pacific/Fiji', + 'Pacific/Funafuti', +@@ -1515,6 +1511,7 @@ common_timezones = \ + 'Pacific/Guadalcanal', + 'Pacific/Guam', + 'Pacific/Honolulu', ++ 'Pacific/Kanton', + 'Pacific/Kiritimati', + 'Pacific/Kosrae', + 'Pacific/Kwajalein', +diff --git a/pytz/tests/test_tzinfo.py b/pytz/tests/test_tzinfo.py +index d426400..1a5b97f 100644 +--- a/pytz/tests/test_tzinfo.py ++++ b/pytz/tests/test_tzinfo.py +@@ -28,7 +28,7 @@ from pytz.tzinfo import DstTzInfo, StaticTzInfo # noqa + # I test for expected version to ensure the correct version of pytz is + # actually being tested. + EXPECTED_VERSION = '2019.3' +-EXPECTED_OLSON_VERSION = '2019c' ++EXPECTED_OLSON_VERSION = '2022f' + + fmt = '%Y-%m-%d %H:%M:%S %Z%z' +