From e0dab39132b28fd37b22353cfa98fe632ca3e7d3 Mon Sep 17 00:00:00 2001 From: Danny McClanahan <1305167+cosmicexplorer@users.noreply.github.com> Date: Mon, 19 Aug 2024 11:57:41 -0400 Subject: [PATCH] Queue is apparently not subscriptable in py3.8 --- src/pip/_internal/network/download.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pip/_internal/network/download.py b/src/pip/_internal/network/download.py index 0582fef3b88..780063b67e5 100644 --- a/src/pip/_internal/network/download.py +++ b/src/pip/_internal/network/download.py @@ -159,7 +159,7 @@ def __call__(self, link: Link, location: str) -> Tuple[str, str]: def _copy_chunks( - output_queue: Queue[Union[Tuple[Link, Path, Optional[str]], BaseException]], + output_queue: "Queue[Union[Tuple[Link, Path, Optional[str]], BaseException]]", event: Event, semaphore: Semaphore, session: PipSession, @@ -222,7 +222,7 @@ def __call__( # Set up state to track thread progress, including inner exceptions. total_downloads: int = len(links) completed_downloads: int = 0 - q: Queue[Union[Tuple[Link, Path, Optional[str]], BaseException]] = Queue() + q: "Queue[Union[Tuple[Link, Path, Optional[str]], BaseException]]" = Queue() event = Event() # Limit downloads to 10 at a time so we can reuse our connection pool. semaphore = Semaphore(value=10)