From 1280b52c8ac8c2e6ce5107bbb42193793452f254 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Fri, 12 Aug 2022 12:14:07 -0700 Subject: [PATCH 1/6] CI/DEBUG: Debug 32 bit build due to pytz upgrade --- .github/workflows/32-bit-linux.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/32-bit-linux.yml b/.github/workflows/32-bit-linux.yml index e091160c952f8..fc855181ffa51 100644 --- a/.github/workflows/32-bit-linux.yml +++ b/.github/workflows/32-bit-linux.yml @@ -41,6 +41,7 @@ jobs: pip install cython numpy python-dateutil pytz pytest pytest-xdist pytest-asyncio>=0.17 hypothesis && \ python setup.py build_ext -q -j2 && \ python -m pip install --no-build-isolation --no-use-pep517 -e . && \ + python -m pip list && \ export PANDAS_CI=1 && \ pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas --junitxml=test-data.xml" From 12a1c61513ca0dcd26ae15381b837747159f445f Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Fri, 12 Aug 2022 12:53:25 -0700 Subject: [PATCH 2/6] Add interval where the data was good --- pandas/tests/tseries/offsets/test_dst.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pandas/tests/tseries/offsets/test_dst.py b/pandas/tests/tseries/offsets/test_dst.py index 50c5a91fc2390..7f1fef0a55a81 100644 --- a/pandas/tests/tseries/offsets/test_dst.py +++ b/pandas/tests/tseries/offsets/test_dst.py @@ -32,6 +32,9 @@ from pandas.tests.tseries.offsets.test_offsets import get_utc_offset_hours +# error: Module has no attribute "__version__" +pytz_version = float(pytz.__version__) # type: ignore[attr-defined] + class TestDST: @@ -186,9 +189,8 @@ def test_all_offset_classes(self, tup): MonthBegin(66), "Africa/Kinshasa", marks=pytest.mark.xfail( - # error: Module has no attribute "__version__" - float(pytz.__version__) <= 2020.1, # type: ignore[attr-defined] - reason="GH#41906", + not (2020.5 <= pytz_version <= 2022.1), + reason="GH#41906: pytz utc transition dates changed", ), ), ( From acd2f2bace07ceb39d5e15efa567632f3090025a Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Fri, 12 Aug 2022 15:02:04 -0700 Subject: [PATCH 3/6] Remove debug line --- .github/workflows/32-bit-linux.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/32-bit-linux.yml b/.github/workflows/32-bit-linux.yml index fc855181ffa51..e091160c952f8 100644 --- a/.github/workflows/32-bit-linux.yml +++ b/.github/workflows/32-bit-linux.yml @@ -41,7 +41,6 @@ jobs: pip install cython numpy python-dateutil pytz pytest pytest-xdist pytest-asyncio>=0.17 hypothesis && \ python setup.py build_ext -q -j2 && \ python -m pip install --no-build-isolation --no-use-pep517 -e . && \ - python -m pip list && \ export PANDAS_CI=1 && \ pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas --junitxml=test-data.xml" From f5a5c068703319ac0a0cce56acb2b1d3bfa6eda1 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Fri, 12 Aug 2022 22:57:07 -0700 Subject: [PATCH 4/6] Trigger CI From 8686a07c3247030bb49a163682e7ad8df174f802 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Sat, 13 Aug 2022 12:14:39 -0700 Subject: [PATCH 5/6] pytz bumped again; use Version --- pandas/tests/tseries/offsets/test_dst.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandas/tests/tseries/offsets/test_dst.py b/pandas/tests/tseries/offsets/test_dst.py index 7f1fef0a55a81..59348cc7b2002 100644 --- a/pandas/tests/tseries/offsets/test_dst.py +++ b/pandas/tests/tseries/offsets/test_dst.py @@ -31,9 +31,10 @@ ) from pandas.tests.tseries.offsets.test_offsets import get_utc_offset_hours +from pandas.util.version import Version # error: Module has no attribute "__version__" -pytz_version = float(pytz.__version__) # type: ignore[attr-defined] +pytz_version = Version(pytz.__version__) # type: ignore[attr-defined] class TestDST: @@ -189,7 +190,7 @@ def test_all_offset_classes(self, tup): MonthBegin(66), "Africa/Kinshasa", marks=pytest.mark.xfail( - not (2020.5 <= pytz_version <= 2022.1), + not (Version("2020.5") <= pytz_version <= Version("2022.1")), reason="GH#41906: pytz utc transition dates changed", ), ), From 0bb4a4ad11e8b2cc70f9a51636351852a2a37caf Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Sat, 13 Aug 2022 20:40:58 -0700 Subject: [PATCH 6/6] Change condition --- pandas/tests/tseries/offsets/test_dst.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tests/tseries/offsets/test_dst.py b/pandas/tests/tseries/offsets/test_dst.py index 59348cc7b2002..9c6d6a686e9a5 100644 --- a/pandas/tests/tseries/offsets/test_dst.py +++ b/pandas/tests/tseries/offsets/test_dst.py @@ -190,7 +190,7 @@ def test_all_offset_classes(self, tup): MonthBegin(66), "Africa/Kinshasa", marks=pytest.mark.xfail( - not (Version("2020.5") <= pytz_version <= Version("2022.1")), + pytz_version < Version("2020.5") or pytz_version == Version("2022.2"), reason="GH#41906: pytz utc transition dates changed", ), ),