Skip to content

Commit 6ee47aa

Browse files
authored
Merge pull request #551 from martindurant/gcs_dep
Logging for HTTP file and update gcsfs test env
2 parents 68aef2d + c701eaa commit 6ee47aa

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

fsspec/implementations/http.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ async def async_fetch_all(self):
450450
This is only called when position is still at zero,
451451
and read() is called without a byte-count.
452452
"""
453+
logger.debug(f"Fetch all for {self}")
453454
if not isinstance(self.cache, AllBytes):
454455
r = await self.session.get(self.url, **self.kwargs)
455456
async with r:
@@ -470,6 +471,7 @@ async def async_fetch_range(self, start, end):
470471
and then stream the output - if the data size is bigger than we
471472
requested, an exception is raised.
472473
"""
474+
logger.debug(f"Fetch range for {self}: {start}-{end}")
473475
kwargs = self.kwargs.copy()
474476
headers = kwargs.pop("headers", {}).copy()
475477
headers["Range"] = "bytes=%i-%i" % (start, end - 1)
@@ -596,6 +598,7 @@ async def _file_size(url, session=None, size_policy="head", **kwargs):
596598
Default operation is to explicitly allow redirects and use encoding
597599
'identity' (no compression) to get the true size of the target.
598600
"""
601+
logger.debug("Retrieve file size for %s" % url)
599602
kwargs = kwargs.copy()
600603
ar = kwargs.pop("allow_redirects", True)
601604
head = kwargs.get("headers", {}).copy()

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ deps=
8787
{[core]deps}
8888
vcrpy
8989
google-auth-oauthlib
90+
crcmod
9091
changedir=.tox/gcsfs/tmp
9192
whitelist_externals=
9293
rm

0 commit comments

Comments
 (0)