From 3e431462cf1facdf123fdfa517c3c66d88a8e7e7 Mon Sep 17 00:00:00 2001 From: Arun Babu Neelicattu Date: Wed, 28 Feb 2024 20:22:36 +0100 Subject: [PATCH] repo/http: add debug log for lazy wheel error (cherry picked from commit 120f2890579f66cd57180ed81b7dd04e1ded3946) --- src/poetry/repositories/http_repository.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/poetry/repositories/http_repository.py b/src/poetry/repositories/http_repository.py index cd7801fdd9d..db7a365405c 100644 --- a/src/poetry/repositories/http_repository.py +++ b/src/poetry/repositories/http_repository.py @@ -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: