Skip to content

Commit 9cb7dad

Browse files
g-asm-richards
authored andcommitted
Declare support for Python3.12 (unionai-oss#1897)
* declared support for python 3.12 Signed-off-by: Guillaume Andreu Sabater <[email protected]> * set python3.8 as min python in setup's 'python_requires' Signed-off-by: Guillaume Andreu Sabater <[email protected]> * bumped pylint to <3.3 (3.2.x latest to be run with 3.8) Signed-off-by: Guillaume Andreu Sabater <[email protected]> * added pyupgrade and applied modifications Signed-off-by: Guillaume Andreu Sabater <[email protected]> * .github/tests: skipped pyspark tests on 3.12 Signed-off-by: Guillaume Andreu Sabater <[email protected]> * TEMP: disabled pylint warnings (possibly-used-before-assignment). need addressing Signed-off-by: Guillaume Andreu Sabater <[email protected]> * .github: added setuptools to test run deps (required by noxfile), since it's no longer installed by default with python 3.12 Signed-off-by: Guillaume Andreu Sabater <[email protected]> * added setuptools as an explicit test dependency it is required in noxfile and not automatically provided by python >= 3.12 Signed-off-by: Guillaume Andreu Sabater <[email protected]> * updated dependency spec of typing_extensions typing_extensions is currently required by all python versions Signed-off-by: Guillaume Andreu Sabater <[email protected]> * updated autogen requirements files Signed-off-by: Guillaume Andreu Sabater <[email protected]> --------- Signed-off-by: Guillaume Andreu Sabater <[email protected]> Signed-off-by: Matt Richards <[email protected]>
1 parent f2eb0fa commit 9cb7dad

File tree

54 files changed

+2044
-1088
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+2044
-1088
lines changed

.github/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Pandera offers a `environment.yml` to set up a conda-based environment and
3939
Install [miniconda](https://docs.conda.io/en/latest/miniconda.html), then run:
4040

4141
```bash
42-
conda create -n pandera-dev python=3.11 # or any python version 3.7+
42+
conda create -n pandera-dev python=3.12 # or any python version 3.8+
4343
conda env update -n pandera-dev -f environment.yml
4444
conda activate pandera-dev
4545
pip install -e .
@@ -52,7 +52,7 @@ pip install virtualenv
5252
virtualenv .venv/pandera-dev
5353
source .venv/pandera-dev/bin/activate
5454
pip install --upgrade pip
55-
pip install -r dev/requirements-3.11.txt # or any python version 3.7+
55+
pip install -r dev/requirements-3.12.txt # or any python version 3.8+
5656
pip install -e .
5757
```
5858

.github/workflows/ci-tests.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
strategy:
3131
fail-fast: true
3232
matrix:
33-
python-version: ["3.8", "3.9", "3.10", "3.11"]
33+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
3434
defaults:
3535
run:
3636
shell: bash -l {0}
@@ -57,6 +57,7 @@ jobs:
5757
types-pyyaml \
5858
types-requests \
5959
types-setuptools \
60+
setuptools \
6061
polars
6162
- name: Pip info
6263
run: python -m pip list
@@ -104,7 +105,7 @@ jobs:
104105
- windows-latest
105106
- macos-13
106107
# - macos-latest # see: https://github.com/actions/setup-python/issues/696
107-
python-version: ["3.8", "3.9", "3.10", "3.11"]
108+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
108109
pandas-version: ["1.5.3", "2.2.2"]
109110
pydantic-version: ["1.10.11", "2.3.0"]
110111
include:
@@ -121,6 +122,8 @@ jobs:
121122
pandas-version: "2.2.2"
122123
- python-version: "3.11"
123124
pandas-version: "1.5.3"
125+
- python-version: "3.12"
126+
pandas-version: "1.5.3"
124127

125128
steps:
126129
- uses: actions/checkout@v4
@@ -181,7 +184,7 @@ jobs:
181184
- windows-latest
182185
- macos-13
183186
# - macos-latest # see: https://github.com/actions/setup-python/issues/696
184-
python-version: ["3.8", "3.9", "3.10", "3.11"]
187+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
185188
pandas-version: ["2.2.2"]
186189
pydantic-version: ["2.3.0"]
187190
polars-version: ["0.20.31", "1.2.0"]
@@ -211,6 +214,8 @@ jobs:
211214
pandas-version: "2.2.2"
212215
- python-version: "3.11"
213216
pandas-version: "1.5.3"
217+
- python-version: "3.12"
218+
pandas-version: "1.5.3"
214219
# mypy tests hang on windows
215220
- extra: mypy
216221
os: windows-latest
@@ -232,6 +237,9 @@ jobs:
232237
polars-version: "0.20.31"
233238
- extra: pyspark
234239
polars-version: "0.20.31"
240+
# pyspark < 4.0 is doesn't work on 3.12
241+
- extra: pyspark
242+
python-version: "3.12"
235243
- extra: modin-dask
236244
polars-version: "0.20.31"
237245
- extra: modin-ray

.pre-commit-config.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,14 @@ repos:
3737
hooks:
3838
- id: black
3939

40+
- repo: https://github.com/asottile/pyupgrade
41+
rev: v3.19.1
42+
hooks:
43+
- id: pyupgrade
44+
args: [--py38-plus, --keep-runtime-typing]
45+
4046
- repo: https://github.com/pycqa/pylint
41-
rev: v2.17.3
47+
rev: v3.2.7
4248
hooks:
4349
- id: pylint
4450
args: ["--disable=import-error"]

.pylintrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,6 @@ disable=
5555
redefined-outer-name,
5656
logging-fstring-interpolation,
5757
multiple-statements,
58-
cyclic-import
58+
cyclic-import,
59+
# Due to custom `immutable` decorator replacing `dataclasses.dataclass`
60+
invalid-field-call
Lines changed: 56 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,60 @@
11
aiosignal==1.3.2
22
alabaster==1.0.0
3-
anyio==4.7.0
3+
anyio==4.8.0
44
appnope==0.1.4
5-
argcomplete==3.5.2
6-
astroid==2.15.8
5+
argcomplete==3.5.3
6+
astroid==3.2.4
77
asttokens==3.0.0
88
asv==0.6.4
99
asv-runner==0.2.1
10-
attrs==24.3.0
11-
babel==2.16.0
10+
attrs==25.1.0
11+
babel==2.17.0
1212
backports-tarfile==1.2.0
13-
beautifulsoup4==4.12.3
14-
black==24.10.0
13+
beautifulsoup4==4.13.3
14+
black==25.1.0
1515
build==1.2.2.post1
16-
certifi==2024.12.14
16+
certifi==2025.1.31
1717
cfgv==3.4.0
1818
chardet==5.2.0
19-
charset-normalizer==3.4.0
19+
charset-normalizer==3.4.1
2020
click==8.1.8
21-
cloudpickle==3.1.0
21+
cloudpickle==3.1.1
2222
colorlog==6.9.0
2323
comm==0.2.2
2424
commonmark==0.9.1
25-
coverage==7.6.9
25+
coverage==7.6.12
2626
dask==2024.2.1
27-
debugpy==1.8.11
27+
debugpy==1.8.12
2828
decorator==5.1.1
29+
dependency-groups==1.3.0
2930
dill==0.3.9
3031
distlib==0.3.9
3132
distributed==2024.2.1
3233
docutils==0.21.2
3334
exceptiongroup==1.2.2
3435
execnet==2.1.1
35-
executing==2.1.0
36-
fastapi==0.115.6
36+
executing==2.2.0
37+
fastapi==0.115.8
3738
fastjsonschema==2.21.1
38-
filelock==3.16.1
39+
filelock==3.17.0
3940
frictionless==4.40.8
4041
frozenlist==1.5.0
41-
fsspec==2024.12.0
42+
fsspec==2025.2.0
4243
furo==2024.8.6
4344
geopandas==1.0.1
44-
googleapis-common-protos==1.66.0
45-
greenlet==3.1.1
46-
grpcio==1.68.1
47-
grpcio-status==1.68.1
45+
googleapis-common-protos==1.67.0
46+
grpcio==1.70.0
47+
grpcio-status==1.70.0
4848
h11==0.14.0
49-
hypothesis==6.122.6
50-
identify==2.6.3
49+
hypothesis==6.125.3
50+
id==1.5.0
51+
identify==2.6.7
5152
idna==3.10
5253
imagesize==1.4.1
53-
importlib-metadata==8.5.0
54+
importlib-metadata==8.6.1
5455
iniconfig==2.0.0
5556
ipykernel==6.29.5
56-
ipython==8.31.0
57+
ipython==8.32.0
5758
isodate==0.7.2
5859
isort==5.13.2
5960
jaraco-classes==3.4.0
@@ -68,8 +69,7 @@ jsonschema-specifications==2024.10.1
6869
jupyter-cache==1.0.1
6970
jupyter-client==8.6.3
7071
jupyter-core==5.7.2
71-
keyring==25.5.0
72-
lazy-object-proxy==1.10.0
72+
keyring==25.6.0
7373
locket==1.0.0
7474
markdown-it-py==3.0.0
7575
marko==2.1.2
@@ -79,18 +79,18 @@ mccabe==0.7.0
7979
mdit-py-plugins==0.4.2
8080
mdurl==0.1.2
8181
modin==0.22.3
82-
more-itertools==10.5.0
82+
more-itertools==10.6.0
8383
msgpack==1.1.0
8484
mypy==1.10.0
8585
mypy-extensions==1.0.0
86-
myst-nb==1.1.2
87-
myst-parser==4.0.0
86+
myst-nb==1.2.0
87+
myst-parser==4.0.1
8888
nbclient==0.10.2
8989
nbformat==5.10.4
9090
nest-asyncio==1.6.0
9191
nh3==0.2.20
9292
nodeenv==1.9.1
93-
nox==2024.10.9
93+
nox==2025.2.9
9494
numpy==1.26.4
9595
packaging==24.2
9696
pandas==1.5.3
@@ -100,48 +100,48 @@ partd==1.4.2
100100
pathspec==0.12.1
101101
petl==1.7.15
102102
pexpect==4.9.0
103-
pip==24.3.1
104-
pkginfo==1.12.0
103+
pip==25.0.1
105104
platformdirs==4.3.6
106105
pluggy==1.5.0
107-
polars==1.17.1
108-
pre-commit==4.0.1
109-
prompt-toolkit==3.0.48
110-
protobuf==5.29.2
111-
psutil==6.1.1
106+
polars==1.22.0
107+
pre-commit==4.1.0
108+
prompt-toolkit==3.0.50
109+
protobuf==5.29.3
110+
psutil==7.0.0
112111
ptyprocess==0.7.0
113112
pure-eval==0.2.3
114113
py4j==0.10.9.7
115-
pyarrow==18.1.0
114+
pyarrow==19.0.0
116115
pydantic==1.10.11
117-
pygments==2.18.0
118-
pylint==2.17.3
116+
pygments==2.19.1
117+
pylint==3.2.7
119118
pympler==1.1
120119
pyogrio==0.10.0
121-
pyproj==3.7.0
120+
pyproj==3.7.1
122121
pyproject-hooks==1.2.0
123122
pyspark==3.5.4
124123
pytest==8.3.4
125-
pytest-asyncio==0.25.0
124+
pytest-asyncio==0.25.3
126125
pytest-cov==6.0.0
127126
pytest-xdist==3.6.1
128127
python-dateutil==2.9.0.post0
129128
python-multipart==0.0.20
130129
python-slugify==8.0.4
131-
pytz==2024.2
130+
pytz==2025.1
132131
pyyaml==6.0.2
133-
pyzmq==26.2.0
134-
ray==2.40.0
132+
pyzmq==26.2.1
133+
ray==2.42.1
135134
readme-renderer==44.0
136135
recommonmark==0.7.1
137-
referencing==0.35.1
136+
referencing==0.36.2
138137
requests==2.32.3
139138
requests-toolbelt==1.0.0
140139
rfc3986==2.0.0
141140
rich==13.9.4
142141
rpds-py==0.22.3
143-
scipy==1.14.1
144-
shapely==2.0.6
142+
scipy==1.15.2
143+
setuptools==75.8.0
144+
shapely==2.0.7
145145
shellingham==1.5.4
146146
simpleeval==1.0.3
147147
six==1.17.0
@@ -161,9 +161,9 @@ sphinxcontrib-htmlhelp==2.1.0
161161
sphinxcontrib-jsmath==1.0.1
162162
sphinxcontrib-qthelp==2.0.0
163163
sphinxcontrib-serializinghtml==2.0.0
164-
sqlalchemy==2.0.36
164+
sqlalchemy==2.0.38
165165
stack-data==0.6.3
166-
starlette==0.41.3
166+
starlette==0.45.3
167167
stringcase==1.2.0
168168
tabulate==0.9.0
169169
tblib==3.0.0
@@ -173,22 +173,21 @@ tomlkit==0.13.2
173173
toolz==1.0.0
174174
tornado==6.4.2
175175
traitlets==5.14.3
176-
twine==6.0.1
177-
typeguard==4.4.1
176+
twine==6.1.0
177+
typeguard==4.4.2
178178
typer==0.15.1
179179
types-click==7.1.8
180-
types-pytz==2024.2.0.20241221
181-
types-pyyaml==6.0.12.20241221
180+
types-pytz==2025.1.0.20250204
181+
types-pyyaml==6.0.12.20241230
182182
types-requests==2.32.0.20241016
183-
types-setuptools==75.6.0.20241126
183+
types-setuptools==75.8.0.20250210
184184
typing-extensions==4.12.2
185185
typing-inspect==0.9.0
186186
urllib3==2.3.0
187187
uvicorn==0.34.0
188188
validators==0.34.0
189-
virtualenv==20.28.0
189+
virtualenv==20.29.2
190190
wcwidth==0.2.13
191-
wrapt==1.17.0
192191
xdoctest==1.2.0
193192
zict==3.0.0
194193
zipp==3.21.0

0 commit comments

Comments
 (0)