Update package for Python 3.12 #1374
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR adds support for Python 3.12 to TPOT and updates the CI workflow to test against Python 3.10, 3.11, and 3.12. It also includes minor documentation and configuration updates related to the supported Python versions.
Specifically, it modifies:
setup.py
: Updatespython_requires
to allow Python 3.12 and adds classifiers for 3.11/3.12..github/workflows/tests.yml
: Adds Python 3.11 and 3.12 to the CI test matrix.tox.ini
: Addspy311
andpy312
to the defaultenvlist
and[gh-actions]
mapping for consistency.README.md
: Updates the listed supported Python version range.docs/installation.md
: Updates the example conda environment command to use Python 3.12.tpot/config/tests/test_get_configspace.py
: Adds askipif
marker for macOS to handle unavailable optional dependencies during testing.Where should the reviewer start?
setup.py
for the corepython_requires
and classifier changes..github/workflows/tests.yml
for the updated CI test matrix.tpot/config/tests/test_get_configspace.py
for the test skip rationale.tox.ini
,README.md
,docs/installation.md
) for consistency updates.How should this PR be tested?
The primary testing is handled by the updated GitHub Actions CI workflow, which now runs
tox
(executingpytest
) across Python 3.10, 3.11, and 3.12 on Ubuntu.Local testing was performed in a dedicated Python 3.12 conda environment on macOS arm64 by following the contribution guidelines (installing dependencies including optional ones where available, and running
pytest
). All tests passed, with one test skipped as detailed below.Any background context you want to provide?
<3.12
insetup.py
was based on a comment regardingConfigSpace
compatibility. However, current versions ofConfigSpace
(>=1.1.1, as required by TPOT) support Python 3.12.imp
module is not used in TPOT.test_loop_through_groupnames
due to the optional dependencyscikit-learn-intelex
being unavailable for installation on this platform via pip or conda. To allow local tests to pass and ensure the CI (running on Linux) can still fully test this component, the testtpot/config/tests/test_get_configspace.py::test_loop_through_groupnames
has been marked to skip execution specifically onsys.platform == 'darwin'
(macOS).What are the relevant issues?
Closes #1364
Questions:
README.md
anddocs/installation.md
were updated.