Skip to content

Commit 043ee78

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 043ee78

25 files changed

Lines changed: 107 additions & 33 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

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:

src/vercel/_internal/sandbox/pty_binary.py

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

55
from pathlib import Path
66

7-
import httpx
7+
import httpx2 as httpx
88

99
from .constants import PTY_BINARY_DOWNLOAD_TIMEOUT
1010
from .time import to_seconds_float

0 commit comments

Comments
 (0)