From ef889a3670e66221ec673f79aedd87cb98aec535 Mon Sep 17 00:00:00 2001 From: Mert <62549656+fswair@users.noreply.github.com> Date: Sat, 7 Nov 2026 19:53:15 +0300 Subject: [PATCH] fix(codex-auth-helper): serve async clients on successive event loops; support Pydantic AI 2.66 (1.13.0) The HTTP clients the helper owns for the Codex API and for token refresh kept connections bound to the first event loop. A request on a later loop, such as a second asyncio.run, reused one and failed with 'Event loop is closed'. Both are now replaced once the loop they last ran on has stopped, as Pydantic AI does for the clients its providers own. The SDK client is built with the public DefaultAsyncHttpxClient, whose lack of a closing finalizer keeps a replaced client from closing on the wrong loop. Pydantic AI support widens to 2.66.0 and Harness to 0.66.0. Co-Authored-By: Claude Opus 5.5 --- .agents/skills/pydantic-acp/SKILL.md | 4 +- .github/workflows/test.yml | 2 +- CHANGELOG.md | 16 +++ Makefile | 2 +- VERSION | 2 +- docs/getting-started/installation.md | 2 +- docs/pydantic-acp.md | 4 +- docs/pydantic-acp/harness-capabilities.md | 6 +- docs/testing.md | 2 +- docs/versioning.md | 2 +- packages/adapters/langchain-acp/VERSION | 2 +- .../src/langchain_acp/_version.py | 2 +- packages/adapters/pydantic-acp/README.md | 10 +- packages/adapters/pydantic-acp/VERSION | 2 +- packages/adapters/pydantic-acp/pyproject.toml | 4 +- .../pydantic-acp/src/pydantic_acp/_version.py | 2 +- packages/helpers/codex-auth-helper/VERSION | 2 +- .../helpers/codex-auth-helper/pyproject.toml | 2 +- .../src/codex_auth_helper/_event_loops.py | 18 +++ .../src/codex_auth_helper/_version.py | 2 +- .../src/codex_auth_helper/auth/manager.py | 25 +++- .../src/codex_auth_helper/client.py | 40 +++++-- packages/transports/acpremote/VERSION | 2 +- .../acpremote/src/acpremote/_version.py | 2 +- pyproject.toml | 16 +-- src/acpkit/_version.py | 2 +- tests/codex_auth_helper/test_event_loops.py | 107 ++++++++++++++++++ tests/pydantic/test_acp_client_provider.py | 2 +- tests/pydantic/test_pydantic_ai_compat.py | 14 ++- uv.lock | 56 ++++----- 30 files changed, 264 insertions(+), 90 deletions(-) create mode 100644 packages/helpers/codex-auth-helper/src/codex_auth_helper/_event_loops.py create mode 100644 tests/codex_auth_helper/test_event_loops.py diff --git a/.agents/skills/pydantic-acp/SKILL.md b/.agents/skills/pydantic-acp/SKILL.md index 038c8d0..d896a0f 100644 --- a/.agents/skills/pydantic-acp/SKILL.md +++ b/.agents/skills/pydantic-acp/SKILL.md @@ -179,10 +179,10 @@ When working on this surface, remember: - keep the direct async-iterable fallback only for tests and compatibility fakes - `OpenAICompactionBridge` must not pass deprecated `instructions=` into upstream `OpenAICompaction` - Harness workspace, filesystem, shell, and CodeMode bridges are regression-tested against - `pydantic-ai-harness[code-mode]==0.63.0` through its public imports; include + `pydantic-ai-harness[code-mode]==0.66.0` through its public imports; include `HarnessLocalWorkspaceBridge` when filesystem or shell capabilities need a workspace, and do not duplicate unrelated Harness capabilities such as Memory or Guardrails in ACP Kit. -- Harness 0.63.0 requires Pydantic AI 2.63.0; keep Harness +- Harness 0.66.0 requires Pydantic AI 2.66.0; keep Harness capability tests on the locked development version and use the core adapter matrix for the full supported range. diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b9130b1..f570ade 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -46,7 +46,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - pydantic-ai-version: ["2.9.0", "2.9.1", "2.10.0", "2.11.0", "2.12.0", "2.13.0", "2.14.0", "2.14.1", "2.15.0", "2.16.0", "2.17.0", "2.18.0", "2.19.0", "2.20.0", "2.21.0", "2.22.0", "2.23.0", "2.24.0", "2.25.0", "2.26.0", "2.27.0", "2.27.1", "2.28.0", "2.29.0", "2.30.0", "2.31.0", "2.31.1", "2.32.0", "2.33.0", "2.34.0", "2.35.0", "2.36.0", "2.37.0", "2.38.0", "2.39.0", "2.40.0", "2.41.0", "2.42.0", "2.43.0", "2.44.0", "2.45.0", "2.46.0", "2.47.0", "2.48.0", "2.49.0", "2.50.0", "2.51.0", "2.52.0", "2.53.0", "2.54.0", "2.55.0", "2.56.0", "2.57.0", "2.58.0", "2.59.0", "2.60.0", "2.61.0", "2.62.0", "2.63.0"] + pydantic-ai-version: ["2.9.0", "2.9.1", "2.10.0", "2.11.0", "2.12.0", "2.13.0", "2.14.0", "2.14.1", "2.15.0", "2.16.0", "2.17.0", "2.18.0", "2.19.0", "2.20.0", "2.21.0", "2.22.0", "2.23.0", "2.24.0", "2.25.0", "2.26.0", "2.27.0", "2.27.1", "2.28.0", "2.29.0", "2.30.0", "2.31.0", "2.31.1", "2.32.0", "2.33.0", "2.34.0", "2.35.0", "2.36.0", "2.37.0", "2.38.0", "2.39.0", "2.40.0", "2.41.0", "2.42.0", "2.43.0", "2.44.0", "2.45.0", "2.46.0", "2.47.0", "2.48.0", "2.49.0", "2.50.0", "2.51.0", "2.52.0", "2.53.0", "2.54.0", "2.55.0", "2.56.0", "2.57.0", "2.58.0", "2.59.0", "2.60.0", "2.61.0", "2.62.0", "2.63.0", "2.64.0", "2.65.0", "2.66.0"] steps: - uses: actions/checkout@v7 diff --git a/CHANGELOG.md b/CHANGELOG.md index 8162ecf..636589f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,22 @@ ACP Kit uses synchronized versions for `acpkit`, `pydantic-acp`, `langchain-acp` ## [Unreleased] +## [1.13.0] - 2026-11-07 + +### Changed + +- `pydantic-acp`, `codex-auth-helper`, and the `acpkit` extras support Pydantic AI through + 2.66.0. The Harness bridge pins `pydantic-ai-harness[code-mode]==0.66.0`. + +### Fixed + +- `codex-auth-helper` async clients now serve requests on successive event loops, such as + repeated `asyncio.run` calls or a host that closes its loop between runs. The HTTP clients + the helper owns for the Codex API and for token refresh are replaced once the loop they last + ran on has stopped; previously the next request reused a connection bound to that loop and + failed with `RuntimeError: Event loop is closed`. Closing a client whose loop has stopped no + longer reports the same error. + ## [1.12.0] - 2026-10-30 ### Security diff --git a/Makefile b/Makefile index e4c2fe9..d8da20f 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ BLUE := \033[1;34m GREEN := \033[1;32m RESET := \033[0m PYTHON_VERSIONS := 3.11.13 3.12.10 3.13.9 -PYDANTIC_AI_VERSIONS := 2.9.0 2.9.1 2.10.0 2.11.0 2.12.0 2.13.0 2.14.0 2.14.1 2.15.0 2.16.0 2.17.0 2.18.0 2.19.0 2.20.0 2.21.0 2.22.0 2.23.0 2.24.0 2.25.0 2.26.0 2.27.0 2.27.1 2.28.0 2.29.0 2.30.0 2.31.0 2.31.1 2.32.0 2.33.0 2.34.0 2.35.0 2.36.0 2.37.0 2.38.0 2.39.0 2.40.0 2.41.0 2.42.0 2.43.0 2.44.0 2.45.0 2.46.0 2.47.0 2.48.0 2.49.0 2.50.0 2.51.0 2.52.0 2.53.0 2.54.0 2.55.0 2.56.0 2.57.0 2.58.0 2.59.0 2.60.0 2.61.0 2.62.0 2.63.0 +PYDANTIC_AI_VERSIONS := 2.9.0 2.9.1 2.10.0 2.11.0 2.12.0 2.13.0 2.14.0 2.14.1 2.15.0 2.16.0 2.17.0 2.18.0 2.19.0 2.20.0 2.21.0 2.22.0 2.23.0 2.24.0 2.25.0 2.26.0 2.27.0 2.27.1 2.28.0 2.29.0 2.30.0 2.31.0 2.31.1 2.32.0 2.33.0 2.34.0 2.35.0 2.36.0 2.37.0 2.38.0 2.39.0 2.40.0 2.41.0 2.42.0 2.43.0 2.44.0 2.45.0 2.46.0 2.47.0 2.48.0 2.49.0 2.50.0 2.51.0 2.52.0 2.53.0 2.54.0 2.55.0 2.56.0 2.57.0 2.58.0 2.59.0 2.60.0 2.61.0 2.62.0 2.63.0 2.64.0 2.65.0 2.66.0 LANGCHAIN_VERSION := 1.4.7 LANGGRAPH_VERSION := 1.2.18 DEEPAGENTS_VERSION := 0.7.32 diff --git a/VERSION b/VERSION index 0eed1a2..feaae22 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.12.0 +1.13.0 diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index 03725c6..f7eb00b 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -73,7 +73,7 @@ uv add pydantic-acp pip install pydantic-acp ``` -`pydantic-acp` supports `pydantic-ai-slim>=2.9.0,<=2.63.0` and pins the ACP +`pydantic-acp` supports `pydantic-ai-slim>=2.9.0,<=2.66.0` and pins the ACP protocol version it integrates against. Pydantic AI V1 and releases before 2.9.0 are not supported. diff --git a/docs/pydantic-acp.md b/docs/pydantic-acp.md index 73da327..471ca07 100644 --- a/docs/pydantic-acp.md +++ b/docs/pydantic-acp.md @@ -388,7 +388,7 @@ If you are integrating `pydantic-acp` in a real product: ## Version Compatibility And Private Upstream APIs -`pydantic-acp` supports `pydantic-ai-slim>=2.9.0,<=2.63.0`. Pydantic AI V1 and +`pydantic-acp` supports `pydantic-ai-slim>=2.9.0,<=2.66.0`. Pydantic AI V1 and Pydantic AI 2.x releases before 2.9.0 are outside the supported range. Each supported minor is checked against the same adapter runtime suite and @@ -429,6 +429,6 @@ aliases and wrapped as `ProcessHistory` capabilities inside What this means in practice: - the adapter is less exposed to private upstream type-module churn -- Pydantic AI 2.9.0 through 2.63.0 share one public adapter contract +- Pydantic AI 2.9.0 through 2.66.0 share one public adapter contract - future Pydantic AI upgrades remain explicit compatibility work - integration points stay isolated behind ACP Kit bridge and runtime seams diff --git a/docs/pydantic-acp/harness-capabilities.md b/docs/pydantic-acp/harness-capabilities.md index 8b588eb..24663cd 100644 --- a/docs/pydantic-acp/harness-capabilities.md +++ b/docs/pydantic-acp/harness-capabilities.md @@ -10,13 +10,13 @@ This is the supported path when you want a Pydantic agent to use: - optional CodeMode execution tools ACP Kit validates its maintained harness bridge surface against -`pydantic-ai-harness[code-mode]==0.63.0`. The bridges intentionally use the +`pydantic-ai-harness[code-mode]==0.66.0`. The bridges intentionally use the public `LocalWorkspace`, `FileSystem`, `Shell`, and `CodeMode` imports; newer Harness capabilities such as Memory and Guardrails remain available to the underlying agent without being reimplemented as ACP Kit-specific tool bridges. -Harness 0.63.0 itself requires `pydantic-ai-slim==2.63.0`. The core -`pydantic-acp` adapter remains compatible with Pydantic AI 2.9.0 through 2.63.0; +Harness 0.66.0 itself requires `pydantic-ai-slim==2.66.0`. The core +`pydantic-acp` adapter remains compatible with Pydantic AI 2.9.0 through 2.66.0; install the `harness` extra only when the resolved Pydantic AI version is in the Harness-supported part of that range. diff --git a/docs/testing.md b/docs/testing.md index 615842d..095c232 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -49,7 +49,7 @@ make check-pydantic-ai-matrix ``` This runs the Pydantic adapter runtime tests and type checks independently -against Pydantic AI 2.9.0 through 2.63.0. The same matrix runs +against Pydantic AI 2.9.0 through 2.66.0. The same matrix runs in CI. Add a version only after both parts pass. LangChain stack compatibility checks: diff --git a/docs/versioning.md b/docs/versioning.md index 4ae8846..f4dc98a 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -47,7 +47,7 @@ The v1 baseline is: | Integration | Supported baseline | |---|---| | Python | 3.11, 3.12, 3.13 | -| Pydantic AI | 2.9.0 through 2.63.0 | +| Pydantic AI | 2.9.0 through 2.66.0 | | LangChain | 1.4.7 | | LangGraph | 1.2.18 | | DeepAgents | 0.7.32 | diff --git a/packages/adapters/langchain-acp/VERSION b/packages/adapters/langchain-acp/VERSION index 0eed1a2..feaae22 100644 --- a/packages/adapters/langchain-acp/VERSION +++ b/packages/adapters/langchain-acp/VERSION @@ -1 +1 @@ -1.12.0 +1.13.0 diff --git a/packages/adapters/langchain-acp/src/langchain_acp/_version.py b/packages/adapters/langchain-acp/src/langchain_acp/_version.py index b64cb77..f79f994 100644 --- a/packages/adapters/langchain-acp/src/langchain_acp/_version.py +++ b/packages/adapters/langchain-acp/src/langchain_acp/_version.py @@ -2,4 +2,4 @@ __all__ = ("__version__",) -__version__ = "1.12.0" +__version__ = "1.13.0" diff --git a/packages/adapters/pydantic-acp/README.md b/packages/adapters/pydantic-acp/README.md index 94b7aad..ca22ff0 100644 --- a/packages/adapters/pydantic-acp/README.md +++ b/packages/adapters/pydantic-acp/README.md @@ -571,7 +571,7 @@ Focused docs recipes: ## Compatibility Policy -`pydantic-acp` supports `pydantic-ai-slim>=2.9.0,<=2.63.0`. Pydantic AI V1 and +`pydantic-acp` supports `pydantic-ai-slim>=2.9.0,<=2.66.0`. Pydantic AI V1 and Pydantic AI 2.x releases before 2.9.0 are outside the supported range. The ACP client provider bridge depends on the Pydantic AI v2 `Provider` and `Model` contracts. Upgrades across major Pydantic AI versions should be deliberate because the adapter exposes both server-side ACP translation and client-side ACP provider integration. @@ -596,9 +596,9 @@ agent: Agent[None, str] = Agent( The supported surface includes tool and output-tool preparation, output validation and processing hooks, deferred tool-call hooks, run metadata, -conversation IDs, and the `run_stream_events()` lifecycle used through 2.63.0. +conversation IDs, and the `run_stream_events()` lifecycle used through 2.66.0. Harness-backed filesystem, shell, and CodeMode bridges are validated against -`pydantic-ai-harness[code-mode]==0.63.0` using its public capability imports. -Harness 0.63.0 requires `pydantic-ai-slim==2.63.0`; the core adapter itself -remains compatible with Pydantic AI 2.9.0 through 2.63.0. +`pydantic-ai-harness[code-mode]==0.66.0` using its public capability imports. +Harness 0.66.0 requires `pydantic-ai-slim==2.66.0`; the core adapter itself +remains compatible with Pydantic AI 2.9.0 through 2.66.0. diff --git a/packages/adapters/pydantic-acp/VERSION b/packages/adapters/pydantic-acp/VERSION index 0eed1a2..feaae22 100644 --- a/packages/adapters/pydantic-acp/VERSION +++ b/packages/adapters/pydantic-acp/VERSION @@ -1 +1 @@ -1.12.0 +1.13.0 diff --git a/packages/adapters/pydantic-acp/pyproject.toml b/packages/adapters/pydantic-acp/pyproject.toml index 85a8e25..28d9af7 100644 --- a/packages/adapters/pydantic-acp/pyproject.toml +++ b/packages/adapters/pydantic-acp/pyproject.toml @@ -18,13 +18,13 @@ dependencies = [ # Fixed for compliance with the ACP 0.12 public SDK. "agent-client-protocol==0.12.1", "anyio>=4.0.0", - "pydantic-ai-slim>=2.9.0,<=2.63.0", + "pydantic-ai-slim>=2.9.0,<=2.66.0", "pydantic>=2.7", "typing-extensions>=4.12.0", ] [project.optional-dependencies] -harness = ["pydantic-ai-harness[code-mode]==0.63.0"] +harness = ["pydantic-ai-harness[code-mode]==0.66.0"] web = ["agent-client-protocol[http]==0.12.1"] [project.urls] diff --git a/packages/adapters/pydantic-acp/src/pydantic_acp/_version.py b/packages/adapters/pydantic-acp/src/pydantic_acp/_version.py index b64cb77..f79f994 100644 --- a/packages/adapters/pydantic-acp/src/pydantic_acp/_version.py +++ b/packages/adapters/pydantic-acp/src/pydantic_acp/_version.py @@ -2,4 +2,4 @@ __all__ = ("__version__",) -__version__ = "1.12.0" +__version__ = "1.13.0" diff --git a/packages/helpers/codex-auth-helper/VERSION b/packages/helpers/codex-auth-helper/VERSION index 0eed1a2..feaae22 100644 --- a/packages/helpers/codex-auth-helper/VERSION +++ b/packages/helpers/codex-auth-helper/VERSION @@ -1 +1 @@ -1.12.0 +1.13.0 diff --git a/packages/helpers/codex-auth-helper/pyproject.toml b/packages/helpers/codex-auth-helper/pyproject.toml index 3815621..2859667 100644 --- a/packages/helpers/codex-auth-helper/pyproject.toml +++ b/packages/helpers/codex-auth-helper/pyproject.toml @@ -17,7 +17,7 @@ classifiers = [ dependencies = [ "httpx>=0.28.1", "openai>=1.109.1", - "pydantic-ai-slim>=2.9.0,<=2.63.0", + "pydantic-ai-slim>=2.9.0,<=2.66.0", "typing-extensions>=4.12.0", ] diff --git a/packages/helpers/codex-auth-helper/src/codex_auth_helper/_event_loops.py b/packages/helpers/codex-auth-helper/src/codex_auth_helper/_event_loops.py new file mode 100644 index 0000000..1049ab9 --- /dev/null +++ b/packages/helpers/codex-auth-helper/src/codex_auth_helper/_event_loops.py @@ -0,0 +1,18 @@ +from __future__ import annotations as _annotations + +import asyncio + +__all__ = ("loop_has_stopped",) + + +def loop_has_stopped( + previous: asyncio.AbstractEventLoop | None, current: asyncio.AbstractEventLoop +) -> bool: + """Whether an async HTTP client last used on ``previous`` must be replaced on ``current``. + + An HTTP connection pool keeps the connections it opened bound to that loop. Once the loop has + stopped, for example after ``asyncio.run`` returned, those connections can neither serve nor + close on another loop. A loop that still runs is left alone: it may be serving the client + concurrently, as Pydantic AI also assumes for the clients its providers own. + """ + return previous is not None and previous is not current and not previous.is_running() diff --git a/packages/helpers/codex-auth-helper/src/codex_auth_helper/_version.py b/packages/helpers/codex-auth-helper/src/codex_auth_helper/_version.py index b64cb77..f79f994 100644 --- a/packages/helpers/codex-auth-helper/src/codex_auth_helper/_version.py +++ b/packages/helpers/codex-auth-helper/src/codex_auth_helper/_version.py @@ -2,4 +2,4 @@ __all__ = ("__version__",) -__version__ = "1.12.0" +__version__ = "1.13.0" diff --git a/packages/helpers/codex-auth-helper/src/codex_auth_helper/auth/manager.py b/packages/helpers/codex-auth-helper/src/codex_auth_helper/auth/manager.py index 9c98ac0..f273c51 100644 --- a/packages/helpers/codex-auth-helper/src/codex_auth_helper/auth/manager.py +++ b/packages/helpers/codex-auth-helper/src/codex_auth_helper/auth/manager.py @@ -10,12 +10,13 @@ import httpx +from .._event_loops import loop_has_stopped from .config import CodexAuthConfig from .errors import CodexAuthAccountMismatchError, CodexAuthRefreshError from .state import CodexAuthState, JsonValue, _extract_account_id from .store import CodexAuthStore -__all__ = ("CodexTokenManager",) +__all__ = ("CodexTokenManager", "create_auth_http_client") _REFRESH_LOCKS: WeakValueDictionary[str, Lock] = WeakValueDictionary() _REFRESH_LOCKS_GUARD = Lock() @@ -31,6 +32,11 @@ def _shared_refresh_lock(store: CodexAuthStore) -> Lock: return lock +def create_auth_http_client(config: CodexAuthConfig) -> httpx.AsyncClient: + """The HTTP client a token manager owns for refreshing tokens.""" + return httpx.AsyncClient(follow_redirects=True, timeout=config.timeout_seconds) + + def _now_utc() -> datetime: return datetime.now(tz=UTC) @@ -55,6 +61,9 @@ class CodexTokenManager: owns_http_client: bool = False _refresh_lock: Lock = field(init=False, repr=False) _state: CodexAuthState = field(init=False, repr=False) + _http_client_loop: asyncio.AbstractEventLoop | None = field( + default=None, init=False, repr=False + ) def __post_init__(self) -> None: self._state = self.store.read_state() @@ -69,9 +78,19 @@ def current_account_id(self) -> str | None: return self._state.account_id async def close(self) -> None: - if self.owns_http_client: + # A client whose loop has stopped cannot close its connections; they went with the loop. + if self.owns_http_client and not loop_has_stopped( + self._http_client_loop, asyncio.get_running_loop() + ): await self.http_client.aclose() + def _http_client_on_current_loop(self) -> httpx.AsyncClient: + loop = asyncio.get_running_loop() + if self.owns_http_client and loop_has_stopped(self._http_client_loop, loop): + self.http_client = create_auth_http_client(self.config) + self._http_client_loop = loop + return self.http_client + async def get_access_token(self) -> str: while not self._refresh_lock.acquire(blocking=False): await asyncio.sleep(0.01) @@ -150,7 +169,7 @@ def _should_refresh(self, state: CodexAuthState) -> bool: return deadline <= _now_utc() + self.config.refresh_margin async def _refresh_locked(self) -> CodexAuthState: - response = await self.http_client.post( + response = await self._http_client_on_current_loop().post( f"{self.config.issuer}/oauth/token", content=str( httpx.QueryParams( diff --git a/packages/helpers/codex-auth-helper/src/codex_auth_helper/client.py b/packages/helpers/codex-auth-helper/src/codex_auth_helper/client.py index 6e28390..893d874 100644 --- a/packages/helpers/codex-auth-helper/src/codex_auth_helper/client.py +++ b/packages/helpers/codex-auth-helper/src/codex_auth_helper/client.py @@ -11,10 +11,18 @@ from uuid import uuid4 import httpx -from openai import AsyncOpenAI, AuthenticationError, NotGiven, Omit, OpenAI +from openai import ( + AsyncOpenAI, + AuthenticationError, + DefaultAsyncHttpxClient, + NotGiven, + Omit, + OpenAI, +) from openai._models import FinalRequestOptions from typing_extensions import override +from ._event_loops import loop_has_stopped from ._headers import CODEX_USER_AGENT, codex_request_headers from ._responses_lite import ( RESPONSES_LITE_HEADER, @@ -37,6 +45,7 @@ ) from .auth import CodexAuthConfig, CodexAuthStore, CodexTokenManager from .auth.errors import CodexAuthAccountMismatchError, CodexAuthRefreshError +from .auth.manager import create_auth_http_client if TYPE_CHECKING: from openai.types.websocket_connection_options import WebSocketConnectionOptions @@ -135,11 +144,15 @@ def __init__( self._owns_http_client = owns_http_client self.responses_transport: CodexResponsesTransport = transport self.responses_transport_observer = transport_observer + self._http_client_loop: asyncio.AbstractEventLoop | None = None self._turn_context = ResponsesTurnContext() super().__init__( api_key=token_manager.get_access_token, base_url=base_url, - http_client=http_client, + # An owned client is built here rather than by the SDK, whose default client closes + # itself from its finalizer on whichever loop runs then, including after its own + # loop has stopped. This client is closed by `close`. + http_client=http_client if http_client is not None else DefaultAsyncHttpxClient(), ) self._http_responses = self.responses self._responses_session_var: ContextVar[_ResponsesSessionState | None] = ContextVar( @@ -504,6 +517,7 @@ async def request( stream: bool = False, stream_cls: Any = None, ) -> Any: + self._use_http_client_on_current_loop() recovery = iter((False, True)) while True: try: @@ -530,9 +544,19 @@ async def _process_response(self, *, response: Any, **kwargs: Any) -> Any: turn.capture(response.headers) return await super()._process_response(response=response, **kwargs) + def _use_http_client_on_current_loop(self) -> None: + """Replace the owned HTTP client once the loop it last ran on has stopped.""" + loop = asyncio.get_running_loop() + if self._owns_http_client and loop_has_stopped(self._http_client_loop, loop): + self._client = DefaultAsyncHttpxClient() + self._http_client_loop = loop + @override async def close(self) -> None: - if self._owns_http_client: + # A client whose loop has stopped cannot close its connections; they went with the loop. + if self._owns_http_client and not loop_has_stopped( + self._http_client_loop, asyncio.get_running_loop() + ): await super().close() await self.token_manager.close() @@ -637,10 +661,7 @@ def create_codex_async_openai( resolved_config = config or CodexAuthConfig() owns_http_client = http_client is None owns_auth_http_client = auth_http_client is None - resolved_auth_http_client = auth_http_client or httpx.AsyncClient( - follow_redirects=True, - timeout=resolved_config.timeout_seconds, - ) + resolved_auth_http_client = auth_http_client or create_auth_http_client(resolved_config) token_manager = CodexTokenManager( config=resolved_config, store=CodexAuthStore(resolved_config.auth_path), @@ -667,10 +688,7 @@ def create_codex_openai( resolved_config = config or CodexAuthConfig() owns_http_client = http_client is None owns_auth_http_client = auth_http_client is None - resolved_auth_http_client = auth_http_client or httpx.AsyncClient( - follow_redirects=True, - timeout=resolved_config.timeout_seconds, - ) + resolved_auth_http_client = auth_http_client or create_auth_http_client(resolved_config) token_manager = CodexTokenManager( config=resolved_config, store=CodexAuthStore(resolved_config.auth_path), diff --git a/packages/transports/acpremote/VERSION b/packages/transports/acpremote/VERSION index 0eed1a2..feaae22 100644 --- a/packages/transports/acpremote/VERSION +++ b/packages/transports/acpremote/VERSION @@ -1 +1 @@ -1.12.0 +1.13.0 diff --git a/packages/transports/acpremote/src/acpremote/_version.py b/packages/transports/acpremote/src/acpremote/_version.py index b64cb77..f79f994 100644 --- a/packages/transports/acpremote/src/acpremote/_version.py +++ b/packages/transports/acpremote/src/acpremote/_version.py @@ -2,4 +2,4 @@ __all__ = ("__version__",) -__version__ = "1.12.0" +__version__ = "1.13.0" diff --git a/pyproject.toml b/pyproject.toml index 599b605..00d45bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,17 +18,17 @@ keywords = ["acp", "agents", "protocol", "pydantic-ai"] dependencies = [ "click>=8.1.8", "pre-commit>=4.6.0", - "pydantic-ai>=2.9.0,<=2.63.0", + "pydantic-ai>=2.9.0,<=2.66.0", "typing-extensions>=4.12.0", ] [project.optional-dependencies] -codex = ["codex-auth-helper>=1.12.0,<2.0.0"] -deepagents = ["langchain-acp[deepagents]>=1.12.0,<2.0.0"] -langchain = ["langchain-acp>=1.12.0,<2.0.0"] +codex = ["codex-auth-helper>=1.13.0,<2.0.0"] +deepagents = ["langchain-acp[deepagents]>=1.13.0,<2.0.0"] +langchain = ["langchain-acp>=1.13.0,<2.0.0"] launch = ["uv>=0.8.3"] -pydantic = ["pydantic-acp>=1.12.0,<2.0.0"] -remote = ["acpremote>=1.12.0,<2.0.0"] +pydantic = ["pydantic-acp>=1.13.0,<2.0.0"] +remote = ["acpremote>=1.13.0,<2.0.0"] web = ["agent-client-protocol[http]==0.12.1"] dev = [ @@ -40,8 +40,8 @@ dev = [ "langchain-acp[deepagents]", "python-dotenv", "pydantic-acp", - "pydantic-ai-harness[code-mode]==0.63.0", - "pydantic-ai-slim>=2.9.0,<=2.63.0", + "pydantic-ai-harness[code-mode]==0.66.0", + "pydantic-ai-slim>=2.9.0,<=2.66.0", "pydantic-graph", "pydantic>=2.7", "pytest-asyncio", diff --git a/src/acpkit/_version.py b/src/acpkit/_version.py index b64cb77..f79f994 100644 --- a/src/acpkit/_version.py +++ b/src/acpkit/_version.py @@ -2,4 +2,4 @@ __all__ = ("__version__",) -__version__ = "1.12.0" +__version__ = "1.13.0" diff --git a/tests/codex_auth_helper/test_event_loops.py b/tests/codex_auth_helper/test_event_loops.py new file mode 100644 index 0000000..e97daca --- /dev/null +++ b/tests/codex_auth_helper/test_event_loops.py @@ -0,0 +1,107 @@ +from __future__ import annotations as _annotations + +import asyncio +import gc +import json +from collections.abc import Awaitable, Iterator +from datetime import timedelta +from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer +from pathlib import Path +from threading import Thread +from typing import Any + +import pytest +from codex_auth_helper import CodexAuthConfig, create_codex_async_openai + +from .support import write_auth_file + + +class _KeepAliveHandler(BaseHTTPRequestHandler): + protocol_version = "HTTP/1.1" + paths: list[str] = [] + + def _reply(self, payload: dict[str, object]) -> None: + self.paths.append(self.path) + body = json.dumps(payload).encode() + self.send_response(200) + self.send_header("Content-Type", "application/json") + self.send_header("Content-Length", str(len(body))) + self.end_headers() + self.wfile.write(body) + + def do_GET(self) -> None: + self._reply({"object": "list", "data": []}) + + def do_POST(self) -> None: + self.rfile.read(int(self.headers.get("Content-Length", "0"))) + self._reply({"access_token": "refreshed", "id_token": None, "refresh_token": "next"}) + + def log_message(self, format: str, *args: object) -> None: + del format, args + + +@pytest.fixture +def server_url() -> Iterator[str]: + _KeepAliveHandler.paths = [] + server = ThreadingHTTPServer(("127.0.0.1", 0), _KeepAliveHandler) + thread = Thread(target=server.serve_forever, daemon=True) + thread.start() + try: + yield f"http://127.0.0.1:{server.server_address[1]}" + finally: + server.shutdown() + server.server_close() + + +def _run(awaitable: Awaitable[object], errors: list[dict[str, Any]]) -> None: + """Run on a new loop, as ``asyncio.run`` does, collecting errors the loop only reports.""" + + async def main() -> None: + asyncio.get_running_loop().set_exception_handler(lambda _, context: errors.append(context)) + await awaitable + gc.collect() + await asyncio.sleep(0) + + asyncio.run(main()) + + +def _config(tmp_path: Path, url: str, *, refresh_every_call: bool = False) -> CodexAuthConfig: + auth_path = tmp_path / "auth.json" + write_auth_file(auth_path) + return CodexAuthConfig( + auth_path=auth_path, + api_base_url=f"{url}/codex", + issuer=url, + # A margin longer than the token's lifetime makes every token request refresh. + refresh_margin=timedelta(hours=2) if refresh_every_call else timedelta(seconds=30), + ) + + +def test_async_client_serves_runs_on_successive_event_loops( + tmp_path: Path, server_url: str +) -> None: + client = create_codex_async_openai(config=_config(tmp_path, server_url)) + + errors: list[dict[str, Any]] = [] + + _run(client.models.list(), errors) + _run(client.models.list(), errors) + _run(client.close(), errors) + + assert _KeepAliveHandler.paths == ["/codex/models", "/codex/models"] + assert errors == [] + + +def test_token_refresh_runs_on_successive_event_loops(tmp_path: Path, server_url: str) -> None: + client = create_codex_async_openai( + config=_config(tmp_path, server_url, refresh_every_call=True) + ) + + errors: list[dict[str, Any]] = [] + + _run(client.token_manager.get_access_token(), errors) + _run(client.token_manager.get_access_token(), errors) + _run(client.close(), errors) + + assert _KeepAliveHandler.paths == ["/oauth/token", "/oauth/token"] + assert errors == [] diff --git a/tests/pydantic/test_acp_client_provider.py b/tests/pydantic/test_acp_client_provider.py index e51116a..d8681c2 100644 --- a/tests/pydantic/test_acp_client_provider.py +++ b/tests/pydantic/test_acp_client_provider.py @@ -317,7 +317,7 @@ def test_pydantic_acp_requires_pydantic_ai_v2() -> None: ) assert ">=2.9.0" in pydantic_ai_dependency - assert "<=2.63.0" in pydantic_ai_dependency + assert "<=2.66.0" in pydantic_ai_dependency assert "==1." not in pydantic_ai_dependency diff --git a/tests/pydantic/test_pydantic_ai_compat.py b/tests/pydantic/test_pydantic_ai_compat.py index e104eea..2d88f82 100644 --- a/tests/pydantic/test_pydantic_ai_compat.py +++ b/tests/pydantic/test_pydantic_ai_compat.py @@ -22,7 +22,7 @@ WORKFLOWS_DIR = REPO_ROOT / ".github" / "workflows" SUPPORTED_FLOOR = Version("2.9.0") -SUPPORTED_CEILING = Version("2.63.0") +SUPPORTED_CEILING = Version("2.66.0") EXPECTED_MATRIX_VERSIONS = ( "2.9.0", "2.9.1", @@ -83,8 +83,11 @@ "2.61.0", "2.62.0", "2.63.0", + "2.64.0", + "2.65.0", + "2.66.0", ) -HARNESS_PIN = "pydantic-ai-harness[code-mode]==0.63.0" +HARNESS_PIN = "pydantic-ai-harness[code-mode]==0.66.0" def _requirement_named(dependencies: list[str], name: str) -> Requirement: @@ -143,7 +146,7 @@ def test_pydantic_acp_declares_supported_pydantic_ai_range() -> None: assert requirement.specifier.contains("2.9.0") assert requirement.specifier.contains(str(SUPPORTED_CEILING)) assert not requirement.specifier.contains("2.8.0") - assert not requirement.specifier.contains("2.64.0") + assert not requirement.specifier.contains("2.67.0") def test_root_dev_extra_pins_supported_pydantic_ai_and_harness() -> None: @@ -162,7 +165,7 @@ def test_pydantic_acp_harness_extra_requires_the_tested_harness_line() -> None: harness_dependencies: list[str] = data["project"]["optional-dependencies"]["harness"] harness = _requirement_named(harness_dependencies, "pydantic-ai-harness") - assert str(harness.specifier) == "==0.63.0" + assert str(harness.specifier) == "==0.66.0" def test_pydantic_ai_matrix_matches_package_support_bounds() -> None: @@ -243,6 +246,9 @@ def test_pydantic_ai_matrix_covers_each_supported_minor_endpoint() -> None: Version("2.61.0"), Version("2.62.0"), Version("2.63.0"), + Version("2.64.0"), + Version("2.65.0"), + Version("2.66.0"), } assert matrix_versions == expected_minors diff --git a/uv.lock b/uv.lock index dc7ae41..a14fe11 100644 --- a/uv.lock +++ b/uv.lock @@ -151,11 +151,11 @@ requires-dist = [ { name = "pydantic-acp", marker = "extra == 'dev'", editable = "packages/adapters/pydantic-acp" }, { name = "pydantic-acp", marker = "extra == 'dev-all'", editable = "packages/adapters/pydantic-acp" }, { name = "pydantic-acp", marker = "extra == 'pydantic'", editable = "packages/adapters/pydantic-acp" }, - { name = "pydantic-ai", specifier = ">=2.9.0,<=2.63.0" }, - { name = "pydantic-ai-harness", extras = ["code-mode"], marker = "extra == 'dev'", specifier = "==0.63.0" }, - { name = "pydantic-ai-harness", extras = ["code-mode"], marker = "extra == 'dev-all'", specifier = "==0.63.0" }, - { name = "pydantic-ai-slim", marker = "extra == 'dev'", specifier = ">=2.9.0,<=2.63.0" }, - { name = "pydantic-ai-slim", marker = "extra == 'dev-all'", specifier = ">=2.9.0,<=2.63.0" }, + { name = "pydantic-ai", specifier = ">=2.9.0,<=2.66.0" }, + { name = "pydantic-ai-harness", extras = ["code-mode"], marker = "extra == 'dev'", specifier = "==0.66.0" }, + { name = "pydantic-ai-harness", extras = ["code-mode"], marker = "extra == 'dev-all'", specifier = "==0.66.0" }, + { name = "pydantic-ai-slim", marker = "extra == 'dev'", specifier = ">=2.9.0,<=2.66.0" }, + { name = "pydantic-ai-slim", marker = "extra == 'dev-all'", specifier = ">=2.9.0,<=2.66.0" }, { name = "pydantic-graph", marker = "extra == 'dev'" }, { name = "pydantic-graph", marker = "extra == 'dev-all'" }, { name = "pytest", marker = "extra == 'dev'" }, @@ -737,7 +737,7 @@ requires-dist = [ { name = "langchain-openai", marker = "extra == 'langchain'", specifier = ">=0.3.26" }, { name = "openai", specifier = ">=1.109.1" }, { name = "openai", extras = ["realtime"], marker = "extra == 'websocket'", specifier = ">=3.8.0" }, - { name = "pydantic-ai-slim", specifier = ">=2.9.0,<=2.63.0" }, + { name = "pydantic-ai-slim", specifier = ">=2.9.0,<=2.66.0" }, { name = "typing-extensions", specifier = ">=4.12.0" }, ] provides-extras = ["langchain", "websocket"] @@ -1489,15 +1489,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/13/80/d1b30336582cced4dce0dae776508a6011723e32f907bc7a702c0b25890a/joserfc-1.7.2-py3-none-any.whl", hash = "sha256:ddd818c0ca9b4f17bbc2d72cb3966e6ded7502be089316c62c3cc64ae86132b5", size = 70426, upload-time = "2026-06-29T09:03:09.393Z" }, ] -[[package]] -name = "json-repair" -version = "0.63.5" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/72/29/653c36e0de80f7048f01298a9098f1c66bb9da162e92ad6a6e2c3202cc52/json_repair-0.63.5.tar.gz", hash = "sha256:75a6a1a4ea954935dd3fb69b6e49ac0e3e3d69b4290127a0c8d37af93b709f3a", size = 52945, upload-time = "2026-09-22T18:36:08.745Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/6b/a4/222e2581667c326183a87df229e772140fbf3e5dc03ec73e2a0e74804114/json_repair-0.63.5-py3-none-any.whl", hash = "sha256:0e39b3066f7829b4bd7fc614e463cfd4ff7a4c46f82f5b65431fc11e29a74c81", size = 51334, upload-time = "2026-09-22T18:36:07.05Z" }, -] - [[package]] name = "jsonpatch" version = "1.33" @@ -2732,38 +2723,37 @@ requires-dist = [ { name = "agent-client-protocol", extras = ["http"], marker = "extra == 'web'", specifier = "==0.12.1" }, { name = "anyio", specifier = ">=4.0.0" }, { name = "pydantic", specifier = ">=2.7" }, - { name = "pydantic-ai-harness", extras = ["code-mode"], marker = "extra == 'harness'", specifier = "==0.63.0" }, - { name = "pydantic-ai-slim", specifier = ">=2.9.0,<=2.63.0" }, + { name = "pydantic-ai-harness", extras = ["code-mode"], marker = "extra == 'harness'", specifier = "==0.66.0" }, + { name = "pydantic-ai-slim", specifier = ">=2.9.0,<=2.66.0" }, { name = "typing-extensions", specifier = ">=4.12.0" }, ] provides-extras = ["harness", "web"] [[package]] name = "pydantic-ai" -version = "2.63.0" +version = "2.66.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "pydantic-ai-slim", extra = ["anthropic", "cli", "evals", "google", "logfire", "mcp", "openai", "web"] }, ] -sdist = { url = "https://files.pythonhosted.org/packages/78/da/880abb7e5bd52fd419f8a47a3e30aa60b909501a205246d7830fc178941a/pydantic_ai-2.63.0.tar.gz", hash = "sha256:88a1ef14de54be028d38ce927c9f60fba5bb298484706bdd49735001876be508", size = 30694, upload-time = "2026-10-28T02:03:30.123Z" } +sdist = { url = "https://files.pythonhosted.org/packages/3a/df/c772b2e6ef546f199bad0d053b188faba942e133bff35c00eb9bf73cf57f/pydantic_ai-2.66.0.tar.gz", hash = "sha256:fac21eca85961e7b001353b65fa00b05ccdbff5615b01892a19f90abbb31a42b", size = 31760, upload-time = "2026-11-04T10:28:53.163Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/2a/c6/4486678afe2280748978d140d06abf3817038b10bdfa8f2aede2a9ee0d5a/pydantic_ai-2.63.0-py3-none-any.whl", hash = "sha256:0629a7a041bb0f840167e6ed77ec17caf4e9084e9213240b392707086a7d8bc6", size = 10472, upload-time = "2026-10-28T02:03:16.025Z" }, + { url = "https://files.pythonhosted.org/packages/79/e2/9435e3a56c47969be98caf212b51ecee7c9d1aea1ed78f72597a3705398d/pydantic_ai-2.66.0-py3-none-any.whl", hash = "sha256:450d9bcaea3e224348855c05bc0b0ece5653cb77a7d8cd0980991fdb22c31bfd", size = 10614, upload-time = "2026-11-04T10:28:38.51Z" }, ] [[package]] name = "pydantic-ai-harness" -version = "0.63.0" +version = "0.66.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "genai-prices", version = "0.1.13", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.15'" }, { name = "genai-prices", version = "0.2.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.15'" }, { name = "httpx" }, - { name = "json-repair" }, { name = "pydantic-ai-slim" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/28/59/2ac6c7f654603007e3f2d5648ba53e89ade1a76da1410bfe2ad0fb59081e/pydantic_ai_harness-0.63.0.tar.gz", hash = "sha256:ee8af8b2b4e1f11dc34f21f689f48ff921528bd92ba9f1099871c9412632df13", size = 1383561, upload-time = "2026-10-28T02:03:32.454Z" } +sdist = { url = "https://files.pythonhosted.org/packages/c8/28/96e1ac69852614c1c993ca352000f0f8e381bbc9656802a16864a5c2d897/pydantic_ai_harness-0.66.0.tar.gz", hash = "sha256:d646caf7cf0f83ced707d88dbc387bd73f3ff78cd6e34722665cf527dcfe6674", size = 1504421, upload-time = "2026-11-04T10:28:55.84Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/e0/06/9b3e0376d31fddfe05a3b6a9848548c65fa7716d8286b52d739e14575903/pydantic_ai_harness-0.63.0-py3-none-any.whl", hash = "sha256:cf2442d134e38e5cec12522889c8d617d7f8503f3ea7232cb1e9e3edf0313055", size = 1693405, upload-time = "2026-10-28T02:03:19.631Z" }, + { url = "https://files.pythonhosted.org/packages/50/1b/d3a4e0941226a88f54e17fbb80b7190b752154329d6681a465ae101b4706/pydantic_ai_harness-0.66.0-py3-none-any.whl", hash = "sha256:d98e2e8c57dd34560ad0a83c5611d9b57c30c7572f2bde276d3b99c4d99ab025", size = 1838626, upload-time = "2026-11-04T10:28:42.148Z" }, ] [package.optional-dependencies] @@ -2774,7 +2764,7 @@ code-mode = [ [[package]] name = "pydantic-ai-slim" -version = "2.63.0" +version = "2.66.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "anyio" }, @@ -2787,9 +2777,9 @@ dependencies = [ { name = "pydantic-graph" }, { name = "typing-inspection" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/73/c3/7c9c8d071249f8ff3225531c7decec7b35149741cc4330db2dc56b2a3393/pydantic_ai_slim-2.63.0.tar.gz", hash = "sha256:dd8bde21754001a9d9be4ae79bada4dcbea5142e3d9fce4c13efaf972674a764", size = 2320687, upload-time = "2026-10-28T02:03:33.909Z" } +sdist = { url = "https://files.pythonhosted.org/packages/cf/35/f8330c6797a3a3646e90c5a05354441a159f7451ff077182a2ea001f61df/pydantic_ai_slim-2.66.0.tar.gz", hash = "sha256:78968fa75086ddae9039bdaa3939e9510f15a40d5f1f58fb3ded04386f9292f2", size = 2451556, upload-time = "2026-11-04T10:28:57.707Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/b2/70/93c22c81829c7739fc24241eedc0bdadb4294859014d3a9ae667db0cf5c5/pydantic_ai_slim-2.63.0-py3-none-any.whl", hash = "sha256:0694051caa2357ddac4e98ec69e1ae509e20cffc2f4a658217fbd35e83b96339", size = 2682890, upload-time = "2026-10-28T02:03:21.635Z" }, + { url = "https://files.pythonhosted.org/packages/8b/13/deacff97ec5836e0ef2e2a55731a1d32ba325d6dead37f6839b11a03d463/pydantic_ai_slim-2.66.0-py3-none-any.whl", hash = "sha256:c47bbd0abe6f51e5400308a53b4f7e3409a582b1459140c381e3d4701a205608", size = 2819952, upload-time = "2026-11-04T10:28:44.228Z" }, ] [package.optional-dependencies] @@ -2932,7 +2922,7 @@ wheels = [ [[package]] name = "pydantic-evals" -version = "2.63.0" +version = "2.66.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "anyio" }, @@ -2942,14 +2932,14 @@ dependencies = [ { name = "pyyaml" }, { name = "rich" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/4d/ed/2322151c1fdebfdc1196dd9af06729db55ef5eb598c373809b036e0afdac/pydantic_evals-2.63.0.tar.gz", hash = "sha256:f63109ea7e5f5e7e15b5b725a6eb9add3565e58f9c0fdf001654cf3998b92283", size = 93488, upload-time = "2026-10-28T02:03:36.669Z" } +sdist = { url = "https://files.pythonhosted.org/packages/d3/dc/2ca0b3898f9022cf403f4b8cfd47ef4fbca28f01fc5c245f6631369d5456/pydantic_evals-2.66.0.tar.gz", hash = "sha256:db7bfde5d73f32d8d5987adb4c126eb401d2e8c32847ff2746020ca9c7c47006", size = 101985, upload-time = "2026-11-04T10:29:01.52Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/5f/36/9fc90c64f41162c45c7f3b9fbb3e7b4bb0def19b7be10560cb98160fea9d/pydantic_evals-2.63.0-py3-none-any.whl", hash = "sha256:1b7e6587ea4387ceed857eb1846b136368a309af42f888299ba3ecf149ea597a", size = 108670, upload-time = "2026-10-28T02:03:25.891Z" }, + { url = "https://files.pythonhosted.org/packages/14/f1/2baac975903767604bc02f5e598ee0a2c2aadd472982cdad20b2a161c443/pydantic_evals-2.66.0-py3-none-any.whl", hash = "sha256:233ed99a7dc57371bf76150158fc88d6e00f9c95008f761b341f1d256b67edc9", size = 117869, upload-time = "2026-11-04T10:28:48.808Z" }, ] [[package]] name = "pydantic-graph" -version = "2.63.0" +version = "2.66.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "anyio" }, @@ -2957,9 +2947,9 @@ dependencies = [ { name = "pydantic" }, { name = "typing-inspection" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/9b/b5/ad651d8c39cf2c537307ad68d4d1e7d75fd34566a405abc5370e1467c4fe/pydantic_graph-2.63.0.tar.gz", hash = "sha256:ffd687a20b7c6b2914c95e19f4b1501c9768763289b482eea82dd72b2488366e", size = 46461, upload-time = "2026-10-28T02:03:37.688Z" } +sdist = { url = "https://files.pythonhosted.org/packages/9f/60/e098cf08a7cad7dce38f2dbb7b977e93ea6204e99f61c33bcc76df71a7bf/pydantic_graph-2.66.0.tar.gz", hash = "sha256:af31fd3ad5f3446556a270b14e1a43b12996f4bb52a0511f58f739dbacadb3f9", size = 46774, upload-time = "2026-11-04T10:29:02.726Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/98/da/4e35663fc8c174b583c908975e9cb2a24c3ee55b714adbff8974b0472f61/pydantic_graph-2.63.0-py3-none-any.whl", hash = "sha256:803eef2c9b24798d0d13372f7e9d1600920abb96e114368c7add7a57436cb7b2", size = 53642, upload-time = "2026-10-28T02:03:27.55Z" }, + { url = "https://files.pythonhosted.org/packages/7d/0c/2c2ff8a1ede97bb734a56e5b4991a9a98dd05b9ba9f5d8683e4acfdc9d34/pydantic_graph-2.66.0-py3-none-any.whl", hash = "sha256:5b2a0aafc569c00fdb36879b1e80bed06ed5926979e2c1d44533222f208fd2ec", size = 53975, upload-time = "2026-11-04T10:28:50.502Z" }, ] [[package]]