Skip to content

Update package for Python 3.12 #1374

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 2 commits into from
May 9, 2025

Conversation

john-sandall
Copy link
Contributor

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: Updates python_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: Adds py311 and py312 to the default envlist 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 a skipif marker for macOS to handle unavailable optional dependencies during testing.

Where should the reviewer start?

  1. setup.py for the core python_requires and classifier changes.
  2. .github/workflows/tests.yml for the updated CI test matrix.
  3. tpot/config/tests/test_get_configspace.py for the test skip rationale.
  4. Other documentation/config files (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 (executing pytest) 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?

  • This PR addresses the request in issue Support python 3.12 #1364 to add Python 3.12 support.
  • The original upper bound <3.12 in setup.py was based on a comment regarding ConfigSpace compatibility. However, current versions of ConfigSpace (>=1.1.1, as required by TPOT) support Python 3.12.
  • A search confirmed that the deprecated imp module is not used in TPOT.
  • During local testing on macOS arm64, a test failure occurred in test_loop_through_groupnames due to the optional dependency scikit-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 test tpot/config/tests/test_get_configspace.py::test_loop_through_groupnames has been marked to skip execution specifically on sys.platform == 'darwin' (macOS).

What are the relevant issues?

Closes #1364

Questions:

  • Do the docs need to be updated? Yes, README.md and docs/installation.md were updated.
  • Does this PR add new (Python) dependencies? No.

@jay-m-dev jay-m-dev merged commit e2faa5f into EpistasisLab:main May 9, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support python 3.12
2 participants