Skip to content

chore: Drop support for python3.9 and update pins - #833

Open
ThosRTanner wants to merge 4 commits into
python-zk:masterfrom
ThosRTanner:issues/832
Open

ThosRTanner wants to merge 4 commits into
python-zk:masterfrom
ThosRTanner:issues/832

Conversation

@ThosRTanner

@ThosRTanner ThosRTanner commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #832

Why is this needed?

Github actions now use ubuntu 24 (unless you explicitly request ubuntu 22). Ubuntu 24 has dropped python 3.9

I've put this in as several commits as I've taken the opportunity to do some optional tidyup which may or may not be considered contentious!

Proposed Changes

  • Remove python3.9 from the build matrix, and update pyproject.toml to refer to 3.10, and update the pins to the latest versions that support 3.10
  • Remove global mypy suppression that's no longer necessary
  • Change ruff to flag pre-python 3.10 coding idioms and clean them up
  • Change ruff to flag unsorted imports and clean them up

The last one in particular affects a number of files and might be preferred as a separate PR.

Does this PR introduce any breaking change?

It drops support for python3.9, so, yes.

@python-zk/maintainers @StephenSorriaux without this (or at least the first commit in it), all PRs fail validation as there is no python3.9 available.

The 2nd commit is small (a mypy cleanup for suppressions that are no longer necessary)

The 3rd is moderate just (mainly) moving type imports to the up to date ones

The 4th is - well, it seemed like a good time as with the 3.10ification of the imports in the 3rd, they results were quite messy.

Test failures

Just a comment that the test failures are random and unrelated to this PR.

@ThosRTanner
ThosRTanner force-pushed the issues/832 branch 2 times, most recently from c815fd2 to 4109b8b Compare October 29, 2026 22:26
@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.50%. Comparing base (f54c4fd) to head (14bd3ca).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #833      +/-   ##
==========================================
+ Coverage   94.90%   95.50%   +0.59%     
==========================================
  Files          27       27              
  Lines        3811     3827      +16     
==========================================
+ Hits         3617     3655      +38     
+ Misses        194      172      -22     

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

@ceache

ceache commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Hi, thanks for this, I like the change.
Could you just make sure the commit messages abide by our format guidelines?

@ThosRTanner

ThosRTanner commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor Author

Hi, thanks for this, I like the change. Could you just make sure the commit messages abide by our format guidelines?

Sure. I just wanted to check the last couple of commits weren't going too far before i collapsed into one commit. Or would multiple commits be OK? I've changed all the commit messages but let me know if you'd like a single commit.

@ceache

ceache commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

I would suggest you squash into one commit:
Something like

  • drop python 3.9 support and update dependency pins
  • modernize typing and idioms for python 3.10
  • import sorting with ruff isort config
    Would be cleanest I think

Comment thread pyproject.toml Resolved
Comment thread kazoo/handlers/utils.py Resolved
Comment thread pyproject.toml Resolved
@ThosRTanner

Copy link
Copy Markdown
Contributor Author

I would suggest you squash into one commit: Something like

* drop python 3.9 support and update dependency pins

* modernize typing and idioms for python 3.10

* import sorting with ruff isort config
  Would be cleanest I think

Done

@ceache

ceache commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

I am so sorry, I meant to say

I would suggest you do not squash into one commit: Something like

  • drop python 3.9 support and update dependency pins

  • modernize typing and idioms for python 3.10

  • import sorting with ruff isort config
    Would be cleanest I think

I.e. I was giving you a recipe for 3 commits.
Apologies for the misdirection

@ThosRTanner

Copy link
Copy Markdown
Contributor Author

oops. rebuilding commits

@ThosRTanner

Copy link
Copy Markdown
Contributor Author

still with 4 commits but closer to your suggestions i think.

@ceache ceache left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

I added other maintainers to the PR to make sure they have a chance to have a look

@ceache ceache added Enhancement Lint dependencies Pull requests that update a dependency file labels Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file Enhancement Lint

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drop support for python3.9

2 participants