Skip to content

Add support for Python 3.10-3.13 with updated dependencies#122

Merged
kiudee merged 3 commits intokiudee:masterfrom
AlexisOlson:python-3.10-3.13
Oct 26, 2025
Merged

Add support for Python 3.10-3.13 with updated dependencies#122
kiudee merged 3 commits intokiudee:masterfrom
AlexisOlson:python-3.10-3.13

Conversation

@AlexisOlson
Copy link
Contributor

This PR adds support for Python 3.10, 3.11, 3.12, and 3.13, updating dependencies to be compatible with the latest Python versions.

Changes

Dependency Updates:

  • Updated numpy requirement from >=1.26.0 to >=2.0.0 for Python 3.13 compatibility
  • Added missing data extra in pyproject.toml (required by noxfile)
  • Updated poetry.lock to use Python 3.13-compatible dependency versions

Code Quality:

  • Fixed flake8 B023 error: Lambda loop variable binding in acquisition.py
  • Fixed flake8 B905 errors: Added strict=True to all zip() calls for safer iteration
  • Applied Black code formatting for consistency

CI Updates:

  • Added test matrix for Python 3.10, 3.11, 3.12, and 3.13 across Ubuntu, macOS, and Windows
  • Skipped Python 3.10 on macOS due to known GitHub Actions issue (tested on Ubuntu and Windows instead)
  • Pre-commit session now runs on Python 3.13

Testing

All tests pass on:

  • ✅ Ubuntu: Python 3.10, 3.11, 3.12, 3.13
  • ✅ macOS: Python 3.11, 3.12, 3.13
  • ✅ Windows: Python 3.10, 3.11, 3.12, 3.13

Breaking Changes

  • Minimum numpy version is now 2.0.0 (previously 1.26.0)
  • This is required for Python 3.13 support as numpy 1.x does not provide Python 3.13 wheels

Notes

Python 3.10 testing on macOS was skipped due to a persistent gettext library issue in GitHub Actions runners (see actions/setup-python#577). Python 3.10 is still thoroughly tested on both Ubuntu and Windows platforms.

AlexisOlson and others added 3 commits October 25, 2025 21:21
All Python 3.10.x versions on GitHub Actions macOS runners have a
broken gettext dependency. Since we test Python 3.10 on both Ubuntu
and Windows, skipping macOS 3.10 provides adequate coverage.

Issue: https://github.com/actions/setup-python/issues/577

Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modernizes the project to support Python 3.10 through 3.13, updating dependencies to their latest compatible versions and fixing code quality issues identified by updated linters.

Key changes:

  • Upgraded minimum Python version from 3.8-3.9 to 3.10-3.13
  • Updated core dependencies (numpy 2.0.0+, arviz 0.18.0+, scikit-learn 1.6+, matplotlib 3.9.0+, scipy 1.13.0+)
  • Fixed flake8 errors: lambda variable binding (B023) and unsafe zip operations (B905)

Reviewed Changes

Copilot reviewed 11 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pyproject.toml Updated Python version constraint and all dependency minimum versions
noxfile.py Updated test matrix to Python 3.10-3.13 and added missing setuptools/wheel installations
.github/workflows/tests.yml Expanded CI matrix to test Python 3.10-3.13 across Ubuntu, macOS, and Windows
.github/workflows/release.yml Updated release workflow to Python 3.13
bask/utils.py Migrated from deprecated collections.Sequence to collections.abc.Sequence
bask/acquisition.py Fixed lambda variable binding issue in list comprehension
bask/bayesgpr.py Added strict=True to zip() calls for safer iteration
bask/searchcv.py Added score_name parameter to _step method signature
tests/test_utils.py Added strict=True to zip() call
tests/test_optimizer.py Increased n_random_starts and updated expected values for better convergence
bask/init.py Added blank line for formatting consistency

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +318 to +320
def _step(
self, search_space, optimizer, score_name, evaluate_candidates, n_points=1
):
Copy link

Copilot AI Oct 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The score_name parameter is added to the method signature but is never used in the function body. It's only returned unchanged. If this parameter serves no purpose other than pass-through, consider documenting why it's needed or removing it if it's unused by callers.

Copilot uses AI. Check for mistakes.
@kiudee kiudee merged commit 12637d6 into kiudee:master Oct 26, 2025
12 checks passed
AlexisOlson added a commit to AlexisOlson/chess-tuning-tools that referenced this pull request Oct 26, 2025
Switch from git fork dependency to released version now that
kiudee/bayes-skopt#122 has been merged and bask 0.11.0 is published.

All 27 tests pass with the released version.

Co-Authored-By: Claude <noreply@anthropic.com>
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.

2 participants