diff --git a/pyproject.toml b/pyproject.toml index 0259c3e7d..e823708d5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ pytest = ">=7.1.2" pyright = ">=1.1.286" poethepoet = ">=0.16.5" loguru = ">=0.6.0" -pandas = "1.5.2" +pandas = "1.5.3" numpy = ">=1.24.1" typing-extensions = ">=4.2.0" matplotlib = ">=3.5.1" diff --git a/tests/test_frame.py b/tests/test_frame.py index e31c05a21..527e3ff5a 100644 --- a/tests/test_frame.py +++ b/tests/test_frame.py @@ -6,7 +6,6 @@ import io import itertools from pathlib import Path -import platform from typing import ( TYPE_CHECKING, Any, @@ -2081,15 +2080,7 @@ class MyDataFrame(pd.DataFrame, Generic[T]): def func() -> MyDataFrame[int]: return MyDataFrame[int]({"foo": [1, 2, 3]}) - # This should be fixed in pandas 1.5.2, if - # https://github.com/pandas-dev/pandas/pull/49736 is included - with pytest_warns_bounded( - UserWarning, - "Pandas doesn't allow columns to be created", - lower="3.10.99", - version_str=platform.python_version(), - ): - func() + func() def test_to_xarray(): diff --git a/tests/test_pandas.py b/tests/test_pandas.py index b16daf65d..3ab353d36 100644 --- a/tests/test_pandas.py +++ b/tests/test_pandas.py @@ -13,7 +13,6 @@ import pandas as pd from pandas import Grouper from pandas.api.extensions import ExtensionArray -from pandas.util.version import Version import pytest from typing_extensions import assert_type @@ -1448,7 +1447,7 @@ def test_crosstab_args() -> None: ) with pytest_warns_bounded( FutureWarning, - "pivot_table dropped a column because", + r"The operation.*failed on a column", upper="1.5.99", upper_exception=TypeError, ): @@ -1706,7 +1705,8 @@ def test_pivot_table() -> None: ), pd.DataFrame, ) - if Version(np.__version__) <= Version("1.23.5"): + if PD_LTE_15: + # Nightly builds failing since 1/12/2023, but this is fixed since then check( assert_type( pd.pivot_table(