Skip to content

Commit cb1ff32

Browse files
ivanbasovclaudekevalmorabia97
authored
Add Python 3.13 support (#1048)
Fixes #217 ## Summary - Bump `requires-python` from `>=3.10,<3.13` to `>=3.10,<3.14` to formally include Python 3.13 - Add explicit Python 3.10–3.13 PyPI classifiers for better discoverability - Add `py313` to tox CPU unit test and partial-install environment matrices - Add Python 3.10–3.13 to the `multi-py` CI matrix in `unit_tests.yml` ## Background Python 3.13 was previously excluded by the `<3.13` upper bound. Testing in a related repo with `--ignore-requires-python` confirmed that the library installs and runs correctly under Python 3.13. This PR lifts the restriction and wires up CI to verify it going forward. ## Test plan - [ ] CI `multi-py` job passes on `py313-torch210-tf_latest-unit` - [ ] `tox -e py313-torch210-tf_latest-unit` passes locally (requires Python 3.13 installed) - [ ] `tox -e py313-partial-unit-torch` passes locally - [ ] No regressions on existing Python 3.10/3.11/3.12 matrix jobs 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Extended Python support: minimum remains 3.10; added official support up through 3.13 (upper bound advanced accordingly). * **Tests** * CI and test matrix expanded to include experimental Python 3.13 coverage. * **Documentation** * Installation docs and changelog updated to reflect Python 3.13 support. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Ivan Basov <ibasov@nvidia.com> Signed-off-by: Ivan Basov <5455484+ivanbasov@users.noreply.github.com> Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com>
1 parent e4df91b commit cb1ff32

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

.github/workflows/unit_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
timeout-minutes: 30
6565
strategy:
6666
matrix:
67-
py: [10, 11]
67+
py: [10, 11, 13]
6868
steps:
6969
- uses: actions/checkout@v6
7070
- uses: ./.github/actions/ubuntu-setup

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ NVIDIA Model Optimizer Changelog
3737
**Misc**
3838

3939
- Migrated project metadata from ``setup.py`` to a fully declarative ``pyproject.toml``.
40+
- Enable experimental Python 3.13 wheel support and unit tests in CI/CD.
4041

4142
0.42 (2026-02-xx)
4243
^^^^^^^^^^^^^^^^^

docs/source/getting_started/_installation_for_Linux.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Latest Model Optimizer (``nvidia-modelopt``) currently has the following system
1212
+-------------------------+-----------------------------+
1313
| Architecture | x86_64, aarch64 (SBSA) |
1414
+-------------------------+-----------------------------+
15-
| Python | >=3.10,<3.13 |
15+
| Python | >=3.10,<3.14 |
1616
+-------------------------+-----------------------------+
1717
| CUDA | 12.x, 13.x |
1818
+-------------------------+-----------------------------+

pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,14 @@ description = "Nvidia Model Optimizer: a unified model optimization and deployme
1919
readme = { text = "Checkout https://github.com/nvidia/Model-Optimizer for more information.", content-type = "text/markdown" }
2020
license = "Apache-2.0"
2121
license-files = ["LICENSE_HEADER"]
22-
requires-python = ">=3.10,<3.13"
22+
requires-python = ">=3.10,<3.14"
2323
authors = [{ name = "NVIDIA Corporation" }]
2424
classifiers = [
2525
"Programming Language :: Python :: 3",
26+
"Programming Language :: Python :: 3.10",
27+
"Programming Language :: Python :: 3.11",
28+
"Programming Language :: Python :: 3.12",
29+
"Programming Language :: Python :: 3.13",
2630
"Intended Audience :: Developers",
2731
"Intended Audience :: Science/Research",
2832
"Topic :: Scientific/Engineering :: Artificial Intelligence",

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ passenv =
1212
############################
1313
# CPU Unit test environments
1414
############################
15-
[testenv:{py310,py311,py312}-torch{26,27,28,29,210}-tf_{min,latest}-unit]
15+
[testenv:{py310,py311,py312,py313}-torch{26,27,28,29,210}-tf_{min,latest}-unit]
1616
deps =
1717
# torch version auto-selected based on torchvision version
1818
torch26: torchvision~=0.21.0
@@ -32,7 +32,7 @@ commands =
3232
#####################################################################
3333
# Environment to run unit tests with subset of dependencies installed
3434
#####################################################################
35-
[testenv:{py310,py311,py312}-partial-unit-{onnx,torch,torch_deploy}]
35+
[testenv:{py310,py311,py312,py313}-partial-unit-{onnx,torch,torch_deploy}]
3636
allowlist_externals =
3737
bash, rm
3838
deps =

0 commit comments

Comments
 (0)