https://pact.io logo
Join Slack
Powered by
# pact-python
  • l

    Lachlan Newman

    05/01/2025, 11:13 PM
    Hey guys, just wondering, is there a command enabling or disabling the publishing of verification results with the python v3 verifier? i see the command
    set_publish_options
    but what is the behaviour if that function is not called ?
    y
    • 2
    • 1
  • g

    GitHub

    05/07/2025, 3:33 AM
    Release - v2.3.2 New release published by github-actions[bot] ## [2.3.2] 2025-05-05 ### 🚀 Features • (v3) [breaking] Allow more flexible functional arguments
    The signature of functional arguments must form a subset of the
    MessageProducerArgs
    and
    StateHandlerArgs
    typed dictionaries.
    ### 📚 Documentation • Replace commitizen with git cliff • Update blog post • Rename params -> parameters • (example) Elaborate on state handler ### ⚙️ Miscellaneous Tasks • Update pre-commit hooks • Update committed configuration • Add taplo • (ci) Update ubuntu runners • Reduce noise from taiki-e/install-action • (ci) Upload test results to codecov • Add apply_arg utility • (tests) Use consistent return value • (test) Tweak type signature • (examples) Fix state handler args ### Contributors • @JP-Ellis ## Pull Requests ## What's Changed • chore: update changelog by @JP-Ellis in #937 • chore: update pre-commit hooks by @JP-Ellis in #939 • chore: update committed configuration by @JP-Ellis in #940 • docs: replace commitizen with git cliff by @JP-Ellis in #938 • chore: add taplo by @JP-Ellis in #941 • chore(deps): update codecov/codecov-action action to v5.3.0 by @renovate in #944 • chore(deps): update taiki-e/install-action action to v2.47.24 by @renovate in #942 • fix(deps): update ruff to v0.9.3 by @renovate in #943 • chore(deps): update codecov/codecov-action action to v5.3.1 by @renovate in #946 • chore(deps): update taiki-e/install-action action to v2.47.25 by @renovate in #947 • chore(deps): update pre-commit hook igorshubovych/markdownlint-cli to v0.44.0 by @renovate in #948 • chore(deps): update pypa/gh-action-pypi-publish action to v1.12.4 by @renovate in #945 • chore(deps): update taiki-e/install-action action to v2.47.26 by @renovate in #949 • chore(deps): update taiki-e/install-action action to v2.47.28 by @renovate in #950 • chore(deps): update taiki-e/install-action action to v2.47.29 by @renovate in #951 • chore(deps): update taiki-e/install-action action to v2.47.30 by @renovate in #952 • fix(deps): update ruff to v0.9.4 by @renovate in #956 • chore(deps): update taiki-e/install-action action to v2.47.31 by @renovate in #954 • chore(deps): update astral-sh/setup-uv action to v5.2.2 by @renovate in #955 • chore(deps): update pre-commit hook crate-ci/typos to v1.29.5 by @renovate in #957 • chore(deps): update taiki-e/install-action action to v2.48.1 by @renovate in #958 • fix(deps): update dependency mypy to v1.15.0 by @renovate in #960 • chore(deps): update docker/setup-qemu-action action to v3.4.0 by @renovate in #962 • chore(deps): update pre-commit hook biomejs/pre-commit to v1 by @renovate in #961 • fix(deps): update ruff to v0.9.5 by @renovate in #963 • chore(deps): update tests/v3/compatibility_suite/definition digest to cc76eac by @renovate in #573 • chore(deps): update taiki-e/install-action action to v2.48.2 by @renovate in #964 • chore(deps): update taiki-e/install-action action to v2.48.4 by @renovate in #965 • chore(deps): update taiki-e/install-action action to v2.48.5 by @renovate in #966 • fix(deps): update ruff to v0.9.6 by @renovate in #969 • chore(deps): update taiki-e/install-action action to v2.48.6 by @renovate in #968 • chore(deps): update taiki-e/install-action action to v2.48.7 by @renovate in #970 • chore(deps): update taiki-e/install-action action to v2.48.9 by @renovate in #971 • chore(deps): update pre-commit hook crate-ci/typos to v1.29.7 by @renovate in #974 • chore(deps): update pactfoundation/pact-broker:latest docker digest to 1abd7da by @renovate in #973 • chore(deps): update taiki-e/install-action action to v2.48.10 by @renovate in #972 • chore(deps): update taiki-e/install-action action to v2.48.12 by @renovate in #976 • fix(deps): update dependency psutil to v7 by @renovate in #977 • chore(deps): update taiki-e/install-action action to v2.48.13 by @renovate in #978 • chore(deps): update taiki-e/install-action action to v2.48.14 by @renovate in #979 • chore(deps): update actions/cache action to v4.2.1 by @renovate in #980 • chore(deps): update taiki-e/install-action action to v2.48.15 by @renovate in #981 • chore(deps): update pre-commit hook crate-ci/typos to v1.29.8 by @renovate in <https://github.com/pact-foundation/pact-python/pull/982|#… pact-foundation/pact-python
    j
    • 2
    • 1
  • j

    Joshua Ellis

    05/07/2025, 3:37 AM
    Hmm, we just hit the 10GiB total limit for Pact Python on PyPI 😕 So the latest release failed halfway through the release
    r
    • 2
    • 5
  • d

    Dilip Punna

    06/19/2025, 5:02 PM
    https://pact-foundation.slack.com/archives/C5F4KFKR8/p1750352447466509
    j
    • 2
    • 1
  • a

    Adriano Tanoue

    06/23/2025, 8:43 AM
    Hello 👋 - question on query parameters: When creating a contract that has query params, even if I specify those parameters as simple strings, the generated pact makes each parameter into an array:
    Copy code
    query_params = {"count": "1", "skip": "0"}
    interaction.with_query_parameters(query_params)
    
    ...becomes:
    
    "request": {
           "query": {
             "count": [
               "1"
             ],
             "skip": [
               "0"
             ]
           }
    So the actual url path is something like:
    /status?count[0]=1&skip[0]=0
    instead of
    /status?count=1&skip=0
    . Is that by design? Doesn't it make a wrong contract?
    j
    • 2
    • 4
  • z

    Zachary Lysobey

    06/24/2025, 9:42 PM
    @Zachary Lysobey has left the channel
  • d

    David Mason

    07/09/2025, 2:41 PM
    Hello 👋 I'm not sure whether to post this here or in pact-broker. Using pact-python v3 to get pacts from a broker and verify them. Is there a good way to debug which pacts have been sourced from the broker? I've got a pact published by another team in the broker, but I am not verifying it even though all my tests pass and I'm sourcing pacts from the broker using the same provider. I expect it's only selecting one of the pacts for my provider, rather than a list of all of them but cannot see what is happening to confirm. related code snippet
    Copy code
    @pytest.fixture(scope="module")
    def sqs_pact_verifier(pact_dir: str, version: str) -> Verifier:
        verifier = Verifier("my-provider")
    
        if broker_url := os.environ.get("PACT_BROKER_BASE_URL"):
            verifier = verifier.set_publish_options(version=version)
            verifier = verifier.broker_source(broker_url, token=os.environ["PACT_BROKER_TOKEN"]).set_error_on_empty_pact()
    
        return verifier
    
    
    def test_verify_payment_network_request(sqs_pact_verifier: Verifier):
        sqs_pact_verifier.message_handler(run_message_handler).verify()
    I've double checked the versions match, any ideas?
    j
    • 2
    • 4
  • p

    Patrick

    07/14/2025, 10:41 AM
    Hi, we have been working for a while with pact python V3 and now we got a small issue with V3 when we published a contract for the first time to pact broker and we want to verify this contract for the first time (this contract is still in a MR and not deployed to our environments). The consumer version selectors we use are: "mainBranch : True", "deployedOrReleased: True", include_pending and include_wip_since("2025-07-11"). The result of the test is that no pacts were found with these selectors while we expect that the contract must be found because of the selector wip since. When we use pact python V2 and use the same selectors then the pact contract is found in pact broker. So is there something we are doing wrong in this case or is this a bug in V3? Here you can see the related code:
    Copy code
    verifier = (
            Verifier(PROVIDER)
            .add_transport(url=server)
            .state_handler(provider_state_handler, teardown=False)
            .broker_source(url=BROKER_URL, selector=True)
            .consumer_versions('{"mainBranch": true}', '{"deployedOrReleased": true}')
            .include_pending()
            .include_wip_since("2025-07-11")
            .build
        )
    
        if os.getenv("CI"):
            verifier.set_publish_options(
                version=os.getenv("VERSION")
                branch=os.getenv("CI_COMMIT_REF_NAME")
            )
    
        verifier.verify()
    m
    • 2
    • 8
  • g

    GitHub

    07/17/2025, 11:38 AM
    Release - v2.3.3 New release published by github-actions[bot] ## [2.3.3] 2025-07-17 ### 🚀 Features • (v3) Add will_respond_with for sync ### 🐛 Bug Fixes • (v3) Avoid error if there's no mismatch type ### 📚 Documentation • (examples) Add proto module documentation • Add protobuf and grpc links ### ⚙️ Miscellaneous Tasks • (ci) Remove pre-commit cache restore key • Update biome • (examples) Add protobuf example • Add version stub file • (examples) Parametrize protobuf example • (ci) Update runners • Split mypy calls ### Contributors • @JP-Ellis ## Pull Requests ## What's Changed • chore(deps): update codecov/codecov-action action to v5.4.3 by @renovate[bot] in #1062 • chore(deps): update codecov/test-results-action action to v1.1.1 by @renovate[bot] in #1064 • chore(deps): update astral-sh/setup-uv action to v6.1.0 by @renovate[bot] in #1065 • fix(deps): update dependency pytest-asyncio to v1 by @renovate[bot] in #1066 • fix(deps): update ruff to v0.11.12 by @renovate[bot] in #1060 • fix(deps): update dependency mypy to v1.16.0 by @renovate[bot] in #1067 • chore(deps): update taiki-e/install-action action to v2.52.4 by @renovate[bot] in #1061 • chore(deps): update pre-commit hook igorshubovych/markdownlint-cli to v0.45.0 by @renovate[bot] in #1063 • chore(deps): update pre-commit hook crate-ci/typos to v1.33.1 by @renovate[bot] in #1068 • chore(ci): remove pre-commit cache restore key by @JP-Ellis in #1070 • fix(deps): update ruff to v0.11.13 by @renovate[bot] in #1072 • chore(deps): update pactfoundation/pact-broker:latest docker digest to 1cbd614 by @renovate[bot] in #1071 • chore(deps): update taiki-e/install-action action to v2.52.7 by @renovate[bot] in #1073 • chore(deps): update softprops/action-gh-release action to v2.3.2 by @renovate[bot] in #1074 • chore(deps): update tests/v3/compatibility_suite/definition digest to 1acfa1e by @renovate[bot] in #975 • chore(deps): update taiki-e/install-action action to v2.52.8 by @renovate[bot] in #1076 • fix(deps): update dependency mypy to v1.16.1 by @renovate[bot] in #1077 • fix(deps): update ruff to v0.12.0 by @renovate[bot] in #1078 • chore(deps): update pre-commit hook biomejs/pre-commit to v2 by @renovate[bot] in #1079 • chore(deps): update astral-sh/setup-uv action to v6.2.1 by @renovate[bot] in #1081 • chore(deps): update astral-sh/setup-uv action to v6.3.0 by @renovate[bot] in #1083 • chore(deps): update pre-commit hook biomejs/pre-commit to v2.0.2 by @renovate[bot] in #1085 • chore(deps): update taiki-e/install-action action to v2.54.0 by @renovate[bot] in #1086 • chore: udpate biome by @JP-Ellis in #1087 • fix(v3): avoid error if there's no mismatch type by @JP-Ellis in #1088 • feat(v3): add will_respond_with for sync by @JP-Ellis in #1090 • chore(deps): update astral-sh/setup-uv action to v6.3.1 by @renovate[bot] in #1091 • chore(examples): add protobuf example by @JP-Ellis in #1089 • fix(deps): update ruff to v0.12.1 by @renovate[bot] in #1093 • chore(examples): parametrize protobuf example by @JP-Ellis in #1094 • chore(deps): update pre-commit hook biomejs/pre-commit to v2.0.6 by @renovate[bot] in #1095 • chore(deps): update taiki-e/install-action action to v2.54.3 by @renovate[bot] in #1096 • chore(deps): update pre-commit hook crate-ci/typos to v1.34.0 by @renovate[bot] in #1097 • chore(ci): update runners by @JP-Ellis in #1099 • fix(deps): update ruff to v0.12.2 by @renovate[bot] in #1098 • chore(deps): update taiki-e/install-action action to v2.56.7 by @renovate[bot] in #1100 • chore(deps): update pre-commit hook biomejs/pre-commit to v2.1.1 by @renovate[bot] in #1101 • chore(deps): update pactfoundation/pact-broker:latest docker digest to 0106b1f by @renovate[bot] in #1102 • fix(deps): update ruff to v0.12.3 by @renovate[bot] in #1104 • chore(deps): update taiki-e/install-action action to v2.56.13 by @renovate[bot] in #1105 • fix(deps): update dependency mypy to v1.17.0 by @renovate[bot] in #1106 • chore: split mypy calls by @JP-Ellis in #1108 Full Changelog: v2.3.2...v2.3.3 pact-foundation/pact-python
  • g

    GitHub

    07/22/2025, 6:17 AM
    Release - pact-python-cli/2.4.26.1 New release published by github-actions[bot] ## [unreleased] ### ⚙️ Miscellaneous Tasks • Properly extract tag version ### Contributors • @JP-Ellis ## Pull Requests ## What's Changed • docs: update changelog by @JP-Ellis in #1109 • fix(deps): update ruff to v0.12.4 by @renovate[bot] in #1110 • chore: update pre-commit hooks by @JP-Ellis in #1112 • chore(deps): update pre-commit hook biomejs/pre-commit to v2.1.2 by @renovate[bot] in #1114 • chore(deps): update astral-sh/setup-uv action to v6.4.1 by @renovate[bot] in #1111 • chore(deps): update taiki-e/install-action action to v2.56.19 by @renovate[bot] in #1115 • chore: create cli and ffi packages by @JP-Ellis in #1113 • chore: remove macosx deployment target by @JP-Ellis in #1117 • chore(ci): fix cli publish permissions by @JP-Ellis in #1118 • chore(cli): get version from vcs by @JP-Ellis in #1119 • chore(deps): update astral-sh/setup-uv action to v6.4.1 by @renovate[bot] in #1116 Full Changelog: v2.3.3...pact-python-cli/2.4.26.1 pact-foundation/pact-python
  • g

    GitHub

    07/23/2025, 11:31 AM
    Release - pact-python-cli/2.4.26.2 New release published by github-actions[bot] ## [pact-python-cli/2.4.26.2] 2025-07-23 ### 🚀 Features • (cli) Build abi-agnostic wheels ### Contributors • @JP-Ellis ## Pull Requests ## What's Changed • feat(cli): build abi-agnostic wheels by @JP-Ellis in #1121 Full Changelog: pact-python-cli/2.4.26.1...pact-python-cli/2.4.26.2 pact-foundation/pact-python
    🚀 2
    j
    • 2
    • 1
  • g

    GitHub

    07/29/2025, 10:29 AM
    Release - pact-python-ffi/0.4.22.0 New release published by github-actions[bot] ## [pact-python-ffi/0.4.22.0] 2025-07-29 ### 🚀 Features • (ffi) Add standalone ffi package ### ⚙️ Miscellaneous Tasks • Create cli and ffi packages ### Contributors • @JP-Ellis ## Pull Requests ## What's Changed • chore(deps): update astral-sh/setup-uv action to v6.4.2 by @renovate[bot] in #1123 • chore: update gitignore by @JP-Ellis in #1124 • docs: update cli changelog by @JP-Ellis in #1122 • chore(deps): update astral-sh/setup-uv action to v6.4.3 by @renovate[bot] in #1125 • docs(cli): update readme and ensure it is on pypi by @JP-Ellis in #1126 • chore(deps): update pactfoundation/pact-broker:latest docker digest to 05b05a1 by @renovate[bot] in #1127 • chore(deps): update taiki-e/install-action action to v2.57.1 by @renovate[bot] in #1130 • feat(ffi): add standalone ffi package by @JP-Ellis in #1129 Full Changelog: pact-python-cli/2.4.26.2...pact-python-ffi/0.4.22.0 pact-foundation/pact-python
  • g

    GitHub

    08/12/2025, 4:23 AM
    Release - pact-python/3.0.0a1 New release published by github-actions[bot] ## [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.ffi
    is removed, and to be replaced by
    pact_ffi
    . That is,
    pact.v3.ffi.$fn
    should be replaced by
    pact_ffi.$fn
    .
    • [breaking] Prepare for v3 release
    This prepares for version 3. Pact Python v2 will be still accessible under
    pact.v2
    and all imports should be appropriate renamed. Everyone is encouraged to migrate to Pact Python v3.
    • [breaking] Simplify
    given
    The signature of
    Interaction.given
    has been updated. The following changes are required: - Change
    given("state", key="user_id", value=123)
    to
    given("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. - Change
    given("state", parameters={"user_id": 123})
    to
    given("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=123
    will 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_options
    or
    provider_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_cli
    package • 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 • @JP-Ellis • @kevinrvaz ## Pull Requests ## What's Changed • 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
    given
    by @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 … pact-foundation/pact-python
    🚀 2
    🎉 4
  • m

    Matt (pactflow.io / pact-js / pact-go)

    08/12/2025, 4:46 AM
    Massive milestone @Joshua Ellis 👏
  • g

    GitHub

    08/26/2025, 10:26 AM
    Release - pact-python-ffi/0.4.28.0 New release published by github-actions[bot] ## [unreleased] ## Pull Requests ## What's Changed • docs: update changelog by @JP-Ellis in #1176 • chore(deps): update pre-commit hook crate-ci/typos to v1.35.4 by @renovate[bot] in #1177 • chore(deps): update astral-sh/setup-uv action to v6.5.0 by @renovate[bot] in #1178 • chore(ci): remove spelling check by @JP-Ellis in #1185 • docs: add mascot by @JP-Ellis in #1184 • docs: give mascot outline by @JP-Ellis in #1186 • docs: set mascot width and height by @JP-Ellis in #1188 • chore(deps): update ruff to v0.12.9 by @renovate[bot] in #1187 • chore(examples): minor improvements by @JP-Ellis in #1190 • docs(examples): add requests and fastapi by @JP-Ellis in #1191 • chore(deps): update pre-commit hook biomejs/pre-commit to v2.2.0 by @renovate[bot] in #1189 • chore(deps): update pypa/cibuildwheel action to v3.1.4 by @renovate[bot] in #1194 • chore(deps): update pre-commit hook crate-ci/typos to v1.35.5 by @renovate[bot] in #1193 • chore(deps): update taiki-e/install-action action to v2.58.17 by @renovate[bot] in #1192 • chore(deps): update codecov/codecov-action action to v5.5.0 by @renovate[bot] in #1195 • chore(deps): update ruff to v0.12.10 by @renovate[bot] in #1197 • chore(deps): update astral-sh/setup-uv action to v6.6.0 by @renovate[bot] in #1196 • chore(deps): update actions/upload-pages-artifact action to v4 by @renovate[bot] in #1198 • chore(deps): update pre-commit hook biomejs/pre-commit to v2.2.2 by @renovate[bot] in #1199 • chore(deps): update taiki-e/install-action action to v2.58.21 by @renovate[bot] in #1200 • chore: remove reference count checks by @JP-Ellis in #1201 • chore: store hatch venv in .venv by @JP-Ellis in #1202 • chore: update mismatch repr by @JP-Ellis in #1203 • chore: save mismatches before exiting the server by @JP-Ellis in #1204 • chore(examples): remove old http example by @JP-Ellis in #1205 • feat(ffi): upgrade lib to 0.4.28 by @JP-Ellis in #1206 Full Changelog: pact-python/3.0.0a1...pact-python-ffi/0.4.28.0 pact-foundation/pact-python
  • g

    GitHub

    08/29/2025, 3:21 AM
    Release - pact-python-ffi/0.4.28.1 New release published by github-actions[bot] ## [pact-python-ffi/0.4.28.1] 2025-08-28 ### 🐛 Bug Fixes • (ffi) Make version dynamic ### 📚 Documentation • Update changelog for pact-python-ffi/0.4.28.0 ### ⚙️ Miscellaneous Tasks • Fix sub-project git cliff config • (ffi) Clean up data directory ### Contributors • @JP-Ellis ## Pull Requests ## What's Changed • docs: update ffi changelog by @JP-Ellis in #1207 • chore: hide import from traceback by @JP-Ellis in #1208 • chore(ffi): clean up data directory by @JP-Ellis in #1209 Full Changelog: pact-python-ffi/0.4.28.0...pact-python-ffi/0.4.28.1 pact-foundation/pact-python
    🎉 1
  • p

    Paul

    09/12/2025, 5:17 AM
    @Paul has left the channel
  • e

    Elson Ho

    09/18/2025, 10:08 AM
    Hi, As part of learning, I am converting the PactFlow CI/CD workshop from JavaScript to Python and using the Pact Python v3 verifier. In Pact JS, the verifier accepts
    pactUrls
    so you can verify directly from a URL. What will be the equivalent in Pact Python? Any pointers or examples would be appreciated, Thank you. Workshop step: https://docs.pactflow.io/docs/workshops/ci-cd/workshop/implementing-the-provider-changes Workshop repo reference: https://github.com/pactflow/example-provider/blob/master/src/product/product.consumerChange.pact.test.js#L32 Pact JS core repo reference: https://github.com/pact-foundation/pact-js-core/blob/master/src/verifier/types.ts#L31
    nice 7771 1
    y
    j
    • 3
    • 9
  • g

    GitHub

    10/06/2025, 1:54 AM
    Release - pact-python/3.0.0 New release published by github-actions[bot] ## [pact-python/3.0.0] 2025-10-06 ### 🚀 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 • @JP-Ellis ## Pull Requests ## What's Changed • 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] … pact-foundation/pact-python
    🚀 2
  • g

    GitHub

    10/06/2025, 6:25 AM
    Release - pact-python/3.0.1 New release published by github-actions[bot] Warning No changelog generated. To be filled in. ## Pull Requests ## What's Changed • 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/3.0.0...pact-python/3.0.1 pact-foundation/pact-python
  • g

    GitHub

    10/06/2025, 6:27 AM
    Release - pact-python-ffi/0.4.28.2 New release published by github-actions[bot] Warning No changelog generated. To be filled in. ## Pull Requests ## What's Changed • 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/3.0.0...pact-python-ffi/0.4.28.2 pact-foundation/pact-python
  • g

    GitHub

    10/07/2025, 5:32 AM
    Release - pact-python/3.1.0 New release published by github-actions[bot] ## [pact-python/3.1.0] 2025-10-07 ### 🐛 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 • @JP-Ellis ## Pull Requests ## What's Changed • docs: update ffi changelog by @JP-Ellis in #1273 • chore(ci): add area-core label by @JP-Ellis in #1276 • chore(ci): fix labels workflow permissions by @JP-Ellis in #1277 • chore(deps): update pre-commit hook crate-ci/typos to v1.38.0 by @renovate[bot] in #1278 • chore: remove no longer relevant todo by @JP-Ellis in #1281 • chore(docs): use normalized project url keys by @JP-Ellis in #1282 • fix!: replace v2 extra with compat-v2 by @JP-Ellis in #1280 • chore(deps): update softprops/action-gh-release action to v2.4.0 by @renovate[bot] in #1279 Full Changelog: pact-python/3.0.1...pact-python/3.1.0 pact-foundation/pact-python
  • d

    David Mason

    10/09/2025, 8:22 AM
    Hi! Since the release of pact v3, and upgrading our imports from
    pact.v3
    to just
    pact
    we are starting to see can-i-merge failures saying that there are no versions of any of our pacts. We're using pactflow, but looking at the ui of pactflow shows everything is greena nd OK, can-i-merge success. So I suspect this is either a pact-python issue, or a skill issue. The only thing is we've not changed anything other than
    s/pact.v3/pact/
    and have been running pact v3 for months without this problem... I'm going to try blindly re-running the tests first, maybe overnight the issue has fixed itself!
    m
    s
    j
    • 4
    • 12
  • k

    Kieran McCarthy

    10/11/2025, 10:49 AM
    @Kieran McCarthy has left the channel
  • k

    Kevin Chang

    10/18/2025, 4:27 PM
    Hi! I'm trying to get started with pact-python, and having issues with the verifier making requests successfully. I was wondering whether there is a way to enable or view logging of the stuff that happens after we leave the python libraries in order to get a more specific error than I'm getting here:
    j
    • 2
    • 4
  • p

    Patrick

    11/11/2025, 9:24 AM
    Hi, we are migrating our contract test from pact-python version 2.3.3 to 3.1.0 (in these tests we already use V3) and we are getting an error when we run our tests against our pact-broker (2.116.0). We receive a Fatal Python error: Segmentation fault when we are trying to connect to our pact broker. When I run the same test against a local docker instance from Pact Broker (also 2.116.0) the test succeeds without any errors. The only difference between these two pact-brokers is that we use "https" for the pact-broker in our network, while I use "http" for my local docker instance. I don't know if this is the reason for this error, but it's something I like to share with you 😉. I also got some debug log info for you and a colleague of my also got some stack trace info for you. Hopefully you can help us with this error. Debug log info Fatal Python error: Segmentation fault Thread 0x000074ef42ffd640 (most recent call first): File "/location/miniconda3/envs/python312/lib/python3.12/selectors.py", line 415 in select File "/location/miniconda3/envs/python312/lib/python3.12/socketserver.py", line 235 in serve_forever File "/location/miniconda3/envs/python312/lib/python3.12/threading.py", line 1012 in run File "/location/miniconda3/envs/python312/lib/python3.12/threading.py", line 1075 in _bootstrap_inner File "/location/miniconda3/envs/python312/lib/python3.12/threading.py", line 1032 in _bootstrap Thread 0x000074ef437fe640 (most recent call first): File "/location/miniconda3/envs/python312/lib/python3.12/asyncio/runners.py", line 118 in run File "/location/miniconda3/envs/python312/lib/python3.12/asyncio/runners.py", line 195 in run File "/location/git/project/venv/lib/python3.12/site-packages/uvicorn/server.py", line 67 in run File "/location/git/project/venv/lib/python3.12/site-packages/uvicorn/main.py", line 593 in run File "/location/miniconda3/envs/python312/lib/python3.12/threading.py", line 1012 in run File "/location/miniconda3/envs/python312/lib/python3.12/threading.py", line 1075 in _bootstrap_inner File "/location/miniconda3/envs/python312/lib/python3.12/threading.py", line 1032 in _bootstrap Current thread 0x000074ef4bd3d440 (most recent call first): File "/location/git/project/venv/lib/python3.12/site-packages/pact_ffi/__init__.py", line 7316 in verifier_execute File "/location/git/project/venv/lib/python3.12/site-packages/pact/verifier.py", line 1313 in verify File "/location/git/project/tests/contract_tests/test_pact_backend.py", line 63 in test_provider_with_broker File "/location/git/project/venv/lib/python3.12/site-packages/_pytest/python.py", line 157 in pytest_pyfunc_call File "/location/git/project/venv/lib/python3.12/site-packages/pluggy/_callers.py", line 121 in _multicall File "/location/git/project/venv/lib/python3.12/site-packages/pluggy/_manager.py", line 120 in _hookexec File "/location/git/project/venv/lib/python3.12/site-packages/pluggy/_hooks.py", line 512 in call File "/location/git/project/venv/lib/python3.12/site-packages/_pytest/python.py", line 1671 in runtest File "/location/git/project/venv/lib/python3.12/site-packages/_pytest/runner.py", line 178 in pytest_runtest_call File "/location/git/project/venv/lib/python3.12/site-packages/pluggy/_callers.py", line 121 in _multicall File "/location/git/project/venv/lib/python3.12/site-packages/pluggy/_manager.py", line 120 in _hookexec File "/location/git/project/venv/lib/python3.12/site-packages/pluggy/_hooks.py", line 512 in call File "/location/git/project/venv/lib/python3.12/site-packages/_pytest/runner.py", line 246 in <lambda> File "/location/git/project/venv/lib/python3.12/site-packages/_pytest/runner.py", line 344 in from_call File "/location/git/project/venv/lib/python3.12/site-packages/_pytest/runner.py", line 245 in call_and_report File "/location/git/project/venv/lib/python3.12/site-packages/_pytest/runner.py", line 136 in runtestprotocol File "/location/git/project/venv/lib/python3.12/site-packages/_pytest/runner.py", line 117 in pytest_runtest_protocol File "/location/git/project/venv/lib/python3.12/site-packages/pluggy/_callers.py", line 121 in _multicall File "/location/git/project/venv/lib/python3.12/site-packages/pluggy/_manager.py", line 120 in _hookexec File "/location/git/project/venv/lib/python3.12/site-packages/pluggy/_hooks.py", line 512 in call File "/location/git/project/venv/lib/python3.12/site-packages/_pytest/main.py", line 367 in pytest_runtestloop File "/location/git/project/venv/lib/python3.12/site-packages/pluggy/_callers.py", line 121 in _multicall File "/location/git/project/venv/lib/python3.12/site-packages/pluggy/_manager.py", line 120 in _hookexec File "/location/git/project/venv/lib/python3.12/site-packages/pluggy/_hooks.py", line 512 in call File "/location/git/project/venv/lib/python3.12/site-packages/_pytest/main.py", line 343 in _main File "/location/git/project/venv/lib/python3.12/site-packages/_pytest/main.py", line 289 in wrap_session File "/location/git/project/venv/lib/python3.12/site-packages/_pytest/main.py", line 336 in pytest_cmdline_main File "/location/git/project/venv/lib/python3.12/site-packages/pluggy/_callers.py", line 121 in _multicall File "/location/git/project/venv/lib/python3.12/site-packages/pluggy/_manager.py", line 120 in _hookexec File "/location/git/project/venv/lib/python3.12/site-packages/pluggy/_hooks.py", line 512 in call File "/location/git/project/venv/lib/python3.12/site-packages/_pytest/config/__init__.py", line 175 in main File "/location/.vscode-server/extensions/ms-python.python-2025.16.0-linux-x64/python_files/vscode_pytest/run_pytest_script.py", line 64 in <module>
    m
    j
    • 3
    • 9
  • a

    Antonio Blandón Torres

    11/20/2025, 8:06 PM
    Hello, someone could share me an example using
    consumer_versions
    . I'm trying to migrate from 2.0.0 to 3.1.0 but I haven't been able to reach it.
    y
    j
    • 3
    • 6
  • a

    Antonio Blandón Torres

    11/24/2025, 5:39 PM
    Hello everyone. I'd like to know if we have a method to publish contract programmatically in Pact V3. I have the below code in Pact V2, but I haven't find out an example to do the same in V3.
    Copy code
    pact: Pact = Consumer(
                name=self.consumer_name,
                version=self.pact_version_manager.get_publish_version(),
                branch=self.pact_version_manager.get_branch_version(),
                tags=self.tags,
            ).has_pact_with(
                Provider(self.provider_name),
                publish_to_broker=True,
                broker_base_url=self.pact_settings.get_host(),
                broker_username=self.pact_settings.get_username(),
                broker_password=self.pact_settings.get_password(),
                pact_dir="./pacts",
            )
    Thanks in advance.
    y
    • 2
    • 1
  • g

    GitHub

    12/02/2025, 11:51 PM
    Release - pact-python/3.2.0 New release published by github-actions[bot] ## [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 • @Nikhil172913832 • @JP-Ellis • @YOU54F • @Copilot ## 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[… pact-foundation/pact-python
    smooth parrot 1
  • m

    Martin Konir

    12/03/2025, 2:22 PM
    Hi @Yousaf Nabi (pactflow.io) and @Matt (pactflow.io / pact-js / pact-go) ralph wave I wanted to ask if anyone has experience using the
    pact-python-cli
    library in a Docker image based on
    Alpine
    Linux (specifically, I’m using
    python:3.13-alpine3.22
    ). When I try to run
    pact-broker
    command in such container, I get the following error:
    Copy code
    /app # pact-broker
    /usr/local/lib/python3.13/site-packages/pact_cli/lib/ruby/bin/ruby: exec: line 6: /usr/local/lib/python3.13/site-packages/pact_cli/lib/ruby/bin.real/ruby: not found
    My understanding is that the
    pact-python-cli
    package contains Ruby binaries compiled for
    glibc
    but also provides
    musl
    -compatible binaries - I found a
    musllinux
    wheel on PyPI. From the source distributions (image below), it seems like it should work on Alpine Has anyone successfully run
    pact-python-cli
    on
    Alpine
    ? Any tips or workarounds would be appreciated.
    y
    • 2
    • 2