ap-- commented on code in PR #37524:
URL: https://github.com/apache/airflow/pull/37524#discussion_r1495056345


##########
airflow/providers/common/io/xcom/backend.py:
##########
@@ -152,7 +152,7 @@ def deserialize_value(
 
         try:
             p = ObjectStoragePath(path) / XComObjectStoreBackend._get_key(data)
-            return json.load(p.open("rb", compression="infer"), 
cls=XComDecoder)
+            return json.load(p.fs.open(p.path, mode="rb", 
compression="infer"), cls=XComDecoder)

Review Comment:
   This is subtle.
   `UPath.open()` in `v0.2.0+` right now has the identical method signature to 
`pathlib.Path.open()`. Arguably this could be considered a regression.
   
   `UPath.fs` gives direct access to the fsspec filesystem, without this 
limitation.
   
   To address it here, I added a `v0.1.4` style `ObjectStoragePath.open` 
method, that passes kwargs through to AbstractFileSystem.open. This restores 
the tests, and keeps behavior for ObjectStoragePath consistent



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to