From 104ebcf60097298ae8cfc95059c0abb6f335fdc4 Mon Sep 17 00:00:00 2001 From: MarcoGorelli <> Date: Thu, 22 Dec 2022 13:56:38 +0000 Subject: [PATCH 1/2] xfail --- pandas/compat/numpy/__init__.py | 1 + pandas/tests/series/test_constructors.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/pandas/compat/numpy/__init__.py b/pandas/compat/numpy/__init__.py index 60ec74553a207..6f31358dabe86 100644 --- a/pandas/compat/numpy/__init__.py +++ b/pandas/compat/numpy/__init__.py @@ -9,6 +9,7 @@ np_version_under1p21 = _nlv < Version("1.21") np_version_under1p22 = _nlv < Version("1.22") np_version_gte1p22 = _nlv >= Version("1.22") +np_version_gte1p24 = _nlv >= Version("1.24") is_numpy_dev = _nlv.dev is not None _min_numpy_ver = "1.20.3" diff --git a/pandas/tests/series/test_constructors.py b/pandas/tests/series/test_constructors.py index 53b2cbedc0ae3..14b63615c0c61 100644 --- a/pandas/tests/series/test_constructors.py +++ b/pandas/tests/series/test_constructors.py @@ -14,6 +14,7 @@ lib, ) from pandas.compat import is_numpy_dev +from pandas.compat.numpy import np_version_gte1p24 import pandas.util._test_decorators as td from pandas.core.dtypes.common import ( @@ -732,6 +733,7 @@ def test_constructor_cast(self): with pytest.raises(ValueError, match=msg): Series(["a", "b", "c"], dtype=float) + @pytest.mark.xfail(np_version_gte1p24, reason="GH49777") def test_constructor_signed_int_overflow_deprecation(self): # GH#41734 disallow silent overflow msg = "Values are too large to be losslessly cast" From 2b1a0ca7248963cfbd3e36f81d7e64104736106f Mon Sep 17 00:00:00 2001 From: MarcoGorelli <> Date: Thu, 22 Dec 2022 19:44:25 +0000 Subject: [PATCH 2/2] add not is64 to xfail --- pandas/tests/series/test_constructors.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pandas/tests/series/test_constructors.py b/pandas/tests/series/test_constructors.py index 14b63615c0c61..e4ab5ef596440 100644 --- a/pandas/tests/series/test_constructors.py +++ b/pandas/tests/series/test_constructors.py @@ -13,7 +13,10 @@ iNaT, lib, ) -from pandas.compat import is_numpy_dev +from pandas.compat import ( + IS64, + is_numpy_dev, +) from pandas.compat.numpy import np_version_gte1p24 import pandas.util._test_decorators as td @@ -733,7 +736,7 @@ def test_constructor_cast(self): with pytest.raises(ValueError, match=msg): Series(["a", "b", "c"], dtype=float) - @pytest.mark.xfail(np_version_gte1p24, reason="GH49777") + @pytest.mark.xfail(np_version_gte1p24 and not IS64, reason="GH49777") def test_constructor_signed_int_overflow_deprecation(self): # GH#41734 disallow silent overflow msg = "Values are too large to be losslessly cast"