Closed MarcoGorelli closed 1 year ago
2023-01-12T15:06:13.2825883Z =================================== FAILURES =================================== 2023-01-12T15:06:13.2826266Z ___ TestSeriesConstructors.test_constructor_signed_int_overflow_deprecation ____ 2023-01-12T15:06:13.2826947Z [gw1] linux -- Python 3.11.1 /opt/hostedtoolcache/Python/3.11.1/x64/bin/python 2023-01-12T15:06:13.2827156Z 2023-01-12T15:06:13.2827411Z self = <pandas.tests.series.test_constructors.TestSeriesConstructors object at 0x7fe8a2113f10> 2023-01-12T15:06:13.2827672Z 2023-01-12T15:06:13.2827831Z @pytest.mark.xfail(np_version_gte1p24 and not IS64, reason="GH49777") 2023-01-12T15:06:13.2828180Z def test_constructor_signed_int_overflow_deprecation(self): 2023-01-12T15:06:13.2828594Z # GH#41734 disallow silent overflow 2023-01-12T15:06:13.2828878Z msg = "Values are too large to be losslessly cast" 2023-01-12T15:06:13.2829190Z numpy_warning = DeprecationWarning if is_numpy_dev else None 2023-01-12T15:06:13.2829490Z > with tm.assert_produces_warning( 2023-01-12T15:06:13.2829805Z (FutureWarning, numpy_warning), match=msg, check_stacklevel=False 2023-01-12T15:06:13.2830057Z ): 2023-01-12T15:06:13.2830172Z 2023-01-12T15:06:13.2830310Z pandas/tests/series/test_constructors.py:744: 2023-01-12T15:06:13.2830588Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2023-01-12T15:06:13.2830917Z /opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/contextlib.py:144: in __exit__ 2023-01-12T15:06:13.2831194Z next(self.gen) 2023-01-12T15:06:13.2831427Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2023-01-12T15:06:13.2831574Z 2023-01-12T15:06:13.2831697Z def _assert_caught_expected_warning( 2023-01-12T15:06:13.2831904Z *, 2023-01-12T15:06:13.2832229Z caught_warnings: Sequence[warnings.WarningMessage], 2023-01-12T15:06:13.2832526Z expected_warning: type[Warning], 2023-01-12T15:06:13.2832753Z match: str | None, 2023-01-12T15:06:13.2832977Z check_stacklevel: bool, 2023-01-12T15:06:13.2833227Z ) -> None: 2023-01-12T15:06:13.2833499Z """Assert that there was the expected warning among the caught warnings.""" 2023-01-12T15:06:13.2833787Z saw_warning = False 2023-01-12T15:06:13.2834011Z matched_message = False 2023-01-12T15:06:13.2834241Z unmatched_messages = [] 2023-01-12T15:06:13.2834802Z 2023-01-12T15:06:13.2835030Z for actual_warning in caught_warnings: 2023-01-12T15:06:13.2835342Z > if issubclass(actual_warning.category, expected_warning): 2023-01-12T15:06:13.2835689Z E TypeError: issubclass() arg 2 must be a class, a tuple of classes, or a union 2023-01-12T15:06:13.2835897Z 2023-01-12T15:06:13.2836026Z pandas/_testing/_warnings.py:130: TypeError
Attempting to fix in https://github.com/pandas-dev/pandas/pull/50686
Closed by 50686