RNHTTR commented on code in PR #53939:
URL: https://github.com/apache/airflow/pull/53939#discussion_r2243164304


##########
task-sdk/src/airflow/sdk/execution_time/comms.py:
##########
@@ -120,6 +122,11 @@ def _msgpack_enc_hook(obj: Any) -> Any:
         return str(obj)
     if isinstance(obj, BaseModel):
         return obj.model_dump(exclude_unset=True)
+    # convert subclasses of built-ins to the built-in type
+    for builtin in builtin_types:
+        if isinstance(obj, builtin):
+            # If the object is a subclass of a built-in type, return the 
object as that type
+            return builtin(obj)

Review Comment:
   wouldn't we just need to `return obj`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to