python / python/cpython

urllib2 works slowly with proxy on windows

Open
#73,719 23 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.10 3.11 3.12 OS-windows performance stdlib
Dominant language
Python
Stars
77.2k
Forks
36k
PR merge metrics
PR metrics pending

Description

BPO 29533
Nosy @pfmoore, @orsenthil, @tjguk, @schlamar, @zware, @eryksun, @zooba, @juliadolgova
PRs
  • python/cpython#247
  • Files
  • checklib.py: just make a call to urllib2.urlopen("https://docs.python.org")
  • socket.py: not a patched lib. Has debug lines near 141 line. Use it with checklib.py.
  • test.py: compares performance of gethostbyaddr with gethostbyname_ex
  • log.txt: result of test.py on my computer (Windows 8, 64 bit)
  • socket.patch: not actual (wrong) patch
  • compare_ie_urllib.txt
  • request.patch
  • checklib-py3.py: make a request to http://python.org/ via proxy using urllib
  • compare_urllib_progs.png
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2017-02-11.08:43:27.110>
    labels = ['3.8', '3.9', '3.10', 'performance', 'library', 'OS-windows']
    title = 'urllib2 works slowly with proxy on windows'
    updated_at = <Date 2021-03-05.13:23:25.513>
    user = 'https://github.com/juliadolgova'
    

    bugs.python.org fields:

    activity = <Date 2021-03-05.13:23:25.513>
    actor = 'eryksun'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)', 'Windows']
    creation = <Date 2017-02-11.08:43:27.110>
    creator = 'juliadolgova'
    dependencies = []
    files = ['46628', '46629', '46630', '46631', '46632', '46649', '46661', '46766', '46813']
    hgrepos = []
    issue_num = 29533
    keywords = ['patch']
    message_count = 23.0
    messages = ['287597', '287905', '287944', '287945', '287976', '288071', '288118', '288139', '288172', '288179', '288413', '290482', '290807', '290833', '290841', '290884', '291222', '291223', '291823', '291884', '291953', '291964', '291972']
    nosy_count = 8.0
    nosy_names = ['paul.moore', 'orsenthil', 'tim.golden', 'schlamar', 'zach.ware', 'eryksun', 'steve.dower', 'juliadolgova']
    pr_nums = ['247']
    priority = 'normal'
    resolution = None
    stage = None
    status = 'open'
    superseder = None
    type = 'performance'
    url = 'https://bugs.python.org/issue29533'
    versions = ['Python 3.8', 'Python 3.9', 'Python 3.10']
    

    Contributor guide

    Open the contributing guide

    First steps

    1. Read the whole issue, then the project's contributing guide.
    2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
    3. Fork the repository and make your change on a branch.
    4. Open a pull request that references the issue number.

    Research direction

    Start by reproducing the Windows proxy request with checklib-py3.py and compare its timings with test.py and the attached performance results. Read request.patch and the socket.py notes, then review PR #247 for prior work. Done should include an agreed fix for the reported urllib proxy slowdown and performance validation, but the issue does not define a precise acceptance test.

    Written by the indexing model from the issue text.

    Assessment

    Tech stack
    python
    Domain
    networking
    Issue type
    Bug
    Difficulty
    4/5
    Estimated time
    3-5 days
    Activity status
    Stale
    Clarity
    Needs clarification
    Newbie friendliness
    25/100

    Get new issues in your inbox

    A short digest of beginner-friendly GitHub issues.