Skip to content

Commit 264a8f4

Browse files
scale-ballenclaude
andcommitted
fix: remove private _JSONTypeConverterUnhandled import from worker.py
This private symbol was used only as a return type annotation. In some resolved versions of temporalio (within the >=1.18.2,<2 range), this private name is not exported, causing an ImportError at worker startup time in tutorial environments. The sentinel value JSONTypeConverter.Unhandled (public API) is what the method actually returns; the annotation is simplified to Any. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 6fa9d54 commit 264a8f4

File tree

1 file changed

+1
-2
lines changed
  • src/agentex/lib/core/temporal/workers

1 file changed

+1
-2
lines changed

src/agentex/lib/core/temporal/workers/worker.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
DefaultPayloadConverter,
2525
CompositePayloadConverter,
2626
JSONPlainPayloadConverter,
27-
_JSONTypeConverterUnhandled,
2827
)
2928
from temporalio.contrib.openai_agents import OpenAIAgentsPlugin
3029

@@ -45,7 +44,7 @@ def default(self, o: Any) -> Any:
4544

4645
class DateTimeJSONTypeConverter(JSONTypeConverter):
4746
@override
48-
def to_typed_value(self, hint: type, value: Any) -> Any | None | _JSONTypeConverterUnhandled:
47+
def to_typed_value(self, hint: type, value: Any) -> Any:
4948
if hint == datetime.datetime:
5049
return datetime.datetime.fromisoformat(value)
5150
return JSONTypeConverter.Unhandled

0 commit comments

Comments
 (0)