File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
temporalio/worker/workflow_sandbox Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -950,13 +950,20 @@ def _is_restrictable(v: Any) -> bool:
950950 )
951951
952952
953+ def _unwrap_restricted_proxy (v : Any ) -> Any :
954+ # TODO: __wrapped__ should do this but it's broken.
955+ if isinstance (v , _RestrictedProxy ):
956+ return object .__getattribute__ (v , "__temporal_state" ).obj
957+ return v
958+
959+
953960class _RestrictedProxy :
954961 @classmethod
955962 def __get_pydantic_core_schema__ (
956963 cls , source_type : Any , handler : GetCoreSchemaHandler
957964 ) -> CoreSchema :
958965 return core_schema .no_info_after_validator_function (
959- cls , handler (object . __getattribute__ (source_type , "__temporal_state" ). obj )
966+ cls , handler (_unwrap_restricted_proxy (source_type ) )
960967 )
961968
962969 def __init__ (self , * args , ** kwargs ) -> None :
You can’t perform that action at this time.
0 commit comments