Skip to content

Commit 8091d05

Browse files
Python: refresh dev dependencies and validate runtime bounds (#6238)
Updates third-party dev dependencies across the Python workspace and validates that all runtime dependency bounds still hold at both ends. Dev dependency bumps (root, lab, declarative, durabletask): - uv 0.11.6 -> 0.11.17, ruff 0.15.8 -> 0.15.15, pytest-asyncio 1.3.0 -> 1.4.0, mcp 1.27.0 -> 1.27.2, azure-monitor-opentelemetry 1.8.7 -> 1.8.8, poethepoet 0.42.1 -> 0.46.0, prek 0.3.9 -> 0.4.3, types-python-dateutil and types-PyYaml stub bumps. - Transitive Dependabot items swept via lock: idna 3.11 -> 3.17, pip 26.0.1 -> 26.1.2. Deliberately excluded: - opentelemetry-sdk stays 1.40.0: azure-monitor-opentelemetry (incl. 1.8.8) hard-pins opentelemetry-sdk==1.40. - mypy stays 1.20.0 and pyright stays 1.1.408: the 2.1.0 / 1.1.409 bumps introduce new diagnostics that fail type checking and need dedicated PRs. - rich kept as a range: agentlightning (lab[lightning]) forces rich==13.9.4. Code/formatting changes driven by the ruff upgrade: - devui lifespan now uses try/finally so shutdown cleanup always runs (ruff RUF075). - Removed unused TYPE_CHECKING imports in core and foundry flagged by ruff 0.15.15. - Reapplied ruff 0.15.15 formatting to the files it changed. Validation: validate-dependency-bounds-test "*" passes (31/31 lower + 31/31 upper); typing 62/62; lint 31/31; devui tests pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 52a8045 commit 8091d05

18 files changed

Lines changed: 278 additions & 255 deletions

File tree

python/packages/a2a/agent_framework_a2a/_a2a_executor.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,7 @@ async def handle_events(
287287
artifact_id=artifact_id,
288288
metadata=metadata,
289289
append=(
290-
True
291-
if streamed_artifact_ids is not None and artifact_id in streamed_artifact_ids
292-
else None
290+
True if streamed_artifact_ids is not None and artifact_id in streamed_artifact_ids else None
293291
),
294292
)
295293
if artifact_id and streamed_artifact_ids is not None:

python/packages/core/agent_framework/_middleware.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,10 @@
3636
from pydantic import BaseModel
3737

3838
from ._agents import SupportsAgentRun
39-
from ._clients import SupportsChatGetResponse
4039
from ._compaction import CompactionStrategy, TokenizerProtocol
4140
from ._sessions import AgentSession
4241
from ._tools import FunctionTool, ToolTypes
43-
from ._types import ChatOptions, ChatResponse, ChatResponseUpdate
42+
from ._types import ChatOptions
4443

4544
ResponseModelBoundT = TypeVar("ResponseModelBoundT", bound=BaseModel)
4645

python/packages/core/agent_framework/_skills.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2134,9 +2134,7 @@ async def _run_script(
21342134
),
21352135
FunctionTool(
21362136
name="read_skill_resource",
2137-
description=(
2138-
"Reads a resource associated with a skill, such as references, assets, or dynamic data."
2139-
),
2137+
description=("Reads a resource associated with a skill, such as references, assets, or dynamic data."),
21402138
func=_read_resource,
21412139
input_model={
21422140
"type": "object",
@@ -2173,8 +2171,7 @@ async def _run_script(
21732171
"type": "object",
21742172
"additionalProperties": True,
21752173
"description": (
2176-
"Named arguments as key-value pairs "
2177-
'(e.g. {"length": 24, "uppercase": true}).'
2174+
'Named arguments as key-value pairs (e.g. {"length": 24, "uppercase": true}).'
21782175
),
21792176
},
21802177
{

python/packages/core/tests/core/test_skills.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4086,8 +4086,8 @@ async def test_full_skill_content_contains_scripts(self) -> None:
40864086

40874087
async def test_content_is_cached(self) -> None:
40884088
skill = _MinimalClassSkill()
4089-
content1 = (await skill.get_content())
4090-
content2 = (await skill.get_content())
4089+
content1 = await skill.get_content()
4090+
content2 = await skill.get_content()
40914091
assert content1 is content2
40924092

40934093
def test_resources_are_lazy_cached(self) -> None:
@@ -5587,8 +5587,8 @@ class TestInlineSkillContentCaching:
55875587
async def test_content_cached_after_first_access(self) -> None:
55885588
"""InlineSkill.content returns the same object on subsequent accesses."""
55895589
skill = InlineSkill(frontmatter=SkillFrontmatter(name="test-skill", description="Test"), instructions="Body")
5590-
first = (await skill.get_content())
5591-
second = (await skill.get_content())
5590+
first = await skill.get_content()
5591+
second = await skill.get_content()
55925592
assert first is second # Same object (cached)
55935593
assert "<name>test-skill</name>" in first
55945594

python/packages/declarative/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ dependencies = [
2929
]
3030
[dependency-groups]
3131
dev = [
32-
"types-PyYaml==6.0.12.20250915"
32+
"types-PyYaml==6.0.12.20260518"
3333
]
3434

3535
[tool.uv]

python/packages/devui/agent_framework_devui/_server.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -375,13 +375,15 @@ async def lifespan(app: FastAPI) -> AsyncGenerator[None]:
375375
logger.info("Starting Agent Framework Server")
376376
await self._ensure_executor()
377377
await self._ensure_openai_executor() # Initialize OpenAI executor
378-
yield
379-
# Shutdown
380-
logger.info("Shutting down Agent Framework Server")
381-
382-
# Cleanup entity resources (e.g., close credentials, clients)
383-
if self.executor:
384-
await self._cleanup_entities()
378+
try:
379+
yield
380+
finally:
381+
# Shutdown
382+
logger.info("Shutting down Agent Framework Server")
383+
384+
# Cleanup entity resources (e.g., close credentials, clients)
385+
if self.executor:
386+
await self._cleanup_entities()
385387

386388
app = FastAPI(
387389
title="Agent Framework Server",

python/packages/durabletask/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ dependencies = [
3030

3131
[dependency-groups]
3232
dev = [
33-
"types-python-dateutil==2.9.0.20260402",
33+
"types-python-dateutil==2.9.0.20260518",
3434
]
3535

3636
[tool.uv]

python/packages/foundry/agent_framework_foundry/_agent.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@
5757
from agent_framework import (
5858
Agent,
5959
AgentRunInputs,
60-
ChatAndFunctionMiddlewareTypes,
61-
ContextProvider,
6260
MiddlewareTypes,
6361
ToolTypes,
6462
)

python/packages/lab/pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,19 @@ math = [
5757

5858
[dependency-groups]
5959
dev = [
60-
"uv==0.11.6",
61-
"ruff==0.15.8",
60+
"uv==0.11.17",
61+
"ruff==0.15.15",
6262
"pytest==9.0.3",
6363
"mypy==1.20.0",
6464
"pyright==1.1.408",
6565
#tasks
66-
"poethepoet==0.42.1",
66+
"poethepoet==0.46.0",
6767
"rich>=13.7.1,<15.0.0",
6868
"tomli==2.4.1",
6969
"tomli-w==1.2.0",
7070
# tau2 from source (not available on PyPI)
7171
"tau2@ git+https://github.com/sierra-research/tau2-bench@5ba9e3e56db57c5e4114bf7f901291f09b2c5619",
72-
"prek==0.3.9",
72+
"prek==0.4.3",
7373
]
7474

7575
[project.scripts]

python/pyproject.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,25 @@ dependencies = [
2828

2929
[dependency-groups]
3030
dev = [
31-
"uv==0.11.6",
31+
"uv==0.11.17",
3232
"flit==3.12.0",
33-
"ruff==0.15.8",
33+
"ruff==0.15.15",
3434
"pytest==9.0.3",
35-
"pytest-asyncio==1.3.0",
35+
"pytest-asyncio==1.4.0",
3636
"pytest-cov==7.1.0",
3737
"pytest-xdist[psutil]==3.8.0",
3838
"pytest-timeout==2.4.0",
3939
"pytest-retry==1.7.0",
4040
"mypy==1.20.0",
4141
"pyright==1.1.408",
42-
"mcp[ws]==1.27.0",
42+
"mcp[ws]==1.27.2",
4343
"opentelemetry-sdk==1.40.0",
44-
"azure-monitor-opentelemetry==1.8.7",
44+
"azure-monitor-opentelemetry==1.8.8",
4545
#tasks
46-
"poethepoet==0.42.1",
46+
"poethepoet==0.46.0",
4747
"rich>=13.7.1,<16.0.0",
4848
"tomli==2.4.1",
49-
"prek==0.3.9",
49+
"prek==0.4.3",
5050
]
5151

5252
[tool.uv]

0 commit comments

Comments
 (0)