Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
17 changes: 9 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
Expand All @@ -33,16 +34,16 @@ 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"
pandas = "2.3.2"
pandas = "2.3.3"
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"
Expand All @@ -51,17 +52,17 @@ 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"
pyreadstat = { version = ">=1.2.0", python = "<3.14" } # TODO: Roche/pyreadstat#310
xlrd = ">=2.0.1"
xlsxwriter = ">=3.0.3"
pyxlsb = ">=1.0.10"
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"
Expand Down
4 changes: 4 additions & 0 deletions tests/series/test_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from pathlib import Path
import platform
import re
import sys
from typing import (
TYPE_CHECKING,
Any,
Expand Down Expand Up @@ -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 = (
Expand Down
4 changes: 4 additions & 0 deletions tests/test_api_typing.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Test module for classes in pandas.api.typing."""

import sys
from typing import TypeAlias

import numpy as np
Expand Down Expand Up @@ -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)
Expand Down
12 changes: 12 additions & 0 deletions tests/test_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]})

Expand Down Expand Up @@ -2838,6 +2841,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 = (
Expand Down Expand Up @@ -4431,6 +4437,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(
Expand Down Expand Up @@ -4561,6 +4570,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"])
Expand Down
11 changes: 11 additions & 0 deletions tests/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import pathlib
from pathlib import Path
import sqlite3
import sys
from typing import (
TYPE_CHECKING,
Any,
Expand Down Expand Up @@ -174,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)
Expand Down Expand Up @@ -427,6 +434,10 @@ def test_hdf_series() -> None:
check(assert_type(read_hdf(path, "s"), DataFrame | Series), Series)


@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(
Expand Down
10 changes: 10 additions & 0 deletions tests/test_pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import datetime as dt
import random
import sys
from typing import (
TYPE_CHECKING,
Any,
Expand Down Expand Up @@ -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(
{
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down