1d7e589968a236873602c322aaa0f42c27bd9210,contrib/go/src/python/pants/contrib/go/subsystems/archive_retriever.py,ArchiveRetriever,_download,#ArchiveRetriever#Any#,69

Before Change


    logger.info("Downloading {}...".format(url))
    with closing(self._session().get(url, stream=True)) as res:
      if res.status_code != requests.codes.ok:
        raise FetchError("Failed to download {} ({} error)".format(url, res.status_code))
      with temporary_file() as archive_fp:
        // NB: Archives might be very large so we play it safe and buffer them to disk instead of
        // memory before unpacking.
        for chunk in res.iter_content(chunk_size=self.get_options().buffer_size):

After Change


    logger.info(f"Downloading {url}...")
    with closing(self._session().get(url, stream=True)) as res:
      if res.status_code != requests.codes.ok:
        raise FetchError(f"Failed to download {url} ({res.status_code} error)")
      with temporary_file() as archive_fp:
        // NB: Archives might be very large so we play it safe and buffer them to disk instead of
        // memory before unpacking.
        for chunk in res.iter_content(chunk_size=self.get_options().buffer_size):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: pantsbuild/pants
Commit Name: 1d7e589968a236873602c322aaa0f42c27bd9210
Time: 2019-11-24
Author: asher@asherfoa.com
File Name: contrib/go/src/python/pants/contrib/go/subsystems/archive_retriever.py
Class Name: ArchiveRetriever
Method Name: _download


Project Name: pantsbuild/pants
Commit Name: 1d7e589968a236873602c322aaa0f42c27bd9210
Time: 2019-11-24
Author: asher@asherfoa.com
File Name: contrib/go/src/python/pants/contrib/go/subsystems/fetcher.py
Class Name: CloningFetcher
Method Name: fetch


Project Name: pantsbuild/pants
Commit Name: 1d7e589968a236873602c322aaa0f42c27bd9210
Time: 2019-11-24
Author: asher@asherfoa.com
File Name: contrib/go/src/python/pants/contrib/go/subsystems/fetcher.py
Class Name: CloningFetcher
Method Name: root