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..e4ab5ef596440 100644 --- a/pandas/tests/series/test_constructors.py +++ b/pandas/tests/series/test_constructors.py @@ -13,7 +13,11 @@ 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 from pandas.core.dtypes.common import ( @@ -732,6 +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 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"