Skip to content

build!: drop Python 3.10 support - #360

Merged
uniqueg merged 1 commit into
devfrom
build/drop-python-3.10
Oct 21, 2026
Merged

uniqueg merged 1 commit into
devfrom
build/drop-python-3.10

Conversation

@uniqueg

@uniqueg uniqueg commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Summary

Python 3.10 reaches its end of life in October 2026. It also blocks local docs builds: mkdocstrings 1.0.6 and older fail with pymdown-extensions 12, and the fixed 1.0.8 requires Python 3.11.

  • pyproject.toml:
    • requires-python = ">=3.11"; the 3.10 classifier is dropped.
    • ruff target-version = "py311", mypy python_version = "3.11".
    • The typing_extensions dependency is gone (Self now comes from typing).
    • The docs extra requires mkdocstrings[python]>=1.0.8.
  • CI (checks.yml): tests and the image build run on 3.11-3.14; the lowest-direct-dependencies job moves from 3.10 to 3.11.
  • Release (release.yml): no py3.10 images; the default image stays 3.13.
  • docs/getting-started.md: "Python 3.11 or later".

No code needed changing for 3.11 features: ruff reports no new findings with the 3.11 target, and FOCA does not use tomli.

Closes #347

Breaking: FOCA requires Python 3.11 or later; no py3.10 images are published; typing_extensions is no longer a FOCA dependency (apps that import it must declare it themselves; pydantic still pulls it in).

Expected check changes

The checks Unit tests (Python 3.10, MongoDB 7.0) and Unit tests (Python 3.10, lowest direct dependencies) no longer run; the latter becomes Unit tests (Python 3.11, lowest direct dependencies). Python 3.10 jobs are no longer required checks.

How it was verified

  • ruff check ., ruff format --check ., mypy (68 files): pass.
  • pytest with MongoDB 7: 1050 passed on Python 3.13 and 3.14.
  • mkdocs build --strict: passes.
  • The adversarial reviewer installed the package on Python 3.11.16 with uv pip install --resolution lowest-direct '.[dev,docs]': install, ruff and mkdocs build --strict pass; all tests that don't need MongoDB pass.
  • CI: see checks.

Declined review findings

  • Migration page for 0.16.0 (adversarial, low): other open 0.16 PRs add migration content; the breaking change goes into the 0.16.0 release notes and can be added to that page when it exists.
  • Commit trailer model name (quality, low): the trailer matches the attribution this session was given.

Open questions

None.

🤖 Generated with Claude Code

Summary by Sourcery

Drop Python 3.10 support and update the project, documentation tooling, CI, and release images for Python 3.11 and later.

Enhancements:

  • Raise the minimum supported Python version to 3.11 and align typing, linting, and documentation configuration with the updated support policy.
  • Remove FOCA’s direct dependency on typing_extensions now that Self is available from the standard library.
  • Require a compatible mkdocstrings version for documentation builds.

Build:

  • Update project metadata and development tooling for Python 3.11+ support.

CI:

  • Run checks and release image builds on Python 3.11 through 3.14, replacing Python 3.10 coverage.

Deployment:

  • Stop publishing Python 3.10 container images.

Documentation:

  • Update installation requirements to state that Python 3.11 or later is required.

Python 3.10 reaches its end of life in October 2026, and the
mkdocstrings release that works with pymdown-extensions 12 (1.0.8)
requires Python 3.11.

- Require Python 3.11 or later; drop the 3.10 classifier.
- Set ruff's target-version and mypy's python_version to 3.11.
- Import Self from typing; drop the typing_extensions dependency.
- Raise the docs extra's mkdocstrings floor to 1.0.8.
- Test on 3.11-3.14 only; the lowest-dependencies job moves to 3.11.
- Publish no py3.10 images.

BREAKING CHANGE: FOCA no longer supports Python 3.10, no py3.10 images
are published, and typing_extensions is no longer a dependency.

Closes #347

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sourcery-ai

sourcery-ai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This breaking change drops Python 3.10 support by requiring Python 3.11+, updating Python-specific tooling and standard-library typing imports, removing the direct typing_extensions dependency, and synchronizing CI, release image matrices, documentation dependencies, and installation guidance.

File-Level Changes

Change Details Files
Raise the project’s minimum supported Python version to 3.11 and align packaging, linting, typing, and runtime type imports.
  • Set the package requirement and supported-version classifiers to Python 3.11+.
  • Configure Ruff and mypy for Python 3.11.
  • Replace typing_extensions.Self with typing.Self and remove the direct dependency.
pyproject.toml
foca/models/config.py
Update CI and release automation to stop testing and publishing Python 3.10 artifacts.
  • Remove Python 3.10 from unit-test, image-build, and release matrices.
  • Run lowest-direct-dependency tests on Python 3.11 instead.
.github/workflows/checks.yml
.github/workflows/release.yml
Make documentation tooling and installation guidance compatible with the new support floor.
  • Require mkdocstrings 1.0.8 or newer for documentation builds.
  • Document Python 3.11 or later as the installation requirement.
pyproject.toml
docs/getting-started.md

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codecov

codecov Bot commented Oct 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (e491f10) to head (873f76b).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev      #360   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           24        24           
  Lines         1797      1796    -1     
=========================================
- Hits          1797      1796    -1     
Flag Coverage Δ
test_unit 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@uniqueg
uniqueg marked this pull request as ready for review October 21, 2026 22:48

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Needs a human reviewer. A release built from this change will declare Python 3.11 as the minimum, preventing Python 3.10 users from installing or upgrading to it. Reverting the source cannot change metadata on an already published release, but a follow-up release can restore support.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@uniqueg
uniqueg merged commit cfa0462 into dev Oct 21, 2026
13 checks passed
@uniqueg
uniqueg deleted the build/drop-python-3.10 branch October 21, 2026 22:50
uniqueg added a commit that referenced this pull request Oct 21, 2026
Python 3.10 support was dropped in #360 without a migration note.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
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.

1 participant