Skip to content

Support py312 #184

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/requirements_doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ sphinx-design
sphinx-inline-tabs
sphinx-togglebutton
sphinxcontrib-googleanalytics
ipython>7.16,<8.13 # IPython 8.13+ supports Python 3.9 and above; Python 3.7 is supported with IPython >7.16
ipython>8.12 # IPython 8.13+ supports Python 3.9 and above
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.black]
line-length = 119
target-version = ['py38', 'py39', 'py310', 'py311']
target-version = ['py39', 'py310', 'py311', 'py312']

[tool.isort]
known_first_party = "autogluon"
Expand Down
4 changes: 1 addition & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ source =

[tox:tox]
envlist =
; py37 - Not supported in the container
py38
; py39 - Not supported in the container
py39
isolated_build = True

[pkg-imports]
Expand Down
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
AUTOGLUON = "autogluon"
CLOUD = "cloud"

PYTHON_REQUIRES = ">=3.8, <3.12"
PYTHON_REQUIRES = ">=3.9, <3.13"


def create_version_file(*, version):
Expand Down Expand Up @@ -85,10 +85,10 @@ def default_setup_args(*, version):
"Operating System :: POSIX",
"Operating System :: Unix",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Information Analysis",
Expand Down Expand Up @@ -116,10 +116,10 @@ def default_setup_args(*, version):
# updated sagemaker is required to fetch latest container info, so we don't want to cap the version too strict
# otherwise cloud module needs to be released to support new container
"sagemaker>=2.126.0,<3.0",
"pyarrow>=11.0,<11.1",
"pyarrow>=11.0,<21",
"PyYAML~=6.0",
"Pillow>=10.2,<11", # unlikely to introduce breaking changes in minor releases
"ray[default]>=2.10.0,<2.11",
"Pillow>=10.2,<12", # unlikely to introduce breaking changes in minor releases
"ray[default]>=2.10.0,<2.46",
]

extras_require = dict()
Expand Down
7 changes: 3 additions & 4 deletions src/autogluon/cloud/utils/dlc_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from distutils.version import StrictVersion

from packaging import version
from packaging.version import Version
from sagemaker import image_uris


Expand Down Expand Up @@ -47,7 +46,7 @@ def retrieve_latest_framework_version(framework_type="training"):
version number of latest autogluon framework, and its py_versions as a list
"""
versions = retrieve_available_framework_versions(framework_type)
versions.sort(key=StrictVersion)
versions.sort(key=version.parse)
versions = [(v, retrieve_py_versions(v, framework_type)) for v in versions]
return versions[-1]

Expand All @@ -58,7 +57,7 @@ def parse_framework_version(framework_version, framework_type, py_version=None,
py_version = py_versions[0]
else:
# Cloud supports 0.6+ containers
if minimum_version is not None and version.parse(framework_version) < version.parse(minimum_version):
if minimum_version is not None and Version(framework_version) < Version(minimum_version):
raise ValueError("Cloud module only supports 0.6+ containers.")
valid_options = retrieve_available_framework_versions(framework_type)
assert (
Expand Down
Loading