Skip to content

Commit 9329bcc

Browse files
committed
Update minimum pact-python version to 3.0.0
1 parent 60f2950 commit 9329bcc

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dependencies = [
2626
"duckdb>=0.9.0",
2727
"django>=4.0",
2828
"openpyxl>=3.1.0",
29-
"pact-python>=1.6.0,<3.0.0",
29+
"pact-python[compat-v2]>=3.0.0",
3030
"pandas>=1.5.3",
3131
"pyarrow>=11.0.0",
3232
"python-dateutil>=2.8.2",
@@ -212,7 +212,7 @@ filterwarnings = [
212212
"ignore:Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3:DeprecationWarning:(graphene|singledispatch)",
213213
# https://github.com/ktosiek/pytest-freezegun/issues/35
214214
"ignore:distutils Version classes are deprecated:DeprecationWarning:pytest_freezegun",
215-
"ignore:This class will be deprecated Pact Python v3:PendingDeprecationWarning",
215+
"ignore:The `pact.v2` module is deprecated:DeprecationWarning",
216216
# --- Python 3.12
217217
'ignore:datetime\.datetime\.utcnow\(\) is deprecated:DeprecationWarning',
218218
'ignore:datetime\.datetime\.utcfromtimestamp\(\) is deprecated:DeprecationWarning',

xocto/pact_testing.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import subprocess
77
from typing import Any
88

9-
import pact
9+
import pact.v2 as pact_v2
1010
import requests
1111

1212

@@ -41,13 +41,13 @@ def post(
4141
return response.json()
4242

4343

44-
def pact_service(*, options: PactOptions, publish_to_broker: bool) -> pact.Pact:
45-
service = pact.Consumer(
44+
def pact_service(*, options: PactOptions, publish_to_broker: bool) -> pact_v2.Pact:
45+
service = pact_v2.Consumer(
4646
name=options.consumer_name,
4747
tag_with_git_branch=True,
4848
version=options.consumer_version,
4949
).has_pact_with(
50-
pact.Provider(options.provider_name),
50+
pact_v2.Provider(options.provider_name),
5151
publish_to_broker=publish_to_broker,
5252
broker_base_url=options.broker_url,
5353
broker_username=options.broker_username,

0 commit comments

Comments
 (0)