Skip to content

Commit 6f58f57

Browse files
authored
test minimum versions (#743)
1 parent 3b524b7 commit 6f58f57

File tree

5 files changed

+32
-24
lines changed

5 files changed

+32
-24
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ on:
99
pull_request: {}
1010

1111
env:
12-
CI: true
1312
COLUMNS: 150
1413
UV_PYTHON: 3.12
1514
UV_FROZEN: '1'
@@ -144,6 +143,14 @@ jobs:
144143

145144
- run: uv run --all-extras python tests/import_examples.py
146145

146+
# this must run last as it modifies the environment!
147+
- name: test lowest versions
148+
run: |
149+
unset UV_FROZEN
150+
uv run --all-extras --resolution lowest-direct coverage run -m pytest
151+
env:
152+
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}-lowest-versions
153+
147154
- name: store coverage files
148155
uses: actions/upload-artifact@v4
149156
with:

pydantic_ai_slim/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ requires-python = ">=3.9"
3636
dependencies = [
3737
"eval-type-backport>=0.2.0",
3838
"griffe>=1.3.2",
39-
"httpx>=0.27.2",
39+
"httpx>=0.27",
4040
"logfire-api>=1.2.0",
4141
"pydantic>=2.10",
4242
]
@@ -46,7 +46,7 @@ dependencies = [
4646
logfire = ["logfire>=2.3"]
4747
graph = ["pydantic-graph==0.0.19"]
4848
openai = ["openai>=1.54.3"]
49-
cohere = ["cohere>=5.13.4"]
49+
cohere = ["cohere>=5.13.11"]
5050
vertexai = ["google-auth>=2.36.0", "requests>=2.32.3"]
5151
anthropic = ["anthropic>=0.40.0"]
5252
groq = ["groq>=0.12.0"]

pydantic_graph/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ classifiers = [
3434
]
3535
requires-python = ">=3.9"
3636
dependencies = [
37-
"httpx>=0.27.2",
37+
"httpx>=0.27",
3838
"logfire-api>=1.2.0",
3939
"pydantic>=2.10",
4040
]

tests/test_utils.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
from __future__ import annotations as _annotations
22

33
import asyncio
4+
import os
45
from collections.abc import AsyncIterator
6+
from importlib.metadata import distributions
57

68
import pytest
79
from inline_snapshot import snapshot
@@ -76,3 +78,12 @@ async def test_peekable_async_stream(peek_first: bool):
7678
assert await peekable_async_stream.is_exhausted()
7779
assert await peekable_async_stream.peek() is UNSET
7880
assert items == [1, 2, 3]
81+
82+
83+
def test_package_versions(capsys: pytest.CaptureFixture[str]):
84+
if os.getenv('CI'):
85+
with capsys.disabled():
86+
print('\npackage versions:')
87+
packages = sorted((package.metadata['Name'], package.version) for package in distributions())
88+
for name, version in packages:
89+
print(f'{name:30} {version}')

uv.lock

Lines changed: 10 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)