Skip to content

Drop python 3.10 - #411

Draft
rwb27 wants to merge 4 commits into
mainfrom
drop-python-3.10
Draft

rwb27 wants to merge 4 commits into
mainfrom
drop-python-3.10

Conversation

@rwb27

@rwb27 rwb27 commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

Python 3.10 will be end-of-life by the time v0.4.0 is released. Some dependencies are already dropping support.

This PR drops support for 3.10.

This MR contains the following

  • Update minimum Python requirement to 3.11
  • Remove mention of 3.10 from docs and README
  • Remove 3.10 from test matrix

Merge checklist:

  • All new/changed functions have up to date typehints and docstrings.
  • Any changes to the public API have been updated in docs/src/public_api.rst.
  • New or changed features have been added to (or updated in) the conceptual documentation.
  • Any new or updated dependencies have been added to the project configuration (e.g., pyproject.toml).
  • New functionality is fully tested.
  • Any decrease in test coverage has been justified.
  • Either the test-against-ofm-v3 job passes, or test-against-ofm-feature-branch passes.
  • New features have been used in a branch of the OpenFlexure Microscope, which is tested in test-against-ofm-feature-branch.
  • This code has been tested manually against simulated hardware (detail tests in "Before merge").
  • This code has been tested against real hardware (detail tests in "Before merge").

rwb27 added 3 commits October 27, 2026 23:18
Python 3.10 will be end of life by the time v0.4.0 is released, so I'm removing it from tests, documentation and metadata.

This also allows us to re-lock dependencies using Python 3.11, which fixes several vulnerabilities.
I assume versions were being held back because other packages already
dropped Python 3.10.

I've added pip-audit to our dev dependencies, as it's helpful to
run it locally and not just in CI.
Since Python 3.11, `Self` is available in the standard library, so there's no
need to import it from typing_extensions.

This commit swaps the import. It doesn't drop the dependency, as
Pydantic still needs us to import
TypedDict from typing_extensions.
@rwb27

rwb27 commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator Author

Due to an improvement in Starlette's TestClient, our MJPEG stream test is now failing, because HTTP streams actually work properly in the test client!

Given the extensive changes currently pending in #409 I am going to pause this PR. Once #409 is in, I'll rebase and improve the test as part of this PR.

@rwb27
rwb27 marked this pull request as draft October 27, 2026 23:49
Starlette's `TestClient` now correctly relays HTTP streams. I have updated
this test accordingly.

The improved version of this test introduced in #409 will also need updating in due course, but fixing it here
untangles the merge ordering.
@barecheck

barecheck Bot commented Oct 28, 2026

Copy link
Copy Markdown

This branch has not been deployed

No deployments
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