Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions payjoin-ffi/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Unreleased

- Python: require Python 3.11+ and replace httpx with httpx2. Callers catching HTTP errors from fetch_ohttp_keys should use httpx2.HTTPError instead of httpx.HTTPError.

## [0.25.1]

- Wraps payjoin 1.2.0
Expand Down
4 changes: 2 additions & 2 deletions payjoin-ffi/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ build-backend = "setuptools.build_meta"
name = "payjoin"
description = "The Python language bindings for the Payjoin Dev Kit"
readme = "README.md"
requires-python = ">=3.10"
requires-python = ">=3.11"
license = "MIT"
version = "0.25.1"
dependencies = ["httpx>=0.28.1,<1.0"]
dependencies = ["httpx2>=2.16,<3.0"]

[tool.setuptools]
packages = ["payjoin"]
Expand Down
4 changes: 2 additions & 2 deletions payjoin-ffi/python/src/payjoin/http.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import ssl
from urllib.parse import urljoin

import httpx
import httpx2

from .payjoin import OhttpKeys

Expand All @@ -17,7 +17,7 @@ async def fetch_ohttp_keys(
ssl_context.verify_mode = ssl.CERT_REQUIRED
pem_certificate = ssl.DER_cert_to_PEM_cert(certificate)
ssl_context.load_verify_locations(cadata=pem_certificate)
async with httpx.AsyncClient(
async with httpx2.AsyncClient(
proxy=ohttp_relay_url, verify=ssl_context, timeout=30.0
) as client:
response = await client.get(
Expand Down
6 changes: 3 additions & 3 deletions payjoin-ffi/python/test/test_payjoin_integration_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os
import sys
import httpx
import httpx2
import json
from typing import cast, Protocol, Any, Literal

Expand Down Expand Up @@ -182,7 +182,7 @@ async def retrieve_receiver_proposal(
ohttp_relay: str,
mode: TransitionMode,
):
agent = httpx.AsyncClient()
agent = httpx2.AsyncClient()
request: RequestResponse = receiver.create_poll_request(ohttp_relay)
response = await agent.post(
url=request.request.url,
Expand Down Expand Up @@ -353,7 +353,7 @@ async def _run_integration_v2_to_v2(self, mode: TransitionMode):
directory = services.directory_url()
ohttp_relay = services.ohttp_relay_url()
ohttp_keys = await fetch_ohttp_keys(ohttp_relay, directory, services.cert())
agent = httpx.AsyncClient()
agent = httpx2.AsyncClient()

# **********************
# Inside the Receiver:
Expand Down
Loading
Loading