Skip to content

Conversation

JP-Ellis
Copy link
Contributor

@JP-Ellis JP-Ellis commented Oct 3, 2025

📝 Summary

Add support for Python 3.14, and drop support for Python 3.9 as it has reached its end-of-life.

🚨 Breaking Changes

Python 3.9 is no longer supported.

🔥 Motivation

🔨 Test Plan

🔗 Related issues/PRs

@JP-Ellis JP-Ellis self-assigned this Oct 3, 2025
@Copilot Copilot AI review requested due to automatic review settings October 3, 2025 03:50
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR modernizes the Python support by adding support for Python 3.14 and dropping support for Python 3.9 (which has reached end-of-life). The changes include updating type annotations to use modern Python syntax and removing dependencies on typing-extensions for Python 3.10+.

  • Adds Python 3.14 support and removes Python 3.9 support across all project configurations
  • Updates type annotations to use modern Python union syntax (str | None instead of Union[str, None])
  • Moves imports that require newer Python versions into TYPE_CHECKING blocks for better compatibility

Reviewed Changes

Copilot reviewed 41 out of 41 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pyproject.toml Updates Python version support from 3.9-3.13 to 3.10-3.14, removes typing-extensions dependency for runtime
src/pact/types.py Modernizes type annotations using union operator syntax
src/pact/verifier.py Consolidates imports and removes Python 3.9 compatibility code
Multiple test files Adds from __future__ import annotations imports for forward compatibility
GitHub workflows Updates CI configuration to test Python 3.10-3.14 instead of 3.9-3.13
Example projects Updates minimum Python requirement and modernizes type annotations

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

codecov bot commented Oct 3, 2025

Codecov Report

❌ Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 52%. Comparing base (0e3942f) to head (05baf4d).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/pact/verifier.py 75% 1 Missing ⚠️
Additional details and impacted files
@@         Coverage Diff          @@
##           main   #1263   +/-   ##
====================================
- Coverage    52%     52%   -1%     
====================================
  Files        32      32           
  Lines      3740    3739    -1     
====================================
- Hits       1967    1966    -1     
  Misses     1773    1773           
Flag Coverage Δ
tests 52% <91%> (-1%) ⬇️

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

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

@JP-Ellis JP-Ellis force-pushed the chore/drop-python-39-add-314 branch 2 times, most recently from 51f7598 to 62447e0 Compare October 6, 2025 00:46
Add support for Python 3.14, and drop support for Python 3.9 as it has
reached its end-of-life.

BREAKING CHANGE: Python 3.9 is no longer supported.

Signed-off-by: JP-Ellis <[email protected]>
Pydantic 3.12 is going to be released shortly, but until then, any test
that depends on Pydantic will not pass CI.

Signed-off-by: JP-Ellis <[email protected]>
@JP-Ellis JP-Ellis force-pushed the chore/drop-python-39-add-314 branch from 62447e0 to 05baf4d Compare October 6, 2025 01:10
@JP-Ellis JP-Ellis merged commit f1816d3 into main Oct 6, 2025
59 checks passed
@JP-Ellis JP-Ellis deleted the chore/drop-python-39-add-314 branch October 6, 2025 01:43
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