diff -Nru python-tz-2022.1/debian/changelog python-tz-2022.1/debian/changelog --- python-tz-2022.1/debian/changelog 2022-03-24 10:41:27.000000000 +0100 +++ python-tz-2022.1/debian/changelog 2022-11-16 15:19:43.000000000 +0100 @@ -1,3 +1,10 @@ +python-tz (2022.1-1ubuntu0.22.04.0) jammy; urgency=medium + + * test: Revert inclusion of PACKRATDATA=backzone + * Update timezones to tzdata 2022f (LP: #1995864) + + -- Benjamin Drung Wed, 16 Nov 2022 15:19:43 +0100 + python-tz (2022.1-1) unstable; urgency=medium * New upstream release diff -Nru python-tz-2022.1/debian/patches/Revert-inclusion-of-PACKRATDATA-backzone.patch python-tz-2022.1/debian/patches/Revert-inclusion-of-PACKRATDATA-backzone.patch --- python-tz-2022.1/debian/patches/Revert-inclusion-of-PACKRATDATA-backzone.patch 1970-01-01 01:00:00.000000000 +0100 +++ python-tz-2022.1/debian/patches/Revert-inclusion-of-PACKRATDATA-backzone.patch 2022-11-16 15:19:43.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.rst | 2 +- + pytz/tests/test_tzinfo.py | 47 ----------------------------------------------- + 2 files changed, 1 insertion(+), 48 deletions(-) + +diff --git a/README.rst b/README.rst +index 1437ead..9eaa98c 100644 +--- a/README.rst ++++ b/README.rst +@@ -91,7 +91,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 7d09617..1d67de6 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-2022.1/debian/patches/series python-tz-2022.1/debian/patches/series --- python-tz-2022.1/debian/patches/series 2022-03-24 10:41:27.000000000 +0100 +++ python-tz-2022.1/debian/patches/series 2022-11-16 15:19:43.000000000 +0100 @@ -1 +1,3 @@ tzdata +Revert-inclusion-of-PACKRATDATA-backzone.patch +Update-timezones-to-tzdata-2022f.patch diff -Nru python-tz-2022.1/debian/patches/Update-timezones-to-tzdata-2022f.patch python-tz-2022.1/debian/patches/Update-timezones-to-tzdata-2022f.patch --- python-tz-2022.1/debian/patches/Update-timezones-to-tzdata-2022f.patch 1970-01-01 01:00:00.000000000 +0100 +++ python-tz-2022.1/debian/patches/Update-timezones-to-tzdata-2022f.patch 2022-11-16 15:19:43.000000000 +0100 @@ -0,0 +1,97 @@ +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 | 10 +++------- + pytz/tests/test_tzinfo.py | 2 +- + 2 files changed, 4 insertions(+), 8 deletions(-) + +diff --git a/pytz/__init__.py b/pytz/__init__.py +index 5a1b816..3636bdf 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 = '2022a' ++OLSON_VERSION = '2022f' + VERSION = '2022.1' # pip compatible version number. + __version__ = VERSION + +@@ -964,6 +964,7 @@ all_timezones = \ + 'Europe/Kaliningrad', + 'Europe/Kiev', + 'Europe/Kirov', ++ 'Europe/Kyiv', + 'Europe/Lisbon', + 'Europe/Ljubljana', + 'Europe/London', +@@ -1266,7 +1267,6 @@ common_timezones = \ + 'America/Montserrat', + 'America/Nassau', + 'America/New_York', +- 'America/Nipigon', + 'America/Nome', + 'America/Noronha', + 'America/North_Dakota/Beulah', +@@ -1283,7 +1283,6 @@ common_timezones = \ + 'America/Porto_Velho', + 'America/Puerto_Rico', + 'America/Punta_Arenas', +- 'America/Rainy_River', + 'America/Rankin_Inlet', + 'America/Recife', + 'America/Regina', +@@ -1304,7 +1303,6 @@ common_timezones = \ + 'America/Swift_Current', + 'America/Tegucigalpa', + 'America/Thule', +- 'America/Thunder_Bay', + 'America/Tijuana', + 'America/Toronto', + 'America/Tortola', +@@ -1456,8 +1454,8 @@ common_timezones = \ + 'Europe/Istanbul', + 'Europe/Jersey', + 'Europe/Kaliningrad', +- 'Europe/Kiev', + 'Europe/Kirov', ++ 'Europe/Kyiv', + 'Europe/Lisbon', + 'Europe/Ljubljana', + 'Europe/London', +@@ -1485,7 +1483,6 @@ common_timezones = \ + 'Europe/Tallinn', + 'Europe/Tirane', + 'Europe/Ulyanovsk', +- 'Europe/Uzhgorod', + 'Europe/Vaduz', + 'Europe/Vatican', + 'Europe/Vienna', +@@ -1493,7 +1490,6 @@ common_timezones = \ + 'Europe/Volgograd', + 'Europe/Warsaw', + 'Europe/Zagreb', +- 'Europe/Zaporozhye', + 'Europe/Zurich', + 'GMT', + 'Indian/Antananarivo', +diff --git a/pytz/tests/test_tzinfo.py b/pytz/tests/test_tzinfo.py +index 1d67de6..6cb2d3d 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 = '2022.1' +-EXPECTED_OLSON_VERSION = '2022a' ++EXPECTED_OLSON_VERSION = '2022f' + + fmt = '%Y-%m-%d %H:%M:%S %Z%z' +