wilmerdooley commented on issue #37445:
URL: https://github.com/apache/beam/issues/37445#issuecomment-4583308463

   I have opened #38751 for this. It makes the gcsio import in gcsfilesystem.py 
lazy so GCSFileSystem is returned from FileSystems.get_filesystem() without the 
gcp extra installed, deferring the dependency error to usage time (matching 
S3FileSystem), which is the approach @hjtran suggested above.
   
   I built on the earlier attempts (#37488, #37674) and tried to fold in the 
review feedback from those:
   
   * A single lazy-import path through one helper, rather than re-importing 
gcsio inside methods (per @shunping's question on #37674).
   * A regression test that actually simulates the gcp extra being missing (it 
blocks the gcsio import in a subprocess), and confirms get_filesystem still 
returns GCSFileSystem while using it raises ImportError.
   * CHUNK_SIZE is exposed via a small class-property descriptor so 
GCSFileSystem.CHUNK_SIZE keeps working at the class level (as S3FileSystem 
does), not only on instances.
   
   @MansiSingh17, this issue is assigned to you but I did not see an open PR, 
so I went ahead. Please feel free to use this as a reference or take it 
forward, and I am happy to coordinate.


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