Repository: nteract/papermill (language: python)

Issue:
Need fix for recent GCFS changes
## Build Issue

<!-- A clear and concise description of what the bug is. -->

GCS dependencies moving forward need a patch for papermill to be able to use the new version of the library.

See: https://github.com/nteract/papermill/actions/runs/1069848310


Discussion / hints:

Fix patch:
diff --git a/papermill/iorw.py b/papermill/iorw.py
index cfda1d0f..494f1d59 100644
--- a/papermill/iorw.py
+++ b/papermill/iorw.py
@@ -70,8 +70,11 @@ def fallback_gs_is_retriable(e):
 
 
 try:
-    # Default to gcsfs library's retry logic
-    from gcsfs.utils import is_retriable as gs_is_retriable
+    try:
+        # Default to gcsfs library's retry logic
+        from gcsfs.retry import is_retriable as gs_is_retriable
+    except ImportError:
+        from gcsfs.utils import is_retriable as gs_is_retriable
 except ImportError:
     gs_is_retriable = fallback_gs_is_retriable
 


Test patch:
diff --git a/papermill/tests/test_gcs.py b/papermill/tests/test_gcs.py
index 1d9a9d58..bbee89c4 100644
--- a/papermill/tests/test_gcs.py
+++ b/papermill/tests/test_gcs.py
@@ -7,7 +7,10 @@
 
 try:
     try:
-        from gcsfs.utils import HttpError as GCSHttpError
+        try:
+            from gcsfs.retry import HttpError as GCSHttpError
+        except ImportError:
+            from gcsfs.utils import HttpError as GCSHttpError
     except ImportError:
         from gcsfs.utils import HtmlError as GCSHttpError
 except ImportError: