Skip to content

Commit

Permalink
Declare support for Python3.12 (#1897)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
g-as authored Feb 18, 2025
1 parent 7186507 commit ede8a43
Show file tree
Hide file tree
Showing 54 changed files with 2,045 additions and 1,089 deletions.
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Pandera offers a `environment.yml` to set up a conda-based environment and
Install [miniconda](https://docs.conda.io/en/latest/miniconda.html), then run:

```bash
conda create -n pandera-dev python=3.11 # or any python version 3.7+
conda create -n pandera-dev python=3.12 # or any python version 3.8+
conda env update -n pandera-dev -f environment.yml
conda activate pandera-dev
pip install -e .
Expand All @@ -52,7 +52,7 @@ pip install virtualenv
virtualenv .venv/pandera-dev
source .venv/pandera-dev/bin/activate
pip install --upgrade pip
pip install -r dev/requirements-3.11.txt # or any python version 3.7+
pip install -r dev/requirements-3.12.txt # or any python version 3.8+
pip install -e .
```

Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
strategy:
fail-fast: true
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
defaults:
run:
shell: bash -l {0}
Expand All @@ -57,6 +57,7 @@ jobs:
types-pyyaml \
types-requests \
types-setuptools \
setuptools \
polars
- name: Pip info
run: python -m pip list
Expand Down Expand Up @@ -104,7 +105,7 @@ jobs:
- windows-latest
- macos-13
# - macos-latest # see: https://github.com/actions/setup-python/issues/696
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
pandas-version: ["1.5.3", "2.2.2"]
pydantic-version: ["1.10.11", "2.3.0"]
include:
Expand All @@ -121,6 +122,8 @@ jobs:
pandas-version: "2.2.2"
- python-version: "3.11"
pandas-version: "1.5.3"
- python-version: "3.12"
pandas-version: "1.5.3"

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -181,7 +184,7 @@ jobs:
- windows-latest
- macos-13
# - macos-latest # see: https://github.com/actions/setup-python/issues/696
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
pandas-version: ["2.2.2"]
pydantic-version: ["2.3.0"]
polars-version: ["0.20.31", "1.2.0"]
Expand Down Expand Up @@ -211,6 +214,8 @@ jobs:
pandas-version: "2.2.2"
- python-version: "3.11"
pandas-version: "1.5.3"
- python-version: "3.12"
pandas-version: "1.5.3"
# mypy tests hang on windows
- extra: mypy
os: windows-latest
Expand All @@ -232,6 +237,9 @@ jobs:
polars-version: "0.20.31"
- extra: pyspark
polars-version: "0.20.31"
# pyspark < 4.0 is doesn't work on 3.12
- extra: pyspark
python-version: "3.12"
- extra: modin-dask
polars-version: "0.20.31"
- extra: modin-ray
Expand Down
8 changes: 7 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,14 @@ repos:
hooks:
- id: black

- repo: https://github.com/asottile/pyupgrade
rev: v3.19.1
hooks:
- id: pyupgrade
args: [--py38-plus, --keep-runtime-typing]

- repo: https://github.com/pycqa/pylint
rev: v2.17.3
rev: v3.2.7
hooks:
- id: pylint
args: ["--disable=import-error"]
Expand Down
4 changes: 3 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,6 @@ disable=
redefined-outer-name,
logging-fstring-interpolation,
multiple-statements,
cyclic-import
cyclic-import,
# Due to custom `immutable` decorator replacing `dataclasses.dataclass`
invalid-field-call
113 changes: 56 additions & 57 deletions ci/requirements-py3.10-pandas1.5.3-pydantic1.10.11.txt
Original file line number Diff line number Diff line change
@@ -1,59 +1,60 @@
aiosignal==1.3.2
alabaster==1.0.0
anyio==4.7.0
anyio==4.8.0
appnope==0.1.4
argcomplete==3.5.2
astroid==2.15.8
argcomplete==3.5.3
astroid==3.2.4
asttokens==3.0.0
asv==0.6.4
asv-runner==0.2.1
attrs==24.3.0
babel==2.16.0
attrs==25.1.0
babel==2.17.0
backports-tarfile==1.2.0
beautifulsoup4==4.12.3
black==24.10.0
beautifulsoup4==4.13.3
black==25.1.0
build==1.2.2.post1
certifi==2024.12.14
certifi==2025.1.31
cfgv==3.4.0
chardet==5.2.0
charset-normalizer==3.4.0
charset-normalizer==3.4.1
click==8.1.8
cloudpickle==3.1.0
cloudpickle==3.1.1
colorlog==6.9.0
comm==0.2.2
commonmark==0.9.1
coverage==7.6.9
coverage==7.6.12
dask==2024.2.1
debugpy==1.8.11
debugpy==1.8.12
decorator==5.1.1
dependency-groups==1.3.0
dill==0.3.9
distlib==0.3.9
distributed==2024.2.1
docutils==0.21.2
exceptiongroup==1.2.2
execnet==2.1.1
executing==2.1.0
fastapi==0.115.6
executing==2.2.0
fastapi==0.115.8
fastjsonschema==2.21.1
filelock==3.16.1
filelock==3.17.0
frictionless==4.40.8
frozenlist==1.5.0
fsspec==2024.12.0
fsspec==2025.2.0
furo==2024.8.6
geopandas==1.0.1
googleapis-common-protos==1.66.0
greenlet==3.1.1
grpcio==1.68.1
grpcio-status==1.68.1
googleapis-common-protos==1.67.0
grpcio==1.70.0
grpcio-status==1.70.0
h11==0.14.0
hypothesis==6.122.6
identify==2.6.3
hypothesis==6.125.3
id==1.5.0
identify==2.6.7
idna==3.10
imagesize==1.4.1
importlib-metadata==8.5.0
importlib-metadata==8.6.1
iniconfig==2.0.0
ipykernel==6.29.5
ipython==8.31.0
ipython==8.32.0
isodate==0.7.2
isort==5.13.2
jaraco-classes==3.4.0
Expand All @@ -68,8 +69,7 @@ jsonschema-specifications==2024.10.1
jupyter-cache==1.0.1
jupyter-client==8.6.3
jupyter-core==5.7.2
keyring==25.5.0
lazy-object-proxy==1.10.0
keyring==25.6.0
locket==1.0.0
markdown-it-py==3.0.0
marko==2.1.2
Expand All @@ -79,18 +79,18 @@ mccabe==0.7.0
mdit-py-plugins==0.4.2
mdurl==0.1.2
modin==0.22.3
more-itertools==10.5.0
more-itertools==10.6.0
msgpack==1.1.0
mypy==1.10.0
mypy-extensions==1.0.0
myst-nb==1.1.2
myst-parser==4.0.0
myst-nb==1.2.0
myst-parser==4.0.1
nbclient==0.10.2
nbformat==5.10.4
nest-asyncio==1.6.0
nh3==0.2.20
nodeenv==1.9.1
nox==2024.10.9
nox==2025.2.9
numpy==1.26.4
packaging==24.2
pandas==1.5.3
Expand All @@ -100,48 +100,48 @@ partd==1.4.2
pathspec==0.12.1
petl==1.7.15
pexpect==4.9.0
pip==24.3.1
pkginfo==1.12.0
pip==25.0.1
platformdirs==4.3.6
pluggy==1.5.0
polars==1.17.1
pre-commit==4.0.1
prompt-toolkit==3.0.48
protobuf==5.29.2
psutil==6.1.1
polars==1.22.0
pre-commit==4.1.0
prompt-toolkit==3.0.50
protobuf==5.29.3
psutil==7.0.0
ptyprocess==0.7.0
pure-eval==0.2.3
py4j==0.10.9.7
pyarrow==18.1.0
pyarrow==19.0.0
pydantic==1.10.11
pygments==2.18.0
pylint==2.17.3
pygments==2.19.1
pylint==3.2.7
pympler==1.1
pyogrio==0.10.0
pyproj==3.7.0
pyproj==3.7.1
pyproject-hooks==1.2.0
pyspark==3.5.4
pytest==8.3.4
pytest-asyncio==0.25.0
pytest-asyncio==0.25.3
pytest-cov==6.0.0
pytest-xdist==3.6.1
python-dateutil==2.9.0.post0
python-multipart==0.0.20
python-slugify==8.0.4
pytz==2024.2
pytz==2025.1
pyyaml==6.0.2
pyzmq==26.2.0
ray==2.40.0
pyzmq==26.2.1
ray==2.42.1
readme-renderer==44.0
recommonmark==0.7.1
referencing==0.35.1
referencing==0.36.2
requests==2.32.3
requests-toolbelt==1.0.0
rfc3986==2.0.0
rich==13.9.4
rpds-py==0.22.3
scipy==1.14.1
shapely==2.0.6
scipy==1.15.2
setuptools==75.8.0
shapely==2.0.7
shellingham==1.5.4
simpleeval==1.0.3
six==1.17.0
Expand All @@ -161,9 +161,9 @@ sphinxcontrib-htmlhelp==2.1.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
sqlalchemy==2.0.36
sqlalchemy==2.0.38
stack-data==0.6.3
starlette==0.41.3
starlette==0.45.3
stringcase==1.2.0
tabulate==0.9.0
tblib==3.0.0
Expand All @@ -173,22 +173,21 @@ tomlkit==0.13.2
toolz==1.0.0
tornado==6.4.2
traitlets==5.14.3
twine==6.0.1
typeguard==4.4.1
twine==6.1.0
typeguard==4.4.2
typer==0.15.1
types-click==7.1.8
types-pytz==2024.2.0.20241221
types-pyyaml==6.0.12.20241221
types-pytz==2025.1.0.20250204
types-pyyaml==6.0.12.20241230
types-requests==2.32.0.20241016
types-setuptools==75.6.0.20241126
types-setuptools==75.8.0.20250210
typing-extensions==4.12.2
typing-inspect==0.9.0
urllib3==2.3.0
uvicorn==0.34.0
validators==0.34.0
virtualenv==20.28.0
virtualenv==20.29.2
wcwidth==0.2.13
wrapt==1.17.0
xdoctest==1.2.0
zict==3.0.0
zipp==3.21.0
Loading

0 comments on commit ede8a43

Please sign in to comment.