Skip to content

urllib.request.urlopen hangs for multiple minutes with timeout=30 and works with timeout=1 #125049

@saschanaz

Description

@saschanaz

Bug report

Bug description:

import urllib.request
urllib.request.urlopen(urllib.request.Request("https://pypi.org/pypi/MozPhab/json"), timeout=30)

Somehow this hangs, and Control+C doesn't stop it. The same URL loads instantly on Firefox and Node.js. Any help to investigate this further will be appreciated. (Could be related to #95838, except I don't have any VPN on this machine.)

Coming from https://bugzilla.mozilla.org/show_bug.cgi?id=1919884.

CPython versions tested on:

3.12

Operating systems tested on:

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions