Skip to content

Commit

Permalink
Support Python 3.12 (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinfriede authored Jun 26, 2024
1 parent b4f36e6 commit cb5c1ec
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 7 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,15 @@ jobs:
# only test oldest and newest version of torch
torch-version: ["1.11.0", "2.2.2"]
exclude:
# Check latest versions here: https://download.pytorch.org/whl/torch/
#
# PyTorch now fully supports Python=<3.11
# see: https://github.com/pytorch/pytorch/issues/86566
#
# PyTorch does not support Python 3.12 (all platforms)
# PyTorch does now support Python 3.12 (macOS only 2.2)
# see: https://github.com/pytorch/pytorch/issues/110436
- python-version: "3.12"
torch-version: "1.11.0"
# PyTorch<1.13.0 does only support Python=<3.10
# On macOS and Windows, 1.13.x is also not supported for Python>=3.10
- python-version: "3.11"
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,25 @@ jobs:
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
torch-version: ["1.11.0", "1.12.1", "1.13.1", "2.0.1", "2.1.2", "2.2.2"]
torch-version: ["1.11.0", "1.12.1", "1.13.1", "2.0.1", "2.1.2", "2.2.2", "2.3.1"]
exclude:
# Check latest versions here: https://download.pytorch.org/whl/torch/
#
# PyTorch now fully supports Python=<3.11
# see: https://github.com/pytorch/pytorch/issues/86566
#
# PyTorch does not support Python 3.12 (all platforms)
# PyTorch does now support Python 3.12 (Linux) for 2.2.0 and newer
# see: https://github.com/pytorch/pytorch/issues/110436
- python-version: "3.12"
torch-version: "1.11.0"
- python-version: "3.12"
torch-version: "1.12.1"
- python-version: "3.12"
torch-version: "1.13.1"
- python-version: "3.12"
torch-version: "2.0.1"
- python-version: "3.12"
torch-version: "2.1.2"
# PyTorch<1.13.0 does only support Python=<3.10
- python-version: "3.11"
torch-version: "1.11.0"
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,15 @@ jobs:
# only test oldest and newest version of torch
torch-version: ["1.11.0", "2.2.2"]
exclude:
# Check latest versions here: https://download.pytorch.org/whl/torch/
#
# PyTorch now fully supports Python=<3.11
# see: https://github.com/pytorch/pytorch/issues/86566
#
# PyTorch does not support Python 3.12 (all platforms)
# see: https://github.com/pytorch/pytorch/issues/110436
- os: windows-latest
python-version: "3.12"
- python-version: "3.12"
torch-version: "1.11.0"
# PyTorch<1.13.0 does only support Python=<3.10
- python-version: "3.11"
torch-version: "1.11.0"
Expand Down
7 changes: 5 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,21 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Programming Language :: Python :: Implementation :: CPython
Topic :: Scientific/Engineering
Typing :: Typed

[options]
packages = find:
install_requires =
numpy
numpy<2
tad-mctc
tad-multicharge
torch>=1.11
python_requires = >=3.8
torch>=1.11,<2.4
typing-extensions
python_requires = >=3.8, <3.13
package_dir =
=src

Expand Down
3 changes: 3 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ envlist =
py39-torch{1110,1121,1131,201,212,222},
py310-torch{1110,1121,1131,201,212,222},
py311-torch{1131,201,212,221}
py312-torch{222,231}

[testenv]
setenv =
Expand All @@ -40,6 +41,8 @@ deps =
torch220: torch==2.2.0
torch221: torch==2.2.1
torch222: torch==2.2.2
torch230: torch==2.3.0
torch231: torch==2.3.1
.[tox]
commands =
pytest -vv {posargs: \
Expand Down

0 comments on commit cb5c1ec

Please sign in to comment.