fix(temporal): remove private _JSONTypeConverterUnhandled from type annotations#193
Closed
fix(temporal): remove private _JSONTypeConverterUnhandled from type annotations#193
Conversation
…nnotations _JSONTypeConverterUnhandled was removed in temporalio 1.25.0 as it was never part of the public API. The return type annotation was the only usage — the method body correctly uses the public JSONTypeConverter.Unhandled sentinel. Replace the return type with Any.
Author
|
Closing — changes should go through the private scaleapi/agentex repo. The fix is included in scaleapi/agentex#326. |
Author
|
Closing — the Dockerfile lockfile fix in scaleapi/agentex#326 pins temporalio to 1.23.0, making this unnecessary for now. Whoever bumps temporalio past 1.25.0 in the lockfile should remove the _JSONTypeConverterUnhandled reference at that point. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_JSONTypeConverterUnhandledwas removed in temporalio 1.25.0 — it was never part of the public APIDateTimeJSONTypeConverter.to_typed_valuein two files; the method body already uses the publicJSONTypeConverter.UnhandledsentinelAny | None | _JSONTypeConverterUnhandledwithAnyand remove the importRoot cause
The Dockerfile installs dependencies without a lockfile (
uv pip install --system -e .), so it resolved temporalio 1.25.0 at build time. 1.25.0 removed_JSONTypeConverterUnhandled, causing anImportErrorat pod startup and/readyzreturning 503 indefinitely.Verified
Built the FIPS production image locally with temporalio 1.25.0 installed — imports succeed and
DateTimeJSONTypeConverterloads correctly.Test plan
/readyzreturns 200 on dev cluster after next nightly deployGreptile Summary
This PR removes references to
_JSONTypeConverterUnhandled, a private temporalio symbol that was removed in v1.25.0, replacing the return type annotationAny | None | _JSONTypeConverterUnhandledwithAnyin two files. The method bodies already use the publicJSONTypeConverter.Unhandledsentinel correctly, so only the annotations needed updating.Confidence Score: 5/5
Safe to merge — minimal, targeted fix that removes a broken private import without changing runtime behavior.
The change only removes a private symbol from type annotations. The method body already used the correct public API (
JSONTypeConverter.Unhandled), so no runtime behavior changes. Both files are updated consistently, and the simplifiedAnyreturn type is accurate. No new logic, no side effects, no security implications.No files require special attention.
Vulnerabilities
No security concerns identified.
Important Files Changed
_JSONTypeConverterUnhandledimport and simplifiesto_typed_valuereturn type annotation toAny; runtime behavior unchanged.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A["DateTimeJSONTypeConverter.to_typed_value(hint, value)"] --> B{hint == datetime.datetime?} B -- Yes --> C["datetime.fromisoformat(value)\nreturn datetime object"] B -- No --> D["return JSONTypeConverter.Unhandled\n(public sentinel)"] D --> E["Temporal SDK detects Unhandled\nand falls back to default converter"] C --> F["Caller receives typed datetime"]Reviews (2): Last reviewed commit: "fix(temporal): remove private _JSONTypeC..." | Re-trigger Greptile