pact-python/3.0.0a1
Pre-release[pact-python/3.0.0a1] 2025-08-12
🚀 Features
- Create pact-python-cli package
- (cli) Build abi-agnostic wheels
- (ffi) Add standalone ffi package
- (v3) [breaking] Remove pact.v3.ffi module
pact.v3.ffiis removed, and to be replaced bypact_ffi. That is,pact.v3.ffi.$fnshould be replaced bypact_ffi.$fn. - [breaking] Prepare for v3 release
This prepares for version 3. Pact Python v2 will be still accessible under
pact.v2and all imports should be appropriate renamed. Everyone is encouraged to migrate to Pact Python v3. - [breaking] Simplify
givenThe signature of
Interaction.givenhas been updated. The following changes are required: - Changegiven("state", key="user_id", value=123)togiven("state", user_id=123). This can take an arbitrary number of keyword arguments. If the key is not a valid Python keyword argument, use the dictionary input below. - Changegiven("state", parameters={"user_id": 123})togiven("state", {"user_id": 123}). - [breaking] Deserialize metadata values
As the metadata values are now deserialised, the type of the metadata values may change. For example, setting metadata
user_id=123will now pass{"user_id": 123}through to the function handler. Previously, this would have been{"user_id": "123"}.
🐛 Bug Fixes
- Matcher type variance
- With metadata function signature
- [breaking] Use correct datetime default format
If you relied on the previous default (undocumented) behaviour, prefer specifying the format explicitly now:
match.datetime(regex="%Y-%m-%dT%H:%M:%S.%f%z"). - Handle empty state callback
- (verifier) [breaking] Propagate branch
If a branch is set through either
set_publish_optionsorprovider_branch, the value will be saved and used as a default for both in subsequent calls.
🚜 Refactor
- Functional state handler
📚 Documentation
- Update changelog for v2.3.3
- (blog) Fix v3 references
- Fix v3 references
- V3 review
- Update git cliff configuration
⚙️ Miscellaneous Tasks
- Update pre-commit hooks
- Use the new
pact_clipackage - Remove packaging of pact cli
- (ci) Incorporate tests of pact cli
- (ci) Use new
pact-python/*tags - (ci) Add build cli pipeline
- Exclude hatch_build from mypy checks
- (ci) Narrow token permissions
- Remove macosx deployment target
- (ci) Fix cli publish permissions
- Properly extract tag version
- Update gitignore
- (ci) Fix core package build
- Split out dependencies and tests
- (ci) Update labels
- (ci) Fix labels
- (tests) Re-organise tests
- Fix bad copy-paste in tests
- Log exceptions from apply_args
- Improve logging from apply_args
- (examples) Start examples overhaul
- (ci) Use new examples
- Update protobuf examples
- (ci) Cancel ci on PRs
- Add vscode settings and extensions
- Add envrc
- Replace yamlfix with yamlfmt
- Remove deptry config
- Support pre and post release tags
- Fix typo
Contributors
Pull Requests
- docs: update ffi changelog by @JP-Ellis in #1131
- feat(v3)!: remove pact.v3.ffi module by @JP-Ellis in #1132
- docs(ffi): fix old references to pact.v3.ffi by @JP-Ellis in #1133
- chore(cli): cleanup build script by @JP-Ellis in #1136
- chore(ffi): cleanup build script by @JP-Ellis in #1135
- chore(cli): fix flakey test by @JP-Ellis in #1137
- chore(deps): update pypa/cibuildwheel action to v3.1.2 by @renovate[bot] in #1075
- chore(deps): update pre-commit hook biomejs/pre-commit to v2.1.3 by @renovate[bot] in #1138
- fix(deps): update ruff to v0.12.7 by @renovate[bot] in #1128
- feat!: prepare for v3 release by @JP-Ellis in #1139
- fix(deps): update dependency mypy to v1.17.1 by @renovate[bot] in #1141
- chore(ci): update labels by @JP-Ellis in #1140
- chore(ci): fix labels by @JP-Ellis in #1142
- chore(deps): update pypa/cibuildwheel action to v3.1.3 by @renovate[bot] in #1143
- chore(deps): update taiki-e/install-action action to v2.57.5 by @renovate[bot] in #1144
- chore(deps): update pre-commit hook crate-ci/typos to v1.35.1 by @renovate[bot] in #1145
- chore(deps): update actions/download-artifact action to v5 by @renovate[bot] in #1146
- docs: v3 review by @JP-Ellis in #1147
- chore(deps): fix optional dependencies by @JP-Ellis in #1148
- chore(deps): remove unused optional dependency by @JP-Ellis in #1149
- feat!: simplify
givenby @JP-Ellis in #1150 - feat!: with_metadata by @JP-Ellis in #1151
- chore(deps): update actions/cache action to v4.2.4 by @renovate[bot] in #1152
- fix(deps): update ruff to v0.12.8 by @renovate[bot] in #1153
- chore(deps): update pre-commit hook crate-ci/typos to v1.35.2 by @renovate[bot] in #1155
- chore: log exceptions from apply_args by @JP-Ellis in #1157
- chore: improve logging from apply_args by @JP-Ellis in #1158
- fix: use correct datetime default format by @JP-Ellis in #1156
- refactor: functional state handler by @JP-Ellis in #1159
- chore(deps): update pre-commit hook biomejs/pre-commit to v2.1.4 by @renovate[bot] in #1160
- fix: handle empty state callback by @JP-Ellis in #1161
- chore(deps): update pre-commit hook crate-ci/typos to v1.35.3 by @renovate[bot] in #1163
- chore(deps): update pre-commit hook pre-commit/pre-commit-hooks to v6 by @renovate[bot] in #1164
- chore(deps): update taiki-e/install-action action to v2.58.6 by @renovate[bot] in #1165
- chore(deps): update taiki-e/install-action action to v2.58.7 by @renovate[bot] in #1167
- chore(examples): start examples overhaul by @JP-Ellis in #1166
- chore: set verifier branch same as publisher branch by @kevinrvaz in #1162
- chore(deps): update actions/checkout action to v5 by @renovate[bot] in #1169
- chore: add vscode settings and extensions by @JP-Ellis in #1171
- chore: add envrc by @JP-Ellis in #1170
- chore(deps): switch to dependency groups by @JP-Ellis in #1172
- docs: update git cliff configuration by @JP-Ellis in #1173
- chore: support pre and post release tags by @JP-Ellis in #1174
- chore: fix typo by @JP-Ellis in #1175
New Contributors
- @kevinrvaz made their first contribution in #1162
Full Changelog: pact-python-ffi/0.4.22.0...pact-python/3.0.0a1