Skip to content

Commit 63d75c8

Browse files
committed
CI: test on 3.12
1 parent c0ca527 commit 63d75c8

File tree

4 files changed

+20
-6
lines changed

4 files changed

+20
-6
lines changed

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
os: [ubuntu-latest, windows-latest, macos-latest]
21-
python-version: ['3.9', '3.10', '3.11']
21+
python-version: ['3.9', '3.10', '3.11', '3.12']
2222

2323
steps:
2424
- uses: actions/checkout@v3

pandas-stubs/_libs/tslibs/timestamps.pyi

+11-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ from datetime import (
66
timedelta,
77
tzinfo as _tzinfo,
88
)
9+
import sys
910
from time import struct_time
1011
from typing import (
1112
ClassVar,
@@ -99,8 +100,16 @@ class Timestamp(datetime):
99100
def tz(self) -> _tzinfo | None: ...
100101
@property
101102
def fold(self) -> int: ...
102-
@classmethod
103-
def fromtimestamp(cls, t: float, tz: _tzinfo | str | None = ...) -> Self: ...
103+
104+
if sys.version_info < (3, 12):
105+
@classmethod
106+
def fromtimestamp(cls, t: float, tz: _tzinfo | str | None = ...) -> Self: ...
107+
else:
108+
@classmethod
109+
def fromtimestamp( # pyright: ignore[reportIncompatibleMethodOverride]
110+
cls, t: float, tz: _tzinfo | str | None = ...
111+
) -> Self: ...
112+
104113
@classmethod
105114
def utcfromtimestamp(cls, ts: float) -> Self: ...
106115
@classmethod

pyproject.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ types-pytz = ">= 2022.1.1"
3535
numpy = { version = ">=1.26.0", python = "<3.13" }
3636

3737
[tool.poetry.group.dev.dependencies]
38-
mypy = "1.7.1"
38+
mypy = "1.8.0"
3939
pandas = "2.1.4"
4040
pyarrow = ">=10.0.1"
4141
pytest = ">=7.1.2"
@@ -61,7 +61,6 @@ jinja2 = ">=3.1"
6161
scipy = { version = ">=1.9.1", python = "<3.13" }
6262
SQLAlchemy = ">=2.0.12"
6363
types-python-dateutil = ">=2.8.19"
64-
numexpr = "<2.8.5" # https://github.com/pandas-dev/pandas/issues/54449
6564
beautifulsoup4 = ">=4.12.2"
6665
html5lib = ">=1.1"
6766

tests/test_utility.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import sys
2+
13
import pandas as pd
24
import pytest
35
from typing_extensions import assert_type
@@ -6,7 +8,11 @@
68

79

810
def test_show_version():
9-
with pytest.warns(UserWarning, match="Setuptools is replacing distutils"):
11+
if sys.version_info < (3, 12):
12+
with pytest.warns(UserWarning, match="Setuptools is replacing distutils"):
13+
check(assert_type(pd.show_versions(True), None), type(None))
14+
check(assert_type(pd.show_versions(False), None), type(None))
15+
else:
1016
check(assert_type(pd.show_versions(True), None), type(None))
1117
check(assert_type(pd.show_versions(False), None), type(None))
1218

0 commit comments

Comments
 (0)