Skip to content

Releases: pact-foundation/pact-python

pact-python/3.3.0

17 Apr 06:04

Choose a tag to compare

🚀 Features

  • Add xml matching

    A new pact.xml module provides builder functions for constructing XML request and response bodies with embedded Pact matchers. Use xml.element() to describe the XML structure and attach matchers where needed, then wrap the result with xml.body() before passing it to with_body(..., content_type="application/xml"):

    from pact import match, xml
    
    response = xml.body(
        xml.element(
            "user",
            xml.element("id", match.int(123)),
            xml.element("name", match.str("Alice")),
        )
    )
    interaction.with_body(response, content_type="application/xml")

    Repeating elements are supported via .each(min=1, examples=2) on any XmlElement. Attributes (including namespace declarations) can be passed via the attrs keyword argument.

  • Allow iteration over all interactions

  • Use common PactInteraction type

  • Can toggle follow redirects

  • Allow plugin loading delay

📚 Documentation

  • Update changelog for pact-python/3.2.1
  • (examples) Add http+xml example
  • Update xml example to use new matcher
  • (examples) Add service consumer/provider HTTP example

⚙️ Miscellaneous Tasks

  • (ci) Re-enable 3.14 tests
  • Upgrade stable python version
  • Add .worktrees to .gitignore
  • (ci) Reduce ci usage
  • (ci) Downgrade stable python version
  • (ci) Remove unused workflows
  • Remove versioningit, switch to static version in pyproject.toml
  • Add release script
  • Minor update to cliff config
  • Authenticate gh api calls
  • Remove release label
  • Replace taplo with tombi
  • (ci) Have wheel target 310
  • (ci) Avoid most of CI on draft PRs
  • Fix hatch env workspaces
  • Remove connect test

� Other

  • Fix coverage upload overwrite and add example coverage

Contributors

pact-python-ffi/0.5.3.0

17 Apr 05:48

Choose a tag to compare

🚀 Features

  • Removed:
    • create_mock_server (use create_mock_server_for_transport instead)
    • create_mock_server_for_pact (use create_mock_server_for_pact_and_transport instead)
    • verify
    • verifier_cli_args
  • Added:
    • verifier_set_follow_redirects
    • using_plugin_with_delay
  • Allow iteration over all interactions
  • Implement the Pact class
  • Add handle to pointer conversion
  • Add casting interaction to subtypes
  • Add iterator over all interactions

🐛 Bug Fixes

  • Incorrect sync http deletion

📚 Documentation

  • Update changelogs

⚙️ Miscellaneous Tasks

  • Update non-compliant docstrings and types
  • Upgrade pymdownx extensions
  • Fix json schema url
  • Remove ruff sub-configs
  • Switch to versioningit
  • Ensure pact interactions get deleted
  • Add ruff ignores for tests
  • Refactor ffi tests
  • Remove versioningit, switch to static version in pyproject.toml
  • Minor update to cliff config
  • Replace taplo with tombi

Contributors

pact-python-cli/2.6.0.0

16 Apr 23:07

Choose a tag to compare

🐛 Bug Fixes

  • Bundle both ruby and rust CLIs

📚 Documentation

  • Update changelog for pact-python-cli/2.5.7.0

⚙️ Miscellaneous Tasks

  • Remove versioningit, switch to static version in pyproject.toml
  • Minor update to cliff config
  • Replace taplo with tombi
  • Allow windows arm cli builds to proceed

Contributors

pact-python/3.2.1

10 Dec 08:12
pact-python/3.2.1

Choose a tag to compare

[pact-python/3.2.1] 2025-12-10

📚 Documentation

  • Update changelog for pact-python/3.2.0
  • Fix internal references
  • Add v3 blog post
  • Fix partial url highlight
  • Fix tooltips in code
  • Remove redundant header from blog post

⚙️ Miscellaneous Tasks

  • (ci) Use strict docs building
  • Switch to versioningit

Contributors

Pull Requests

What's Changed

  • docs: update changelog by @JP-Ellis in #1377
  • chore(deps): update python docker tag to v3.14 by @renovate[bot] in #1375
  • chore(deps): update python:3.14-slim docker digest to 4451352 by @renovate[bot] in #1378
  • chore(deps): update python:3.14-slim docker digest to b823ded by @renovate[bot] in #1379
  • docs: fix internal references by @JP-Ellis in #1381
  • chore(ci): use strict docs building by @JP-Ellis in #1382
  • docs: add v3 blog post by @JP-Ellis in #1380
  • docs: fix partial url highlight by @JP-Ellis in #1383
  • chore(deps): update ruff to v0.14.8 by @renovate[bot] in #1384
  • docs: remove redundant header from blog post by @JP-Ellis in #1385
  • chore(deps): update peter-evans/create-pull-request action to v7.0.11 by @renovate[bot] in #1386
  • chore(deps): update pre-commit hook davidanson/markdownlint-cli2 to v0.20.0 by @renovate[bot] in #1387
  • chore(deps): update astral-sh/setup-uv action to v7.1.5 by @renovate[bot] in #1388
  • chore(deps): update taiki-e/install-action action to v2.62.63 by @renovate[bot] in #1389
  • chore(deps): update python:3.14-slim docker digest to fd2aff3 by @renovate[bot] in #1390
  • feat(cli): update to 2.5 by @JP-Ellis in #1394
  • fix(cli)!: remove 32-bit wheels by @JP-Ellis in #1398
  • chore(deps): update codecov/codecov-action action to v5.5.2 by @renovate[bot] in #1392
  • chore(deps): update peter-evans/create-pull-request action to v8 by @renovate[bot] in #1393
  • chore: switch to versioningit by @JP-Ellis in #1397
  • fix(deps): update minimum cli version by @JP-Ellis in #1396

Full Changelog: pact-python/3.2.0...pact-python/3.2.1

pact-python-cli/2.5.7.0

10 Dec 08:02
pact-python-cli/2.5.7.0

Choose a tag to compare

[pact-python-cli/2.5.7.0] 2025-12-10

🚀 Features

  • (ffi) Add standalone ffi package
  • (v3) [breaking] Remove pact.v3.ffi module

    pact.v3.ffi is removed, and to be replaced by pact_ffi. That is, pact.v3.ffi.$fn should be replaced by pact_ffi.$fn.

  • (ffi) Upgrade lib to 0.4.28

🐛 Bug Fixes

  • Allow none in with_metadata
  • (ffi) Make version dynamic

📚 Documentation

  • Update changelog for pact-python-ffi/0.4.22.0
  • (ffi) Fix old references to pact.v3.ffi
  • V3 review
  • Update git cliff configuration
  • Update changelog for pact-python-ffi/0.4.28.0
  • Update changelog for pact-python-ffi/0.4.28.1
  • Fix CI badge links
  • Update changelogs

⚙️ Miscellaneous Tasks

  • (ffi) Cleanup build script
  • Ignore extensions
  • Split out dependencies and tests
  • Support pre and post release tags
  • Remove reference count checks
  • Store hatch venv in .venv
  • Fix sub-project git cliff config
  • (ffi) Clean up data directory
  • [breaking] Drop python 3.9 add 3.14

    Python 3.9 is no longer supported.

  • Update non-compliant docstrings and types
  • Upgrade pymdownx extensions
  • Fix json schema url
  • Remove ruff sub-configs
  • Switch to versioningit

Contributors

Pull Requests

What's Changed

Read more

pact-python/3.2.0

02 Dec 23:51
pact-python/3.2.0
9d9eb2b

Choose a tag to compare

[pact-python/3.2.0] 2025-12-02

🚀 Features

  • Add consumer_version method
  • Add content type matcher
  • Add 'and' matcher

🐛 Bug Fixes

  • Use correct matching rule serialisation

📚 Documentation

  • Update changelog for pact-python/3.1.0
  • Add agents.md
  • Update configuration
  • Add logging documentation
  • Add multipart/form-data matching rule example
  • Add consumer_version

⚙️ Miscellaneous Tasks

  • Add llm instructions
  • Update non-compliant docstrings and types
  • Upgrade pymdownx extensions
  • Set telemetry environment variables
  • (docs) Api docs link on pact-python site is case sensitive
  • Fix json schema url
  • (tests) Fix skipped tests on windows
  • (ci) Update macos runners
  • Remove unused pytest config
  • Remove ruff sub-configs
  • Switch to markdownlint-cli2
  • Rerun flaky tests
  • Remove unused function
  • Don't except AssertionError
  • (devcontainer) Add multi-arch development container support

Contributors

Pull Requests

What's Changed

  • docs: update changelog by @JP-Ellis in #1283
  • chore(deps): update astral-sh/setup-uv action to v7 by @renovate[bot] in #1286
  • chore(deps): update pre-commit hook crate-ci/typos to v1.38.1 by @renovate[bot] in #1284
  • chore(deps): update ruff to v0.14.0 by @renovate[bot] in #1285
  • chore: add llm instructions by @JP-Ellis in #1287
  • chore(deps): update softprops/action-gh-release action to v2.4.1 by @renovate[bot] in #1288
  • chore(deps): update pypa/cibuildwheel action to v3.2.1 by @renovate[bot] in #1289
  • chore(deps): update astral-sh/setup-uv action to v7.1.0 by @renovate[bot] in #1290
  • chore(deps): update taiki-e/install-action action to v2.62.28 by @renovate[bot] in #1291
  • docs: add agents.md by @JP-Ellis in #1292
  • chore: update non-compliant docstrings and types by @JP-Ellis in #1293
  • chore(deps): update pre-commit hook biomejs/pre-commit to v2.2.6 by @renovate[bot] in #1294
  • chore(deps): update ruff to v0.14.1 by @renovate[bot] in #1296
  • chore(deps): update pre-commit hook google/yamlfmt to v0.18.1 by @renovate[bot] in #1295
  • docs: update configuration by @JP-Ellis in #1297
  • chore(deps): update pre-commit hook google/yamlfmt to v0.19.0 by @renovate[bot] in #1298
  • chore(deps): update astral-sh/setup-uv action to v7.1.1 by @renovate[bot] in #1299
  • chore(deps): update taiki-e/install-action action to v2.62.33 by @renovate[bot] in #1300
  • Document how to configure FFI logging by @Copilot in #1303
  • chore(deps): update pre-commit hook google/yamlfmt to v0.20.0 by @renovate[bot] in #1301
  • chore: upgrade pymdownx extensions by @JP-Ellis in #1304
  • chore(deps): update ruff to v0.14.2 by @renovate[bot] in #1306
  • chore(deps): update pre-commit hook biomejs/pre-commit to v2.2.7 by @renovate[bot] in #1305
  • chore(deps): update github artifact actions (major) by @renovate[bot] in #1307
  • chore(deps): update astral-sh/setup-uv action to v7.1.2 by @renovate[bot] in #1309
  • chore(deps): update pre-commit hook biomejs/pre-commit to v2.3.0 by @renovate[bot] in #1308
  • chore(deps): update taiki-e/install-action action to v2.62.38 by @renovate[bot] in #1310
  • chore(deps): update pre-commit hook biomejs/pre-commit to v2.3.1 by @renovate[bot] in #1311
  • feat: set telemetry environment variables for Pact CLI execution by @Nikhil172913832 in #1312
  • chore(deps): update pre-commit hook biomejs/pre-commit to v2.3.2 by @renovate[bot] in #1313
  • chore(deps): update ruff to v0.14.3 by @renovate[bot] in #1314
  • chore(deps): update pre-commit hook crate-ci/typos to v1.39.0 by @renovate[bot] in #1317
  • chore(docs): api docs link on pact-python site is case sensitive by @YOU54F in #1316
  • chore(deps): update taiki-e/install-action action to v2.62.45 by @renovate[bot] in #1318
  • chore(deps): update pre-commit hook biomejs/pre-commit to v2.3.3 by @renovate[bot] in #1320
  • chore(deps): update softprops/action-gh-release action to v2.4.2 by @renovate[bot] in #1324
  • chore: fix json schema url by @JP-Ellis in #1326
  • chore(deps): update pre-commit hook biomejs/pre-commit to v2.3.4 by @renovate[bot] in #1321
  • chore(deps): update ruff to v0.14.4 by @renovate[bot] in #1322
  • chore(deps): update taiki-e/install-action action to v2.62.49 by @renovate[bot] in #1325
  • chore(deps): update astral-sh/setup-uv action to v7.1.3 by @renovate[bot] in #1327
  • chore(deps): update dependency pytest to v9 by @renovate[bot] in #1323
  • feat: add consumer_version method by @JP-Ellis in #1315
  • fix: use threading instead of subprocess for Windows provider tests (#639) by @Nikhil172913832 in #1328
  • chore(deps): update pre-commit hook crate-ci/typos to v1.39.2 by @renovate[bot] in #1331
  • chore(deps): update ruff to v0.14.5 by @renovate[bot] in #1332
  • chore(deps): update pre-commit hook biomejs/pre-commit to v2.3.5 by @renovate[bot] in #1329
  • chore(deps): update pypa/cibuildwheel action to v3.3.0 by @renovate[bot] in #1330
  • chore(deps): update taiki-e/install-action action to v2.62.52 by @renovate[bot] in #1334
  • chore(deps): update actions/checkout action to v5.0.1 by @renovate[bot] in #1335
  • chore(ci): update macos runners by @JP-Ellis in #1345
  • chore: remove unused pytest config by @JP-Ellis in #1337
  • chore: remove ruff sub-configs by @JP-Ellis in #1344
  • chore(deps): update dependency mkdocs-material to v9.7.0 by @renovate[bot] in #1341
  • chore(deps): update pre-commit hook biomejs/pre-commit to v2.3.6 by @renovate[bot] in #1336
  • chore(deps): update dependency griffe-pydantic to v1.1.8 by @renovate[bot] in #1340
  • chore(deps): update dependency ruff to v0.14.5 by @renovate[bot] in #1342
  • chore(deps): update dependency pytest to v9 by @renovate[bot] in #1343
  • feat: add content type matcher by @JP-Ellis in #1347
  • feat: add 'and' matcher by @JP-Ellis in #1348
  • fix: use correct matching rule serialisation by @JP-Ellis in #1349
  • chore(deps): update pre-commit hook crate-ci/committed to v1.1.8 by @renovate[bot] in #1351
  • chore: switch to markdownlint-cli2 by @JP-Ellis in #1352
  • chore(deps): update dependency mkdocs-llmstxt to v0.5.0 by @renovate[bot] in #1355
  • chore(deps): update actions/checkout action to v6 by @renovate[bot] in #1356
  • chore(deps): update astral-sh/setup-uv action to v7.1.4 by @renovate[bot] in #1357
  • chore(deps): update ruff to v0.14.6 by @renovate[bot] in #1358
  • chore(deps): update pre-commit hook biomejs/pre-commit to v2.3.7 by @renovate[bot] in https://github.com/pact-foundation/pact-python/pull/...
Read more

pact-python/3.1.0

07 Oct 05:32
pact-python/3.1.0
2fd2cd0

Choose a tag to compare

🐛 Bug Fixes

  • [breaking] Replace v2 extra with compat-v2

    Installing Pact Python with v2 compatibility requires pip install 'pact-python[compat-v2]', and the old pip install 'pact-python[v2]' is no longer supported.

📚 Documentation

  • Update changelogs

⚙️ Miscellaneous Tasks

  • (ci) Add area-core label
  • (ci) Fix labels workflow permissions
  • Remove no longer relevant todo
  • (docs) Use normalized project url keys

Contributors

Pull Requests

What's Changed

Full Changelog: pact-python/3.0.1...pact-python/3.1.0

pact-python/3.0.1

06 Oct 06:25
pact-python/3.0.1

Choose a tag to compare

📚 Documentation

  • Update changelog for pact-python/3.0.0

⚙️ Miscellaneous Tasks

  • Drop cffi dependency
  • (ci) Fix publish step

Contributors

Pull Requests

What's Changed

Full Changelog: pact-python/3.0.0...pact-python/3.0.1

pact-python/3.0.0

06 Oct 01:54
pact-python/3.0.0

Choose a tag to compare

This is a complete rework from version 2.x and will require manual changes. The below change log reflects only the changes since the 3.0.0a1 release only, and the work leading up to 3.0.0 has been spread across a number of releases.

Please refer to the migration guide for a complete guide on how to migrate to 3.x. The consumer and provider docs have also been update to use the new interface.

🚀 Features

  • [breaking] Default to v4 specification

    Pact instances default to version 4 of the Pact specification (previously used version 3). This should be mostly backwards compatible, but can be reverted by using with_specification("V3").

  • Populate broker source from env

🚜 Refactor

  • (ci) If statement

🎨 Styling

  • (tests) Add sections

📚 Documentation

  • Update changelog for pact-python/3.0.0a1
  • Add mascot
  • Give mascot outline
  • Set mascot width and height
  • (examples) Add requests and fastapi
  • Generate llms.txt
  • Update mkdocs material features
  • Fix CI badge links
  • Update matcher docs
  • Improve matchers
  • Improve generators
  • Update for v3 and add migration guide

⚙️ Miscellaneous Tasks

  • (ci) Remove spelling check
  • (examples) Minor improvements
  • Store hatch venv in .venv
  • Update mismatch repr
  • Save mismatches before exiting the server
  • (examples) Remove old http example
  • Fix sub-project git cliff config
  • Hide import from traceback
  • Fix flask integer coercion
  • Add v3 matching rules test
  • Add v4 matching rules tests
  • (ci) Add publish as completion dependency
  • (tests) Add generators to interaction defn
  • (tests) Test v3 generators
  • (test) Add v4 generators tests
  • Re-add pytest rerunfailrure
  • (tests) Add v3 http generators
  • Prefer prek over pre-commit
  • Disable reruns in vscode
  • (ci) Fix prek caching
  • (ci) Generate junit xml files
  • Move mascot file out of root
  • Update uuid format names
  • Fix import warning
  • Make Unset falsey
  • [breaking] Rename abstract matcher class

    The abstract pact.match.Matcher class has been renamed to pact.match.AbstractMatcher.

  • [breaking] Rename abstract generator

    The abstract pact.generate.Generator class has been renamed to pact.generate.AbstractGenerator.

  • Clarify explanation of given
  • [breaking] Drop python 3.9 add 3.14

    Python 3.9 is no longer supported.

  • (ci) Disable 3.14 tests using pydantic

Contributors

Pull Requests

What's Changed

Read more

pact-python-ffi/0.4.28.2

06 Oct 06:27
pact-python-ffi/0.4.28.2

Choose a tag to compare

📚 Documentation

  • Update changelog for pact-python-ffi/0.4.28.1
  • Fix CI badge links

⚙️ Miscellaneous Tasks

  • [breaking] Drop python 3.9 add 3.14

    Python 3.9 is no longer supported.

Contributors

Pull Requests

  • docs: update ffi changelog by @JP-Ellis in #1212
  • chore(deps): update ruff to v0.12.11 by @renovate[bot] in #1214
  • chore(deps): update pre-commit hook crate-ci/typos to v1.35.6 by @renovate[bot] in #1213
  • chore(ci): add publish as completion dependency by @JP-Ellis in #1215
  • chore(tests): add generators to interaction defn by @JP-Ellis in #1217
  • chore: re-add pytest rerunfailrure by @JP-Ellis in #1219
  • chore(deps): update astral-sh/setup-uv action to v6.6.1 by @renovate[bot] in #1218
  • chore(deps): update pre-commit hook crate-ci/typos to v1.36.1 by @renovate[bot] in #1216
  • chore(tests): add v3 http generators by @JP-Ellis in #1221
  • chore(deps): update codecov/codecov-action action to v5.5.1 by @renovate[bot] in #1223
  • chore(deps): update ruff to v0.12.12 by @renovate[bot] in #1224
  • chore(deps): update pre-commit hook crate-ci/typos to v1.36.2 by @renovate[bot] in #1225
  • chore(deps): update pypa/gh-action-pypi-publish action to v1.13.0 by @renovate[bot] in #1220
  • chore(deps): update pre-commit hook biomejs/pre-commit to v2.2.3 by @renovate[bot] in #1226
  • chore(deps): update softprops/action-gh-release action to v2.3.3 by @renovate[bot] in #1227
  • chore(deps): update taiki-e/install-action action to v2.59.1 by @renovate[bot] in #1228
  • chore(deps): update dependency cffi to v2 by @renovate[bot] in #1229
  • chore(deps): update dependency pytest-cov to v7 by @renovate[bot] in #1230
  • chore: prefer prek over pre-commit by @JP-Ellis in #1232
  • chore: disable reruns in vscode by @JP-Ellis in #1233
  • chore(deps): update ruff to v0.13.0 by @renovate[bot] in #1231
  • chore(deps): update pre-commit hook biomejs/pre-commit to v2.2.4 by @renovate[bot] in #1234
  • chore(deps): update dependency mypy to v1.18.1 by @renovate[bot] in #1235
  • chore(deps): update astral-sh/setup-uv action to v6.7.0 by @renovate[bot] in #1236
  • chore(deps): update taiki-e/install-action action to v2.61.3 by @renovate[bot] in #1237
  • docs: generate llms.txt by @JP-Ellis in #1244
  • docs: update mkdocs material features by @JP-Ellis in #1243
  • chore(cli): use new standalone repo path by @JP-Ellis in #1241
  • chore(deps): update dependency mypy to v1.18.2 by @renovate[bot] in #1239
  • chore(deps): update taiki-e/install-action action to v2.62.5 by @renovate[bot] in #1240
  • chore(deps): update ruff to v0.13.1 by @renovate[bot] in #1238
  • chore(deps): update pypa/cibuildwheel action to v3.2.0 by @renovate[bot] in #1242
  • chore(ci): fix prek caching by @JP-Ellis in #1246
  • chore(ci): generate junit xml files by @JP-Ellis in #1247
  • chore(deps): update actions/cache action to v4.3.0 by @renovate[bot] in #1245
  • chore(deps): update pre-commit hook crate-ci/typos to v1.36.3 by @renovate[bot] in #1248
  • chore(deps): update ruff to v0.13.2 by @renovate[bot] in #1249
  • chore: move mascot file out of root by @JP-Ellis in #1250
  • chore: update uuid format names by @JP-Ellis in #1251
  • chore(deps): update taiki-e/install-action action to v2.62.13 by @renovate[bot] in #1252
  • chore(deps): update astral-sh/setup-uv action to v6.8.0 by @renovate[bot] in #1254
  • chore: remove logger from hatch_build by @JP-Ellis in #1256
  • docs: fix CI badge links by @JP-Ellis in #1257
  • chore(deps): update pre-commit hook crate-ci/typos to v1.37.1 by @renovate[bot] in #1255
  • chore(deps): update ruff to v0.13.3 by @renovate[bot] in #1258
  • chore: fix import warning by @JP-Ellis in #1259
  • chore: make Unset falsey by @JP-Ellis in #1260
  • feat!: default to v4 specification by @JP-Ellis in #1261
  • chore(deps): update pre-commit hook biomejs/pre-commit to v2.2.5 by @renovate[bot] in #1262
  • chore(deps): update pre-commit hook crate-ci/typos to v1.37.2 by @renovate[bot] in #1264
  • chore(deps): update softprops/action-gh-release action to v2.3.4 by @renovate[bot] in #1265
  • docs: update for v3 and add migration guide by @JP-Ellis in #1253
  • chore(deps): update taiki-e/install-action action to v2.62.20 by @renovate[bot] in #1268
  • chore!: drop python 3.9 add 3.14 by @JP-Ellis in #1263
  • docs: update changelog by @JP-Ellis in #1269
  • chore: drop cffi dependency by @JP-Ellis in #1270
  • chore(ci): fix publish step by @JP-Ellis in #1271

Full Changelog: pact-python-ffi/0.4.28.1...pact-python-ffi/0.4.28.2