Skip to content

Commit 5aff2c2

Browse files
committed
Switch to httpx2
The original `httpx` library is no longer maintained, switch to `httpx2`, which is a continuation of `httpx` and is maintained by the Pydantic team.
1 parent 19d6d06 commit 5aff2c2

29 files changed

Lines changed: 303 additions & 39 deletions

examples/sandbox_05_fastapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import os
44
import webbrowser
55

6-
import httpx
6+
import httpx2 as httpx
77
from dotenv import load_dotenv
88

99
from vercel.sandbox import AsyncSandbox as Sandbox

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ dev = [
1010
"pytest-asyncio<2",
1111
"pytest-xdist<4",
1212
"hypothesis>=6.0.0,<7",
13-
"respx>=0.21.0,<1",
13+
"respx==0.23.1",
1414
"uvloop<1",
1515
"mypy>=1.20.2,<2",
1616
"build<2",
@@ -38,7 +38,7 @@ markers = [
3838
[tool.mypy]
3939
ignore_missing_imports = true
4040
explicit_package_bases = true
41-
mypy_path = ["src", "src/vercel-oidc", "src/vercel-headers"]
41+
mypy_path = ["src", "src/vercel-oidc", "src/vercel-headers", "tests/stubs"]
4242

4343
[tool.ruff]
4444
line-length = 100

src/vercel-oidc/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ requires-python = ">=3.10"
1111
license = "MIT"
1212
license-files = ["LICENSE", "LICENSE.*"]
1313
dependencies = [
14-
"httpx>=0.27.0,<1",
14+
"httpx2[http2]>=2",
1515
"vercel-headers>=0.6.0",
1616
]
1717

src/vercel-oidc/vercel/oidc/token.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import os
44
from collections.abc import Mapping
55

6-
import httpx
6+
import httpx2 as httpx
77

88
from vercel.headers import get_headers
99

src/vercel/_internal/blob/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from typing import Any, Literal, cast
99
from urllib.parse import parse_qs, urlencode, urlparse, urlunparse
1010

11-
import httpx
11+
import httpx2 as httpx
1212

1313
from vercel._internal.blob import (
1414
PutHeaders,

src/vercel/_internal/http/clients.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from collections.abc import Sequence
77
from typing import Any
88

9-
import httpx
9+
import httpx2 as httpx
1010

1111
from vercel._internal.http.config import DEFAULT_TIMEOUT
1212
from vercel._internal.http.request_client import (

src/vercel/_internal/http/request_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from dataclasses import dataclass
1010
from typing import Any, cast
1111

12-
import httpx
12+
import httpx2 as httpx
1313

1414
from vercel._internal.http.transport import BaseTransport, RequestBody
1515

src/vercel/_internal/http/transport.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from dataclasses import dataclass
77
from typing import Any
88

9-
import httpx
9+
import httpx2 as httpx
1010

1111

1212
def _normalize_path(path: str) -> str:

src/vercel/_internal/sandbox/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from importlib.metadata import version as _pkg_version
2222
from typing import Any, TypeAlias, cast
2323

24-
import httpx
24+
import httpx2 as httpx
2525

2626
from vercel._internal.fs import (
2727
FileHandle,

src/vercel/_internal/sandbox/errors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
import httpx
5+
import httpx2 as httpx
66

77

88
def _normalize_retry_after(value: str | int | None) -> int | str | None:

0 commit comments

Comments
 (0)