Skip to content

chore: drop 3.9 and 3.10 - #630

Merged
t-muser merged 8 commits into
bayesian-optimization:masterfrom
phi-friday:drop-py310
Oct 16, 2026
Merged

t-muser merged 8 commits into
bayesian-optimization:masterfrom
phi-friday:drop-py310

Conversation

@phi-friday

@phi-friday phi-friday commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

closes: #616

Summary by CodeRabbit

  • Compatibility

    • Python 3.11 or newer is now required.
  • Bug Fixes

    • Parameter bounds are kept within the configured global limits during domain reduction.
    • Result and state processing now handles inputs of different lengths by stopping at the shorter input rather than raising a length-mismatch error.
  • Maintenance

    • Updated development and documentation tooling and refreshed example formatting.

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4a099776-224b-4151-97df-fcffbe9b7668
📥 Commits

Reviewing files that changed from the base of the PR and between b58da1a and ebfb5c9.

📒 Files selected for processing: 15
  • .github/ISSUE_TEMPLATE/bug_report.md
  • .github/workflows/build_docs.yml
  • .github/workflows/format_and_lint.yml
  • .github/workflows/run_tests.yml
  • .pre-commit-config.yaml
  • README.md
  • bayes_opt/acquisition.py
  • bayes_opt/bayesian_optimization.py
  • bayes_opt/domain_reduction.py
  • bayes_opt/parameter.py
  • bayes_opt/target_space.py
  • pyproject.toml
  • ruff.toml
  • tests/test_bayesian_optimization.py
  • tests/test_notebooks_run.py

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

📝 Walkthrough

The project now requires Python 3.11 or newer. CI and development-tool configuration reflect this baseline. Runtime code, type annotations, examples, and checks also receive updates.

Changes: Python 3.11 baseline and code updates

Layer / File(s) Summary
Set the Python version baseline
pyproject.toml, .github/workflows/*, ruff.toml, .pre-commit-config.yaml, README.md, .github/ISSUE_TEMPLATE/bug_report.md
The package minimum changes to Python 3.11. CI and Ruff target Python 3.11, and the Ruff pre-commit revision changes to 0.17.1. Sphinx dependency minimums are updated. README and issue-report examples are reformatted without changing their values or arguments.
Update runtime code and types
bayes_opt/parameter.py, bayes_opt/domain_reduction.py, bayes_opt/acquisition.py, bayes_opt/bayesian_optimization.py, bayes_opt/target_space.py
Type aliases use PEP 604 union syntax, and the IntParameter annotations are narrowed. Several zip calls explicitly use strict=False. Domain reduction uses a generator expression for its type check and clamps proposed bounds with max and min.
Update tests and notebook checks
tests/test_bayesian_optimization.py, tests/test_notebooks_run.py
The duplicate-registration test uses pytest.raises, the expected error pattern uses a raw string, and the notebook skip check uses a generator expression.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Suggested reviewers: t-muser, jameskrach, adrianmolzon

Merge Risk: ⚪ Minimal · up to ebfb5

The PR intentionally drops Python 3.9 and 3.10, and its metadata, CI, and tooling consistently use Python 3.11 or newer. No material regression is identified in the supplied change summaries.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: removing Python 3.9 and 3.10 support.
Linked Issues check Passed Issue #616 asks the project to consider dropping Python 3.9 and 3.10. The PR sets requires-python = ">=3.11", removes the 3.9 and 3.10 classifiers, removes both versions from the test matrix, and up…
Out of Scope Changes check Passed The source edits support the version and tooling change. They use Python 3.11 typing syntax, satisfy the updated Ruff configuration, or preserve existing non-strict zip and bound-clamping behavior. …
Docstring Coverage Passed Docstring coverage is 92.31% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 7 files. (8 skipped: 8 …
Full details: Linked Issues check

Explanation

Issue #616 asks the project to consider dropping Python 3.9 and 3.10. The PR sets requires-python = ">=3.11", removes the 3.9 and 3.10 classifiers, removes both versions from the test matrix, and updates workflow and Ruff targets to Python 3.11. The test workflow retains coverage for Python 3.11 through 3.14 and 3.14t.

Full details: Out of Scope Changes check

Explanation

The source edits support the version and tooling change. They use Python 3.11 typing syntax, satisfy the updated Ruff configuration, or preserve existing non-strict zip and bound-clamping behavior. The Ruff, Sphinx, workflow, test, README, and issue-template updates are configuration or formatting support for this migration. No unrelated feature change is shown.

Full details: Docstring Coverage

Explanation

Docstring coverage is 92.31% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 7 files. (8 skipped: 8 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.28%. Comparing base (b58da1a) to head (ebfb5c9).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #630      +/-   ##
==========================================
- Coverage   98.36%   98.28%   -0.09%     
==========================================
  Files          10       10              
  Lines        1223     1221       -2     
==========================================
- Hits         1203     1200       -3     
- Misses         20       21       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@t-muser

t-muser commented Oct 16, 2026

Copy link
Copy Markdown
Member

LGTM! Okay to merge @phi-friday?

@phi-friday

Copy link
Copy Markdown
Contributor Author

LGTM! Okay to merge @phi-friday?

yes, it’s okay to merge.

@t-muser
t-muser merged commit 2e1701a into bayesian-optimization:master Oct 16, 2026
12 of 13 checks passed
@phi-friday
phi-friday deleted the drop-py310 branch October 16, 2026 14:12
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.

Consider dropping Python 3.9 and 3.10 support

2 participants