Pact-python

Latest version: v2.3.1

Safety actively analyzes 701868 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 9

2.3.1

🐛 Bug Fixes

- _(v3)_ Defer setting pact broker source

Contributors

- JP-Ellis

2.3.0

🚀 Features

- _(v3)_ Add message relay and callback servers
- _(v3)_ [**breaking**] Integrate message relay server
> The provider name must be given as an argument of the `Verifier` constructor, instead of the first argument of the `set_info` method.
- _(v3)_ [**breaking**] Add state handler server
> `set_state` has been renamed to `state_handler`. If using a URL still, the `body` keyword argument is now a _required_ parameter.
- _(v3)_ [**breaking**] Further simplify message interface
> `message_handler` signature has been changed and expanded.

🎨 Styling

- Lint
- Lint

📚 Documentation

- Fix minor typos
- _(blog)_ Add functional arguments post

⚙️ Miscellaneous Tasks

- Fix __url__
- _(ci)_ Pin full version
- Add yamlfix
- Remove docker files and scripts
- Update biome version
- Rename master to main
- _(ci)_ Pin typos to version
- _(ci)_ Pin minor version of checkout action
- Silence unset default fixture loop scope
- _(ci)_ Replace pre-commit/action
- _(v3)_ [**breaking**] Remove unnecessary underscores
> The PactServer `__exit__` arguments no longer have leading underscores. This is typically handled by Python itself and therefore is unlikely to be a change for any user, unless the end user was calling the `__exit__` method explicitly _and_ using keyword arguments.
- _(v3)_ [**breaking**] Make util module private
> `pact.v3.util` has been renamed to `pact.v3._util` and is now private.
- _(ci)_ Upgrade macos-12 to macos-13
- _(c)_ Specify full action version
- Add pytest-xdist
- _(ci)_ Remove condition on examples
- Update tests to use new message/state fns
- Adapt examples to use function handlers
- Move matchers test out of examples
- Adjust tests based on new implementation
- Remove dead code
- Fix compatibility with 3.9, 3.10
- Add pytest-rerunfailures
- Fix windows compatibility
- _(ci)_ Automerge renovate PRs

Contributors

- JP-Ellis

2.2.2

🚀 Features

- _(examples)_ Add post and delete
- Add matchable typevar
- Add strftime to java date format converter
- Add match aliases
- Add uuid matcher
- Add each key/value matchers
- Add ArrayContainsMatcher
- [**breaking**] Improve mismatch error
> The `srv.mismatches` is changed from a `list[dict[str, Any]]` to a `list[Mismatch]`.
- [**breaking**] Add Python 3.13, drop 3.8
> Python 3.8 support dropped

🐛 Bug Fixes

- Missing typing arguments
- Incompatible override
- Kwargs typing
- Ensure matchers optionally use generators
- _(examples)_ Do not overwrite pact file on every test
- _(examples)_ Use wget for broker healthcheck
- _(examples)_ Correct URL for healthcheck
- _(examples)_ Do not publish postgres port
- Typing annotations
- ISO 8601 incompatibility

🚜 Refactor

- Prefer `|` over Optional and Union
- Rename matchers to match
- Split types into stub
- Matcher
- Rename generators to generate
- Generate module in style of match module
- Create pact.v3.types module
- Generators module
- Match module

📚 Documentation

- _(blog)_ Don't use footnote numbers
- _(blog)_ Add async message blog post
- Update example docs
- Add matcher module preamble
- Add module docstring

⚙️ Miscellaneous Tasks

- _(ci)_ Use pypi trusted publishing
- Fix typo in previous blog post
- _(ci)_ Update docs on push to master
- Regroup ruff in renovate
- Add extra checks
- Added v3 http interaction examples
- _(ci)_ Add codecov
- Refactor tests
- Prefer ABC over ABCMeta
- Re-organise match module
- Split stdlib and 3rd party types
- Silence a few mypy complaints
- Add pyi to editor config
- Add test for full ISO 8601 date
- Minor improvements to match.matcher
- Align generator with matcher
- Remove MatchableT
- Get test to run again
- Add boolean alias
- Fix compatibility with Python <= 3.9
- Fix match tests
- Remove unused generalisation
- Use matchers in v3 examples
- Use native Python datetime object
- Adjust tests to use new Mismatch class
- Disable wait
- _(ci)_ Switch to uv fully
- _(ci)_ Disable docs workflow on tags
- _(ci)_ Tweak build conditions
- Disable pypy builds

Contributors

- JP-Ellis
- individual-it
- valkolovos
- amit828as

2.2.1

🚀 Features

- _(ffi)_ Upgrade ffi 0.4.21
- _(v3)_ Add enum type aliases
- _(v3)_ Improve exception types
- _(v3)_ Remove deprecated messages iterator
- _(v3)_ Implement message verification
- _(v3)_ Add async message provider
- _(ffi)_ Upgrade ffi to 0.4.22

🐛 Bug Fixes

- _(ffi)_ Use `with_binary_body`

🚜 Refactor

- _(v3)_ New interaction iterators
- _(tests)_ Make `_add_body` a method of Body
- _(tests)_ Move InteractionDefinition in own module

📚 Documentation

- _(CONTRIBUTING.md)_ Update installation steps
- Add additional code capabilities
- Add blog post about rust ffi
- _(ffi)_ Properly document exceptions
- Minor refinements
- _(example)_ Clarify purpose of fs interface

⚙️ Miscellaneous Tasks

- Group renovate updates
- Use uv to install packages
- _(v3)_ Re-export Pact and Verifier at root
- _(ffi)_ Disable private usage lint
- _(ffi)_ Implement AsynchronousMessage
- _(ffi)_ Implement Generator
- _(ffi)_ Implement MatchingRule
- _(ffi)_ Remove old message and message handle
- _(ffi)_ Implement MessageContents
- _(ffi)_ Implement MessageMetadataPair and Iterator
- _(ffi)_ Implement ProviderState and related
- _(ffi)_ Implement SynchronousHttp
- _(ffi)_ Implement SynchronousMessage
- _(ffi)_ Bump links to 0.4.21
- _(tests)_ Implement v3/v4 consumer message compatibility suite
- _(examples)_ Add v3 message consumer examples
- Update GitHub templates
- _(examples)_ Add asynchronous message
- _(tests)_ Replace stderr with logger
- _(tests)_ Increase message shown by `truncate`
- Minor typing fix
- _(tests)_ Significant refactor of InteractionDefinition
- _(tests)_ Add v4 message provider compatibility suite
- _(tests)_ Skip windows tests
- _(ci)_ Disable windows arm wheels

� Other

- Fix macos-latest
- Narrow when docs are built and published

Contributors

- JP-Ellis
- valkolovos
- qmg-drettie

2.2.0

🚀 Features

- _(v3)_ Add verifier class
- _(v3)_ Add verbose mismatches
- Upgrade FFI to 0.4.19

🐛 Bug Fixes

- Delay pytest 8.1
- _(v3)_ Allow optional publish options
- _(v3)_ Strip embedded user/password from urls

🚜 Refactor

- _(tests)_ Move parse_headers/matching_rules out of class
- Remove relative imports

📚 Documentation

- Setup mkdocs
- Update README
- Rework mkdocs-gen-files scripts
- Ignore private python modules
- Overhaul readme
- Update v3 docs
- Fix links to docs/
- Add social image support
- Add blog post about v2.2

⚙️ Miscellaneous Tasks

- _(ci)_ Remove cirrus
- _(ffi)_ Implement verifier handle
- _(v3)_ Add basic verifier tests
- Unskip tests
- Fix missed s/test/devel-test/
- _(v3)_ Improve body representation
- _(test)_ Improve test logging
- _(tests)_ Update log formatting
- _(test)_ Add state to interaction definition
- _(test)_ Adapt InteractionDefinition for provider
- _(test)_ Add serialize function
- _(test)_ Add provider utilities
- _(tests)_ Add v1 provider compatibility suite
- _(tests)_ Fixes for lower python versions
- _(tests)_ Re-enable warning check
- _(tests)_ Improve logging from provider
- _(test)_ Strip authentication from url
- _(tests)_ Use long-lived pact broker
- _(test)_ Apply a temporary diff to compatibility suite
- _(test)_ Refactor v1 bdd steps
- _(test)_ Fix misspelling in step name
- _(tests)_ Improve logging
- _(tests)_ Allow multiple states with parameters
- _(tests)_ Implement http provider compatibility suite
- _(tests)_ Fix compatibility with py38
- _(docs)_ Update emoji indices/generators
- _(docs)_ Fix typos
- _(docs)_ Enforce fenced code blocks
- _(docs)_ Minor fixes in examples/
- Remove redundant __all__
- _(docs)_ Update examples/readme.md
- _(ci)_ Update environment variables
- _(docs)_ Only publish from master
- _(test)_ Disable failing tests on windows

Contributors

- JP-Ellis
- JosephBJoyce

2.1.3

🐛 Bug Fixes

- Avoid wheel bloat

📚 Documentation

- Fix repository link typo
- Fix links to `CONTRIBUTING.md`

⚙️ Miscellaneous Tasks

- _(ci)_ Fix pypy before-build
- _(ci)_ Pin os to older versions
- _(ci)_ Set osx deployment target
- _(ci)_ Replace hatch clean with rm
- _(ci)_ Update concurrency group
- _(ci)_ Adapt before-build for windows

Contributors

- JP-Ellis

Page 1 of 9

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.