Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ This document outlines the key changes and migration steps for users transitioni

For teams with larger codebases that need time to fully migrate to the new v3 API, a backwards compatibility module is provided at `pact.v2`. This module contains the same API as Pact Python v2.x and serves as an interim measure to assist gradual migration.

To use the v2 compatibility module, you must install pact-python with the `v2` feature enabled:
To use the v2 compatibility module, you must install pact-python with the `compat-v2` feature enabled:

```bash
pip install pact-python[v2]
pip install pact-python[compat-v2]
```

All existing `pact.*` imports need to be updated to use `pact.v2.*` instead. Here are some common examples:
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ dependencies = [

[project.optional-dependencies]
# Dependencies required for v2 only
v2 = [
compat-v2 = [
# Pact dependencies
"pact-python-cli~=2.0",
# External dependencies
Expand Down Expand Up @@ -239,7 +239,7 @@ requires = ["hatch-vcs", "hatchling"]
python = ["3.10", "3.11", "3.12", "3.13", "3.14"]

[tool.hatch.envs.v2-test]
features = ["v2"]
features = ["compat-v2"]
installer = "uv"
path = ".venv/v2-test"
pre-install-commands = ["uv pip install --group test-v2 -e ."]
Expand All @@ -252,7 +252,7 @@ requires = ["hatch-vcs", "hatchling"]
python = ["3.10", "3.11", "3.12", "3.13", "3.14"]

[tool.hatch.envs.v2-example]
features = ["v2"]
features = ["compat-v2"]
installer = "uv"
path = ".venv/v2-example"
pre-install-commands = ["uv pip install --group example-v2 -e ."]
Expand Down