From a3b204fc42307f11ffa1f41045ee551fbe72cf43 Mon Sep 17 00:00:00 2001 From: Wen Kokke Date: Thu, 11 Jan 2024 18:53:37 +0000 Subject: [PATCH] Support Python 3.12 (#756) * Bump Python version bound to include 3.12 * Fix tests * Fix tensorflow version bound --- vehicle-python/.python-version | 1 + vehicle-python/pyproject.toml | 13 ++++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/vehicle-python/.python-version b/vehicle-python/.python-version index ec8f2ed69..9aa50d3d5 100644 --- a/vehicle-python/.python-version +++ b/vehicle-python/.python-version @@ -2,3 +2,4 @@ 3.9 3.10 3.11 +3.12 diff --git a/vehicle-python/pyproject.toml b/vehicle-python/pyproject.toml index 7c1fa3d06..651258e43 100644 --- a/vehicle-python/pyproject.toml +++ b/vehicle-python/pyproject.toml @@ -14,7 +14,7 @@ description = 'A high-level functional language for writing mathematically-preci readme = 'README.md' license = { file = 'LICENSE' } dynamic = ["version"] -requires-python = ">=3.7.1,<3.12" +requires-python = ">=3.7.1,<3.13" dependencies = [ "typing_extensions >=4.6,<5", "astunparse; python_version<'3.9'", @@ -95,9 +95,9 @@ version = { attr = "vehicle_lang._version.VERSION" } legacy_tox_ini = """ [tox] min_version = 4 -env_list = py{37,38,39,310,311}-{lin,mac,win} +env_list = py{37,38,39,310,311,312}-{lin,mac,win} -[testenv:py{37,38,39,310,311}-{lin,mac,win}] +[testenv:py{37,38,39,310,311,312}-{lin,mac,win}] package = external package_env = build-{env_name} platform = @@ -109,11 +109,11 @@ allowlist_externals = extras = test pygments - py38,py39,py310,py311: tensorflow + py38,py39,py310,py311,py312: tensorflow commands = {env_python} -m pytest {posargs} -[testenv:build-py{37,38,39,310,311}-{lin,mac,win}] +[testenv:build-py{37,38,39,310,311,312}-{lin,mac,win}] deps = build auditwheel; sys_platform == 'linux' @@ -129,16 +129,19 @@ package_glob = py39-lin: {env:dist_dir}{/}*cp39*manylinux*.whl py310-lin: {env:dist_dir}{/}*cp310*manylinux*.whl py311-lin: {env:dist_dir}{/}*cp311*manylinux*.whl + py312-lin: {env:dist_dir}{/}*cp312*manylinux*.whl py37-mac: {env:dist_dir}{/}*cp37*macosx*.whl py38-mac: {env:dist_dir}{/}*cp38*macosx*.whl py39-mac: {env:dist_dir}{/}*cp39*macosx*.whl py310-mac: {env:dist_dir}{/}*cp310*macosx*.whl py311-mac: {env:dist_dir}{/}*cp311*macosx*.whl + py312-mac: {env:dist_dir}{/}*cp312*macosx*.whl py37-win: {env:dist_dir}{/}*cp37*win*.whl py38-win: {env:dist_dir}{/}*cp38*win*.whl py39-win: {env:dist_dir}{/}*cp39*win*.whl py310-win: {env:dist_dir}{/}*cp310*win*.whl py311-win: {env:dist_dir}{/}*cp311*win*.whl + py312-win: {env:dist_dir}{/}*cp312*win*.whl allowlist_externals = sh commands =