Skip to content

Commit 0fdc62f

Browse files
GH1089 Fix pandas nightly with new warnings on copy (#1152)
* GH1089 Fix pandas nightly with new warnings on copy * GH1089 PR Feedback * GH1089 PR Feedback * GH1089 PR Feedback * GH1089 Block update of sqlalchemy
1 parent f6f7bb0 commit 0fdc62f

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pyright = ">=1.1.396"
4343
poethepoet = ">=0.16.5"
4444
loguru = ">=0.6.0"
4545
typing-extensions = ">=4.4.0"
46-
matplotlib = ">=3.6.3"
46+
matplotlib = ">=3.10.1"
4747
pre-commit = ">=2.19.0"
4848
black = ">=23.3.0"
4949
isort = ">=5.12.0"
@@ -59,7 +59,7 @@ xarray = ">=22.6.0"
5959
tabulate = ">=0.8.10"
6060
jinja2 = ">=3.1"
6161
scipy = { version = ">=1.9.1", python = "<3.14" }
62-
SQLAlchemy = ">=2.0.12"
62+
SQLAlchemy = ">=2.0.12,<2.0.39"
6363
types-python-dateutil = ">=2.8.19"
6464
beautifulsoup4 = ">=4.12.2"
6565
html5lib = ">=1.1"

tests/test_frame.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -4012,7 +4012,6 @@ def test_hashable_args() -> None:
40124012
df.columns = ["test"] # type: ignore[assignment]
40134013

40144014
testDict = {"test": 1}
4015-
40164015
with ensure_clean() as path:
40174016
df.to_string(path, col_space=testDict)
40184017
df.to_string(path, col_space={"test": 1})
@@ -4027,7 +4026,14 @@ def test_transpose() -> None:
40274026
df = pd.DataFrame({"a": [1, 1, 2], "b": [4, 5, 6]})
40284027
check(assert_type(df.transpose(), pd.DataFrame), pd.DataFrame)
40294028
check(assert_type(df.transpose(None), pd.DataFrame), pd.DataFrame)
4030-
check(assert_type(df.transpose(copy=True), pd.DataFrame), pd.DataFrame)
4029+
4030+
msg = "The copy keyword is deprecated and will be removed in a future"
4031+
with pytest_warns_bounded(
4032+
DeprecationWarning,
4033+
msg,
4034+
lower="2.2.99",
4035+
):
4036+
check(assert_type(df.transpose(copy=True), pd.DataFrame), pd.DataFrame)
40314037

40324038

40334039
def test_combine() -> None:

tests/test_series.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -3578,6 +3578,14 @@ def test_align() -> None:
35783578
aligned_s0, aligned_s1 = s0.align(s1)
35793579
check(assert_type(aligned_s0, pd.Series), pd.Series)
35803580
check(assert_type(aligned_s1, pd.Series), pd.Series)
3581-
aligned_s0, aligned_s1 = s0.align(s1, fill_value=0, axis=0, level=0, copy=False)
3581+
3582+
msg = "The copy keyword is deprecated and will be removed in a future version.*"
3583+
with pytest_warns_bounded(
3584+
DeprecationWarning,
3585+
msg,
3586+
lower="2.2.99",
3587+
):
3588+
aligned_s0, aligned_s1 = s0.align(s1, fill_value=0, axis=0, level=0, copy=False)
3589+
35823590
check(assert_type(aligned_s0, pd.Series), pd.Series)
35833591
check(assert_type(aligned_s1, pd.Series), pd.Series)

0 commit comments

Comments
 (0)