allenai / cached_path

A file utility for accessing both local and remote files through a unified interface.
https://cached-path.readthedocs.io/
Apache License 2.0
35 stars 11 forks source link

required version of google-cloud-storage needs bumping #106

Closed will-moore closed 2 years ago

will-moore commented 2 years ago

Checklist

Description

I already had google-cloud-storage Version: 1.31.0 installed when I installed cached_path, which satisfies the requirements google-cloud-storage>=1.0,<3.0 in https://github.com/allenai/cached_path/blob/main/requirements.txt

However, when I try to import cached_path I get the exception below because that version of google-cloud-storage is out of date: `No module named 'google.cloud.storage.retry'.

I don't know what version of google-cloud-storage added this, but if I do pip install -U google-cloud-storage the error goes away.

Python traceback:

``` File "/Users/wmoore/Desktop/ZARR/ome-zarr-py/ome_zarr/reader.py", line 7, in from cached_path import cached_path File "/Users/wmoore/opt/anaconda3/envs/omeroweb/lib/python3.9/site-packages/cached_path/__init__.py", line 13, in from ._cached_path import cached_path File "/Users/wmoore/opt/anaconda3/envs/omeroweb/lib/python3.9/site-packages/cached_path/_cached_path.py", line 15, in from .schemes import get_scheme_client, get_supported_schemes, hf_get_from_cache File "/Users/wmoore/opt/anaconda3/envs/omeroweb/lib/python3.9/site-packages/cached_path/schemes/__init__.py", line 3, in from cached_path.schemes.gs import GsClient File "/Users/wmoore/opt/anaconda3/envs/omeroweb/lib/python3.9/site-packages/cached_path/schemes/gs.py", line 11, in from google.cloud.storage.retry import DEFAULT_RETRY ModuleNotFoundError: No module named 'google.cloud.storage.retry' ```

Related issues or possible duplicates

Environment

OS: M1 Mac

Python version: 3.9.12

Output of pip freeze:

``` $ pip show google-cloud-storage Name: google-cloud-storage Version: 1.31.0 Summary: Google Cloud Storage API client library Home-page: https://github.com/googleapis/python-storage Author: Google LLC Author-email: googleapis-packages@google.com License: Apache 2.0 Location: /Users/wmoore/opt/anaconda3/envs/omeroweb/lib/python3.9/site-packages Requires: google-auth, google-cloud-core, google-resumable-media Required-by: cached-path ```

Steps to reproduce

Example source:

``` ```

epwalsh commented 2 years ago

Thanks for bringing this up @will-moore! I'll do some digging.

epwalsh commented 2 years ago

Looks like this module was first introduced in v1.32.0, so I'll make that the minimum version.

will-moore commented 2 years ago

Great, thanks!