wilmerdooley commented on code in PR #38751:
URL: https://github.com/apache/beam/pull/38751#discussion_r3429568628


##########
sdks/python/apache_beam/io/gcp/gcsfilesystem.py:
##########
@@ -34,22 +34,65 @@
 from apache_beam.io.filesystem import CompressionTypes
 from apache_beam.io.filesystem import FileMetadata
 from apache_beam.io.filesystem import FileSystem
-from apache_beam.io.gcp import gcsio
+
+try:
+  from apache_beam.io.gcp import gcsio
+except ImportError:

Review Comment:
   Thanks @Abacn, that makes sense. Following the s3io pattern with a 
module-level installed flag in gcsio, so the import succeeds without the gcp 
extra and the dependency error is deferred to object creation, is cleaner than 
the lazy-import plumbing I added at the gcsfilesystem layer, and it keeps the 
two filesystems consistent at the right level. I am happy to rework this PR to 
move the fix into gcsio along those lines, or to close it if you would prefer 
to drive that change yourself. How would you like to proceed?
   



-- 
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