From 632e24d62e085a966cffab2141c4a3657976c561 Mon Sep 17 00:00:00 2001 From: cmp0xff Date: Sun, 19 Oct 2025 22:51:40 +0200 Subject: [PATCH 1/7] test in py314 --- .github/workflows/test.yml | 2 +- pyproject.toml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8fc7aab93..4c89df3f6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,7 @@ jobs: matrix: # macos-latest is arm os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ["3.10", "3.11", "3.12", "3.13"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] name: OS ${{ matrix.os }} - Python ${{ matrix.python-version }} diff --git a/pyproject.toml b/pyproject.toml index f1223bc0b..eb8f78103 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,6 +20,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Topic :: Scientific/Engineering", "Typing :: Stubs Only", ] From eb9cc7a89d5de5e962a6c2adfa81c0189050ccfc Mon Sep 17 00:00:00 2001 From: cmp0xff Date: Fri, 24 Oct 2025 15:54:03 +0200 Subject: [PATCH 2/7] drop tables --- pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index eb8f78103..126050a06 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,7 +34,7 @@ exclude = [ "pandas-stubs/__init__.py" ] [tool.poetry.dependencies] python = ">=3.10" types-pytz = ">= 2022.1.1" -numpy = ">= 1.23.5" +numpy = ">=1.23.5" [tool.poetry.group.dev.dependencies] mypy = ">=1.18.2" @@ -52,7 +52,7 @@ pre-commit = ">=2.19.0" black = ">=25.9.0" isort = ">=6.0.1" openpyxl = ">=3.0.10" -tables = { version = ">=3.10.1", python = "<4" } +numexpr = ">=2.13.1" lxml = ">=4.9.1" pyreadstat = ">=1.2.0" xlrd = ">=2.0.1" @@ -62,7 +62,7 @@ odfpy = ">=1.4.1" xarray = ">=22.6.0" tabulate = ">=0.8.10" jinja2 = ">=3.1" -scipy = { version = ">=1.9.1", python = "<3.14" } +scipy = ">=1.9.1" scipy-stubs = ">=1.15.3.0" SQLAlchemy = ">=2.0.39" types-python-dateutil = ">=2.8.19" From 45f3927d5600552c3f060e5f35ca526a88bd9408 Mon Sep 17 00:00:00 2001 From: cmp0xff Date: Fri, 24 Oct 2025 16:08:24 +0200 Subject: [PATCH 3/7] Roche/pyreadstat#310 skip pyreadstat --- pyproject.toml | 2 +- tests/test_io.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 126050a06..74c5c1cad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ isort = ">=6.0.1" openpyxl = ">=3.0.10" numexpr = ">=2.13.1" lxml = ">=4.9.1" -pyreadstat = ">=1.2.0" +pyreadstat = { version = ">=1.2.0", python = "<3.14" } xlrd = ">=2.0.1" xlsxwriter = ">=3.0.3" pyxlsb = ">=1.0.10" diff --git a/tests/test_io.py b/tests/test_io.py index ff5bb5850..0627dc580 100644 --- a/tests/test_io.py +++ b/tests/test_io.py @@ -6,6 +6,7 @@ import pathlib from pathlib import Path import sqlite3 +import sys from typing import ( TYPE_CHECKING, Any, @@ -427,6 +428,7 @@ def test_hdf_series() -> None: check(assert_type(read_hdf(path, "s"), DataFrame | Series), Series) +@pytest.mark.xfail(sys.version_info >= (3, 11), reason="pyreadstat 1.3.1 does not support py314 Roche/pyreadstat#310") def test_spss() -> None: path = Path(CWD, "data", "labelled-num.sav") check( From 45f9b3d9940ad29322fbb75766e40fdac0856380 Mon Sep 17 00:00:00 2001 From: cmp0xff Date: Fri, 24 Oct 2025 16:17:54 +0200 Subject: [PATCH 4/7] typo and black --- tests/test_io.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_io.py b/tests/test_io.py index 0627dc580..f07a35845 100644 --- a/tests/test_io.py +++ b/tests/test_io.py @@ -428,7 +428,10 @@ def test_hdf_series() -> None: check(assert_type(read_hdf(path, "s"), DataFrame | Series), Series) -@pytest.mark.xfail(sys.version_info >= (3, 11), reason="pyreadstat 1.3.1 does not support py314 Roche/pyreadstat#310") +@pytest.mark.xfail( + sys.version_info >= (3, 14), + reason="pyreadstat 1.3.1 does not support py314 Roche/pyreadstat#310", +) def test_spss() -> None: path = Path(CWD, "data", "labelled-num.sav") check( From 31a5eee3a6a97f7f31fa0401503ede4e0cf1d1bc Mon Sep 17 00:00:00 2001 From: cmp0xff Date: Sun, 26 Oct 2025 00:22:14 +0200 Subject: [PATCH 5/7] chore: poetry --- pyproject.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f51576b4a..0d40952c0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,9 +41,9 @@ mypy = ">=1.18.2" pandas = "2.3.2" pyarrow = ">=10.0.1" pytest = ">=8.4.2" -pyright = ">=1.1.406" -ty = ">=0.0.1a21" -pyrefly = ">=0.36.1" +pyright = ">=1.1.407" +ty = ">=0.0.1a24" +pyrefly = ">=0.38.2" poethepoet = ">=0.16.5" loguru = ">=0.6.0" typing-extensions = ">=4.4.0" @@ -54,7 +54,7 @@ isort = ">=6.0.1" openpyxl = ">=3.0.10" numexpr = ">=2.13.1" lxml = ">=4.9.1" -pyreadstat = { version = ">=1.2.0", python = "<3.14" } +pyreadstat = { version = ">=1.2.0", python = "<3.14" } # TODO: Roche/pyreadstat#310 xlrd = ">=2.0.1" xlsxwriter = ">=3.0.3" pyxlsb = ">=1.0.10" From 67ca19157a44de2fe92ef8b24ed60aea99c0cd87 Mon Sep 17 00:00:00 2001 From: cmp0xff Date: Sun, 26 Oct 2025 00:22:39 +0200 Subject: [PATCH 6/7] pandas-dev/pandas#61368 --- tests/series/test_series.py | 4 ++++ tests/test_api_typing.py | 4 ++++ tests/test_frame.py | 12 ++++++++++++ tests/test_io.py | 6 ++++++ tests/test_pandas.py | 10 ++++++++++ 5 files changed, 36 insertions(+) diff --git a/tests/series/test_series.py b/tests/series/test_series.py index d94b54312..73bc51bb5 100644 --- a/tests/series/test_series.py +++ b/tests/series/test_series.py @@ -13,6 +13,7 @@ from pathlib import Path import platform import re +import sys from typing import ( TYPE_CHECKING, Any, @@ -3196,6 +3197,9 @@ def test_rank() -> None: ) +@pytest.mark.xfail( + sys.version_info >= (3, 14), reason="sys.getrefcount pandas-dev/pandas#61368" +) def test_series_setitem_multiindex() -> None: # GH 767 df = ( diff --git a/tests/test_api_typing.py b/tests/test_api_typing.py index 5b01be922..a57dfa670 100644 --- a/tests/test_api_typing.py +++ b/tests/test_api_typing.py @@ -1,5 +1,6 @@ """Test module for classes in pandas.api.typing.""" +import sys from typing import TypeAlias import numpy as np @@ -204,6 +205,9 @@ def f1(gb: Window) -> None: f1(ser.rolling(2, win_type="gaussian")) +@pytest.mark.xfail( + sys.version_info >= (3, 14), reason="sys.getrefcount pandas-dev/pandas#61368" +) def test_statereader() -> None: df = pd.DataFrame([[1, 2], [3, 4]], columns=["col_1", "col_2"]) time_stamp = pd.Timestamp(2000, 2, 29, 14, 21) diff --git a/tests/test_frame.py b/tests/test_frame.py index 5ebed2bc2..4ce5efbca 100644 --- a/tests/test_frame.py +++ b/tests/test_frame.py @@ -381,6 +381,9 @@ def test_types_assign() -> None: check(assert_type(df.assign(a=[], b=()), pd.DataFrame), pd.DataFrame) +@pytest.mark.xfail( + sys.version_info >= (3, 14), reason="sys.getrefcount pandas-dev/pandas#61368" +) def test_assign() -> None: df = pd.DataFrame({"a": [1, 2, 3], 1: [4, 5, 6]}) @@ -2833,6 +2836,9 @@ def test_indexslice_setitem() -> None: df.loc[pd.IndexSlice[pd.Index([2, 3]), :], "z"] = 99 +@pytest.mark.xfail( + sys.version_info >= (3, 14), reason="sys.getrefcount pandas-dev/pandas#61368" +) def test_indexslice_getitem() -> None: # GH 300 df = ( @@ -4426,6 +4432,9 @@ def test_getitem_dict_keys() -> None: check(assert_type(df[some_columns.keys()], pd.DataFrame), pd.DataFrame) +@pytest.mark.xfail( + sys.version_info >= (3, 14), reason="sys.getrefcount pandas-dev/pandas#61368" +) def test_frame_setitem_na() -> None: # GH 743 df = pd.DataFrame( @@ -4556,6 +4565,9 @@ def _constructor(self) -> type[MyClass]: check(assert_type(df[["a", "b"]], MyClass), MyClass) +@pytest.mark.xfail( + sys.version_info >= (3, 14), reason="sys.getrefcount pandas-dev/pandas#61368" +) def test_hashable_args() -> None: # GH 1104 df = pd.DataFrame([["abc"]], columns=["test"], index=["ind"]) diff --git a/tests/test_io.py b/tests/test_io.py index f07a35845..20852e395 100644 --- a/tests/test_io.py +++ b/tests/test_io.py @@ -175,12 +175,18 @@ def test_to_pickle_series() -> None: check(assert_type(read_pickle(path), Any), Series) +@pytest.mark.xfail( + sys.version_info >= (3, 14), reason="sys.getrefcount pandas-dev/pandas#61368" +) def test_read_stata_df() -> None: with ensure_clean() as path: DF.to_stata(path) check(assert_type(read_stata(path), pd.DataFrame), pd.DataFrame) +@pytest.mark.xfail( + sys.version_info >= (3, 14), reason="sys.getrefcount pandas-dev/pandas#61368" +) def test_read_stata_iterator() -> None: with ensure_clean() as path: str_path = str(path) diff --git a/tests/test_pandas.py b/tests/test_pandas.py index ff4289c2e..af442375b 100644 --- a/tests/test_pandas.py +++ b/tests/test_pandas.py @@ -2,6 +2,7 @@ import datetime as dt import random +import sys from typing import ( TYPE_CHECKING, Any, @@ -822,6 +823,9 @@ def test_to_numeric_array_series() -> None: ) +@pytest.mark.xfail( + sys.version_info >= (3, 14), reason="sys.getrefcount pandas-dev/pandas#61368" +) def test_wide_to_long() -> None: df = pd.DataFrame( { @@ -1145,6 +1149,9 @@ def test_qcut() -> None: check(assert_type(j1, npt.NDArray[np.double]), np.ndarray) +@pytest.mark.xfail( + sys.version_info >= (3, 14), reason="sys.getrefcount pandas-dev/pandas#61368" +) def test_merge() -> None: ls = pd.Series([1, 2, 3, 4], index=[1, 2, 3, 4], name="left") rs = pd.Series([3, 4, 5, 6], index=[3, 4, 5, 6], name="right") @@ -1307,6 +1314,9 @@ def test_merge() -> None: ) +@pytest.mark.xfail( + sys.version_info >= (3, 14), reason="sys.getrefcount pandas-dev/pandas#61368" +) def test_merge_ordered() -> None: ls = pd.Series([1, 2, 3, 4], index=[1, 2, 3, 4], name="left") rs = pd.Series([3, 4, 5, 6], index=[3, 4, 5, 6], name="right") From 365872049569c046e6ee8b90685618dab221b51a Mon Sep 17 00:00:00 2001 From: cmp0xff Date: Mon, 27 Oct 2025 09:53:32 +0100 Subject: [PATCH 7/7] bump pandas version --- .pre-commit-config.yaml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b44edb1f3..be433f52b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ ci: autofix_prs: false repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.1 + rev: v0.14.2 hooks: - id: ruff-check args: [--exit-non-zero-on-fix] diff --git a/pyproject.toml b/pyproject.toml index 0d40952c0..c9398b84d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ numpy = ">=1.23.5" [tool.poetry.group.dev.dependencies] mypy = ">=1.18.2" -pandas = "2.3.2" +pandas = "2.3.3" pyarrow = ">=10.0.1" pytest = ">=8.4.2" pyright = ">=1.1.407"