pydantic-graph 1.27.0__tar.gz → 1.29.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pydantic_graph-1.27.0 → pydantic_graph-1.29.0}/PKG-INFO +1 -1
- {pydantic_graph-1.27.0 → pydantic_graph-1.29.0}/pydantic_graph/beta/graph.py +10 -7
- {pydantic_graph-1.27.0 → pydantic_graph-1.29.0}/.gitignore +0 -0
- {pydantic_graph-1.27.0 → pydantic_graph-1.29.0}/LICENSE +0 -0
- {pydantic_graph-1.27.0 → pydantic_graph-1.29.0}/README.md +0 -0
- {pydantic_graph-1.27.0 → pydantic_graph-1.29.0}/pydantic_graph/__init__.py +0 -0
- {pydantic_graph-1.27.0 → pydantic_graph-1.29.0}/pydantic_graph/_utils.py +0 -0
- {pydantic_graph-1.27.0 → pydantic_graph-1.29.0}/pydantic_graph/beta/__init__.py +0 -0
- {pydantic_graph-1.27.0 → pydantic_graph-1.29.0}/pydantic_graph/beta/decision.py +0 -0
- {pydantic_graph-1.27.0 → pydantic_graph-1.29.0}/pydantic_graph/beta/graph_builder.py +0 -0
- {pydantic_graph-1.27.0 → pydantic_graph-1.29.0}/pydantic_graph/beta/id_types.py +0 -0
- {pydantic_graph-1.27.0 → pydantic_graph-1.29.0}/pydantic_graph/beta/join.py +0 -0
- {pydantic_graph-1.27.0 → pydantic_graph-1.29.0}/pydantic_graph/beta/mermaid.py +0 -0
- {pydantic_graph-1.27.0 → pydantic_graph-1.29.0}/pydantic_graph/beta/node.py +0 -0
- {pydantic_graph-1.27.0 → pydantic_graph-1.29.0}/pydantic_graph/beta/node_types.py +0 -0
- {pydantic_graph-1.27.0 → pydantic_graph-1.29.0}/pydantic_graph/beta/parent_forks.py +0 -0
- {pydantic_graph-1.27.0 → pydantic_graph-1.29.0}/pydantic_graph/beta/paths.py +0 -0
- {pydantic_graph-1.27.0 → pydantic_graph-1.29.0}/pydantic_graph/beta/step.py +0 -0
- {pydantic_graph-1.27.0 → pydantic_graph-1.29.0}/pydantic_graph/beta/util.py +0 -0
- {pydantic_graph-1.27.0 → pydantic_graph-1.29.0}/pydantic_graph/exceptions.py +0 -0
- {pydantic_graph-1.27.0 → pydantic_graph-1.29.0}/pydantic_graph/graph.py +0 -0
- {pydantic_graph-1.27.0 → pydantic_graph-1.29.0}/pydantic_graph/mermaid.py +0 -0
- {pydantic_graph-1.27.0 → pydantic_graph-1.29.0}/pydantic_graph/nodes.py +0 -0
- {pydantic_graph-1.27.0 → pydantic_graph-1.29.0}/pydantic_graph/persistence/__init__.py +0 -0
- {pydantic_graph-1.27.0 → pydantic_graph-1.29.0}/pydantic_graph/persistence/_utils.py +0 -0
- {pydantic_graph-1.27.0 → pydantic_graph-1.29.0}/pydantic_graph/persistence/file.py +0 -0
- {pydantic_graph-1.27.0 → pydantic_graph-1.29.0}/pydantic_graph/persistence/in_mem.py +0 -0
- {pydantic_graph-1.27.0 → pydantic_graph-1.29.0}/pydantic_graph/py.typed +0 -0
- {pydantic_graph-1.27.0 → pydantic_graph-1.29.0}/pyproject.toml +0 -0
|
@@ -13,7 +13,7 @@ from contextlib import AbstractContextManager, AsyncExitStack, ExitStack, asyncc
|
|
|
13
13
|
from dataclasses import dataclass, field
|
|
14
14
|
from typing import TYPE_CHECKING, Any, Generic, Literal, TypeGuard, cast, get_args, get_origin, overload
|
|
15
15
|
|
|
16
|
-
from anyio import CancelScope, create_memory_object_stream, create_task_group
|
|
16
|
+
from anyio import BrokenResourceError, CancelScope, create_memory_object_stream, create_task_group
|
|
17
17
|
from anyio.abc import TaskGroup
|
|
18
18
|
from anyio.streams.memory import MemoryObjectReceiveStream, MemoryObjectSendStream
|
|
19
19
|
from typing_extensions import TypeVar, assert_never
|
|
@@ -748,12 +748,15 @@ class _GraphIterator(Generic[StateT, DepsT, OutputT]):
|
|
|
748
748
|
with CancelScope() as scope:
|
|
749
749
|
self.cancel_scopes[t_.task_id] = scope
|
|
750
750
|
result = await self._run_task(t_)
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
751
|
+
try:
|
|
752
|
+
if isinstance(result, _GraphTaskAsyncIterable):
|
|
753
|
+
async for new_tasks in result.iterable:
|
|
754
|
+
await self.iter_stream_sender.send(_GraphTaskResult(t_, new_tasks, False))
|
|
755
|
+
await self.iter_stream_sender.send(_GraphTaskResult(t_, []))
|
|
756
|
+
else:
|
|
757
|
+
await self.iter_stream_sender.send(_GraphTaskResult(t_, result))
|
|
758
|
+
except BrokenResourceError:
|
|
759
|
+
pass # pragma: no cover # This can happen in difficult-to-reproduce circumstances when cancelling an asyncio task
|
|
757
760
|
|
|
758
761
|
async def _run_task(
|
|
759
762
|
self,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|