Repository navigation
chore: require python 3.11 or newer - #1719
Merged
Merged
Conversation
Python 3.10 reached end of life on 2026-10-04, and the docs toolchain has already moved on: mkdocstrings 1.0.7, griffe-pydantic 1.3.2, griffe-warnings-deprecated 1.1.2 and mkdocs-llmstxt 0.5.1 all require 3.11. mkdocstrings 1.0.7 carries the fix for pymdown-extensions 12.2, whose new `Highlight` signature breaks the docs build on every branch. Raise `requires-python` to 3.11 for pact-python, pact-python-ffi, pact-python-cli and the examples. CI tests the oldest and newest supported versions, now 3.11 and 3.15; the hatch matrices and classifiers gain 3.15. The abi3 FFI wheel and the CLI wheels build against cp311. With ruff targeting 3.11: - `Self` comes from `typing`, so the `typing-extensions` dependency is gone from the examples, the FFI `types` group and the root `types` group. The runtime dependency stays for `deprecated` on Python < 3.13. - `datetime.UTC` replaces `timezone.utc`. - The examples drop their workaround for ISO 8601 offsets without a colon, which `datetime.fromisoformat` accepts from 3.11. Assisted-by: Claude Code:claude-opus-5-5
pymdown-extensions 12.2 made `md` a required argument of `Highlight.__init__`, which mkdocstrings 1.0.6 does not pass, so every docs build fails with a `TypeError`. mkdocstrings 1.0.7 passes it. The griffe-pydantic, griffe-warnings-deprecated and mkdocs-llmstxt patch releases come along because, like mkdocstrings 1.0.7, they needed the Python 3.11 floor before they would resolve. Assisted-by: Claude Code:claude-opus-5-5
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1719 +/- ##
====================================
Coverage 74% 74%
====================================
Files 36 36
Lines 4109 4109
====================================
Hits 3063 3063
Misses 1046 1046
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Summary
Raises the minimum supported Python to 3.11 across pact-python, pact-python-ffi, pact-python-cli and the examples. The docs build is fixed by the dependency bumps that this unblocks.
chore: require python 3.11 or newerrequires-python, classifiers and hatch matrices move to 3.11. The matrices and classifiers also gain 3.15.Selfcomes fromtypinganddatetime.UTCreplacestimezone.utc. Thetyping-extensionsdependencies that only providedSelfare gone. The runtime dependency stays fordeprecatedon Python < 3.13.datetime.fromisoformathandles from 3.11.chore(deps): update docs dependencies🔥 Motivation
pymdown-extensions 12.2 (2026-10-10) made
mda required argument ofHighlight.__init__. mkdocstrings 1.0.6 doesn't pass it, somkdocs buildfails with aTypeErroronmainand on every open PR. mkdocstrings 1.0.7 fixes this but drops Python 3.10, as do the griffe and llmstxt patch releases. Renovate's bumps for them fail to resolve on the 3.10 CI jobs.The alternatives were pinning
pymdown-extensions<12.2or moving only the tooling jobs to 3.11. Python 3.10 reached end of life on 2026-10-04, so the project-wide bump avoids carrying a pin that the next docs release would break again.🔨 Test Plan
All on Python 3.11 locally:
hatch run typecheck: cleanhatch run test: 528 passed, 14 skippedhatch run example: 23 passedhatch run docs-build: buildsruff checkandruff format: cleanThe 3.15 hatch env resolves all dependencies and collects the full test suite. CI's 3.15 jobs are the first full run on it.
🔗 Related issues/PRs
Supersedes #1708, #1709, #1710 and #1715. Those Renovate PRs can close once this merges.