Repository navigation
feat!: remove pact.v2 compatibility module - #1722
Merged
Merged
Conversation
JP-Ellis
added this pull request to stack #1724
October 14, 2026 21:57
This was referenced Oct 14, 2026
JP-Ellis
force-pushed
the
remove-pact-v2
branch
from
October 14, 2026 22:07
035746f to
a21352c
Compare
JP-Ellis
force-pushed
the
remove-pact-v2
branch
from
October 14, 2026 22:16
a21352c to
f3b8422
Compare
The `pact.v2` module kept the Pact Python 2.x API importable during the 3.x series so larger codebases could migrate incrementally. It has been available for over a year, receives no new features, and is the only part of the package that relies on the Ruby standalone CLI. Removes `pact.v2`, its tests and examples, the `compat-v2` extra, the `pact-verifier` console script, the `v2-test`/`v2-example` hatch environments and the v2 CI step. The sub-package mypy and ruff overrides existed only to undo the root's v2 exclusions, so they go too. MIGRATION.md gains a 3.x to 4.x section pointing users who cannot move yet at `pact-python<4`. BREAKING CHANGE: `pact.v2`, the `compat-v2` extra and the `pact-verifier` console script are removed. Migrate to the `pact` API (see MIGRATION.md) or pin `pact-python<4`. Assisted-by: Claude Code:claude-opus-5-5
JP-Ellis
marked this pull request as ready for review
October 14, 2026 22:30
JP-Ellis
force-pushed
the
remove-pact-v2
branch
from
October 14, 2026 22:31
f3b8422 to
45f922a
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1722 +/- ##
=====================================
- Coverage 74% 69% -6%
=====================================
Files 36 22 -14
Lines 4109 3355 -754
=====================================
- Hits 3063 2333 -730
+ Misses 1046 1022 -24
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
Assisted-by: Claude Code:claude-opus-5-5
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
Removes the
pact.v2compatibility module. It has kept the Pact Python 2.x API importable for the whole 3.x series.Removed:
src/pact/v2/,tests/v2/,examples/v2/, and the v2 Copilot instructions.compat-v2extra and thepact-verifierconsole script.example-v2/test-v2dependency groups and thev2-test/v2-examplehatch environments.pyproject.tomlfiles setexcludeonly to undo the root's v2 exclusions, so those overrides are removed too.tests/compatibility_suite/test_v2_*.pystay. They test version 2 of the Pact specification, which is unrelated topact.v2.MIGRATION.mdgains a "Migrating from3.xto4.x" section, and its compat-module walkthrough is replaced by a pointer to that section. Each major-version section has its own "Key Changes" heading, so the file disablesno-duplicate-heading.🚨 Breaking Changes
pact.v2, thecompat-v2extra and thepact-verifierconsole script no longer exist.pactAPI using the 2.x → 3.x guide inMIGRATION.md. Projects that can't migrate yet can pinpact-python<4.BREAKING CHANGE:footer, so git-cliff proposes 4.0.0 for the core release.🔥 Motivation
pact.v2has been deprecated for over a year and receives no new features.pact-python-clileave this repository in chore(cli): remove pact-python-cli #1723.compat-v2extra pinspact-python-cli~=2.5while the uv workspace builds the local CLI package, so the CLI couldn't change independently while it existed.🔨 Test Plan
ruff check,ruff format --checkand mypy onexamples/,src/andtests/pass. mypy needed no v2 excludes.uv locksucceeds. It dropspsutil, which onlycompat-v2used.🔗 Related issues/PRs
Stack: #1721 → #1722 → #1723. Merge after
pact-python-cli2.6.4.0 is released from #1609.