GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-48: Report slow downloads by Punisheroot · Pull Request #391 · python/pymanager

Conversation

@Punisheroot

@Punisheroot Punisheroot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • 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.

Validation

  • tests/test_urlutils.py -k slow_download_warning: 5 passed
  • focused urllib paths and slow-download coverage: 6 passed
  • PowerShell download paths: 2 passed
  • tests/test_install_command.py -k download_package_yes_aborts_background_download: 1 passed
  • git diff --check

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Punisheroot
pythongh-48: Report slow downloads
38fff0e
@Punisheroot
Punisheroot marked this pull request as ready for review August 1, 2026 15:25
Jonathan251219
Jonathan251219 approved these changes Oct 14, 2026
View reviewed changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@Jonathan251219 Jonathan251219 Jonathan251219 approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Detect slow download

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@Punisheroot @Jonathan251219
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.