Skip to content

PyPI metadata requests have no socket timeout #3593

Closed

Description

@gaborbernat

When a PyPI metadata request stops responding, seed wheel downloads and periodic updates can wait indefinitely on socket I/O.

Affected code

The PyPI JSON request omits the timeout. The seed index client already specifies a 15-second socket timeout. Metadata request Index request

Reproduction

On ea7688a0, stub urllib.request.urlopen at the periodic update module boundary and call release_date_for_wheel_path(Path("pip-20.1.whl")) with an empty metadata cache. The captured arguments contain context=None and omit timeout. The request should specify a finite socket timeout so the caller can handle a stalled connection.

Impact

Reproduction is moderate and exposure is niche. An update or download must reach the metadata lookup while the network is unresponsive.

Credits

Report ANT-2026-0TU90V3W.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions