diff --git a/examples/pyproject.toml b/examples/pyproject.toml index 477dd0a787..f7cd9babfe 100644 --- a/examples/pyproject.toml +++ b/examples/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "pydantic-ai-examples" -version = "0.0.35" +version = "0.0.36" description = "Examples of how to use PydanticAI and what it can do." authors = [{ name = "Samuel Colvin", email = "samuel@pydantic.dev" }] license = "MIT" @@ -32,7 +32,7 @@ classifiers = [ ] requires-python = ">=3.9" dependencies = [ - "pydantic-ai-slim[openai,vertexai,groq,anthropic]==0.0.35", + "pydantic-ai-slim[openai,vertexai,groq,anthropic]==0.0.36", "asyncpg>=0.30.0", "fastapi>=0.115.4", "logfire[asyncpg,fastapi,sqlite3]>=2.6", diff --git a/pydantic_ai_slim/pyproject.toml b/pydantic_ai_slim/pyproject.toml index 75bc7c65ef..62b144460e 100644 --- a/pydantic_ai_slim/pyproject.toml +++ b/pydantic_ai_slim/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "pydantic-ai-slim" -version = "0.0.35" +version = "0.0.36" description = "Agent Framework / shim to use Pydantic with LLMs, slim package" authors = [{ name = "Samuel Colvin", email = "samuel@pydantic.dev" }] license = "MIT" @@ -36,7 +36,7 @@ dependencies = [ "griffe>=1.3.2", "httpx>=0.27", "pydantic>=2.10", - "pydantic-graph==0.0.35", + "pydantic-graph==0.0.36", "exceptiongroup; python_version < '3.11'", "opentelemetry-api>=1.28.0", "typing-inspection>=0.4.0", diff --git a/pydantic_graph/pyproject.toml b/pydantic_graph/pyproject.toml index e88b9c386d..81fdce1dc0 100644 --- a/pydantic_graph/pyproject.toml +++ b/pydantic_graph/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "pydantic-graph" -version = "0.0.35" +version = "0.0.36" description = "Graph and state machine library" authors = [{ name = "Samuel Colvin", email = "samuel@pydantic.dev" }] license = "MIT" diff --git a/pyproject.toml b/pyproject.toml index 338ef65453..dfcede0379 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "pydantic-ai" -version = "0.0.35" +version = "0.0.36" description = "Agent Framework / shim to use Pydantic with LLMs" authors = [ { name = "Samuel Colvin", email = "samuel@pydantic.dev" }, @@ -36,7 +36,7 @@ classifiers = [ ] requires-python = ">=3.9" dependencies = [ - "pydantic-ai-slim[openai,vertexai,groq,anthropic,mistral,cohere,bedrock,cli]==0.0.35", + "pydantic-ai-slim[openai,vertexai,groq,anthropic,mistral,cohere,bedrock,cli]==0.0.36", ] [project.urls] @@ -46,7 +46,7 @@ Documentation = "https://ai.pydantic.dev" Changelog = "https://github.com/pydantic/pydantic-ai/releases" [project.optional-dependencies] -examples = ["pydantic-ai-examples==0.0.35"] +examples = ["pydantic-ai-examples==0.0.36"] logfire = ["logfire>=2.3"] [tool.uv.sources] diff --git a/tests/test_cli.py b/tests/test_cli.py index 98be73df5f..6267efceb8 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -46,7 +46,4 @@ def test_cli_help(capfd: CaptureFixture[str]): def test_invalid_model(capfd: CaptureFixture[str]): assert cli(['--model', 'invalid_model']) == 1 - assert capfd.readouterr().out == snapshot("""\ -pai - PydanticAI CLI v0.0.35 -Invalid model "invalid_model" -""") + assert capfd.readouterr().out.splitlines() == snapshot([IsStr(), 'Invalid model "invalid_model"']) diff --git a/uprev.py b/uprev.py index fb0a920301..0aa4d60213 100644 --- a/uprev.py +++ b/uprev.py @@ -15,7 +15,6 @@ import re import subprocess import sys - from pathlib import Path ROOT_DIR = Path(__file__).parent @@ -27,7 +26,7 @@ sys.exit(1) -old_version: str | None = None +old_version: str = None def sub_version(m: re.Match[str]) -> str: @@ -72,7 +71,17 @@ def replace_deps_version(text: str) -> tuple[str, int]: graph_pp_text = graph_pp.read_text() graph_pp_text, count_graph = replace_deps_version(graph_pp_text) -if count_root == 2 and count_ex == 2 and count_slim == 2 and count_graph == 1: +EXPECTED_COUNT_ROOT = 2 +EXPECTED_COUNT_EX = 2 +EXPECTED_COUNT_SLIM = 2 +EXPECTED_COUNT_GRAPH = 1 + +if ( + count_root == EXPECTED_COUNT_ROOT + and count_ex == EXPECTED_COUNT_EX + and count_slim == EXPECTED_COUNT_SLIM + and count_graph == EXPECTED_COUNT_GRAPH +): root_pp.write_text(root_pp_text) examples_pp.write_text(examples_pp_text) slim_pp.write_text(slim_pp_text) @@ -81,20 +90,14 @@ def replace_deps_version(text: str) -> tuple[str, int]: subprocess.run(['make', 'sync'], check=True) print(f'running `git switch -c uprev-{version}`...') subprocess.run(['git', 'switch', '-c', f'uprev-{version}'], check=True) - print( - f'SUCCESS: replaced version in\n' - f' {root_pp}\n' - f' {examples_pp}\n' - f' {slim_pp}\n' - f' {graph_pp}' - ) + print(f'SUCCESS: replaced version in\n {root_pp}\n {examples_pp}\n {slim_pp}\n {graph_pp}') else: print( f'ERROR:\n' - f' {count_root} version references in {root_pp} (expected 2)\n' - f' {count_ex} version references in {examples_pp} (expected 2)\n' - f' {count_slim} version references in {slim_pp} (expected 1)', - f' {count_graph} version references in {graph_pp} (expected 1)', + f' {count_root} version references in {root_pp} (expected {EXPECTED_COUNT_ROOT})\n' + f' {count_ex} version references in {examples_pp} (expected {EXPECTED_COUNT_EX})\n' + f' {count_slim} version references in {slim_pp} (expected {EXPECTED_COUNT_SLIM})\n' + f' {count_graph} version references in {graph_pp} (expected {EXPECTED_COUNT_GRAPH})', file=sys.stderr, ) sys.exit(1) diff --git a/uv.lock b/uv.lock index d23a802bce..9011272a0d 100644 --- a/uv.lock +++ b/uv.lock @@ -2716,7 +2716,7 @@ wheels = [ [[package]] name = "pydantic-ai" -version = "0.0.35" +version = "0.0.36" source = { editable = "." } dependencies = [ { name = "pydantic-ai-slim", extra = ["anthropic", "bedrock", "cli", "cohere", "groq", "mistral", "openai", "vertexai"] }, @@ -2780,7 +2780,7 @@ lint = [ [[package]] name = "pydantic-ai-examples" -version = "0.0.35" +version = "0.0.36" source = { editable = "examples" } dependencies = [ { name = "asyncpg" }, @@ -2809,7 +2809,7 @@ requires-dist = [ [[package]] name = "pydantic-ai-slim" -version = "0.0.35" +version = "0.0.36" source = { editable = "pydantic_ai_slim" } dependencies = [ { name = "eval-type-backport" }, @@ -3019,7 +3019,7 @@ wheels = [ [[package]] name = "pydantic-graph" -version = "0.0.35" +version = "0.0.36" source = { editable = "pydantic_graph" } dependencies = [ { name = "httpx" },