Skip to content

Commit

Permalink
repo/http: add debug log for lazy wheel error
Browse files Browse the repository at this point in the history
(cherry picked from commit 120f289)
  • Loading branch information
abn committed Feb 28, 2024
1 parent f2bfacb commit 3e43146
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/poetry/repositories/http_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,13 @@ def _get_info_from_wheel(self, link: Link) -> PackageInfo:
package_info = PackageInfo.from_metadata(
metadata_from_wheel_url(link.filename, link.url, self.session)
)
except LazyWheelUnsupportedError:
except LazyWheelUnsupportedError as e:
# Do not set to False if we already know that the domain supports
# range requests for some URLs!
self._log(
f"Disabling lazy wheel support for {netloc}: {e}",
level="debug",
)
raise_accepts_ranges = False
self._supports_range_requests.setdefault(netloc, False)
else:
Expand Down

0 comments on commit 3e43146

Please sign in to comment.