report silent downloads once they have taken more than five seconds
keep existing progress callbacks unchanged and avoid a duplicate warning when a progress display is already visible
let the BITS, urllib, and PowerShell fallback paths recheck silent downloads while they are waiting
Rationale
PyManager intentionally does not announce every download because operations such as traversing a chain of index.json files would become noisy. However, a download that remains silent for several seconds can look as though the command has stalled.
Each network request now records a monotonic start time. Its shared progress handler emits one warning after five seconds only when the caller has not supplied a progress callback and the operation is not already complete. The request's existing string conversion sanitizes credentials before the URL is logged.
The check remains progress-driven, matching the existing delayed warnings in rmtree and unlink, and does not create a timer thread for every short-lived index request. Silent BITS jobs are checked during their existing polling loop, urllib requests recheck after connecting, and the PowerShell fallback polls once per second only when there is no visible progress callback. The existing ten-second PowerShell startup timeout is preserved.
The full native suite was not available locally because the installed interpreter does not match _native_test.cp314; the repository CI builds that module with its pinned Python 3.14.6 runtime.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rationale
PyManager intentionally does not announce every download because operations such as traversing a chain of index.json files would become noisy. However, a download that remains silent for several seconds can look as though the command has stalled.
Each network request now records a monotonic start time. Its shared progress handler emits one warning after five seconds only when the caller has not supplied a progress callback and the operation is not already complete. The request's existing string conversion sanitizes credentials before the URL is logged.
The check remains progress-driven, matching the existing delayed warnings in rmtree and unlink, and does not create a timer thread for every short-lived index request. Silent BITS jobs are checked during their existing polling loop, urllib requests recheck after connecting, and the PowerShell fallback polls once per second only when there is no visible progress callback. The existing ten-second PowerShell startup timeout is preserved.
Validation
The full native suite was not available locally because the installed interpreter does not match _native_test.cp314; the repository CI builds that module with its pinned Python 3.14.6 runtime.
Fixes #48