This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients orsenthil, vstinner, xtreak
Date 2019-07-02.12:53:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1562071994.98.0.665629614194.issue37475@roundup.psfhosted.org>
In-reply-to
Content
Another weirdness of test_urllib.py: it redefines urlopen() and actually tests its test function, rather than testing the urllib.request module.

https://github.com/python/cpython/pull/14529#issuecomment-507646868

"def urlopen(url, data=None, proxies=None):" in test_urllib.py is as old as the urllib module itself!

commit 1afc1696167547a5fa101c53e5a3ab4717f8852c
Author: Jeremy Hylton <jeremy@alum.mit.edu>
Date:   Wed Jun 18 20:49:58 2008 +0000

    Make a new urllib package .
    
    It consists of code from urllib, urllib2, urlparse, and robotparser.
    The old modules have all been removed.  The new package has five
    submodules: urllib.parse, urllib.request, urllib.response,
    urllib.error, and urllib.robotparser.  The urllib.request.urlopen()
    function uses the url opener from urllib2.
    
    Note that the unittests have not been renamed for the
    beta, but they will be renamed in the future.
    
    Joint work with Senthil Kumaran.

At least, the test function should have a different name, no?
History
Date User Action Args
2019-07-02 12:53:15vstinnersetrecipients: + vstinner, orsenthil, xtreak
2019-07-02 12:53:14vstinnersetmessageid: <1562071994.98.0.665629614194.issue37475@roundup.psfhosted.org>
2019-07-02 12:53:14vstinnerlinkissue37475 messages
2019-07-02 12:53:14vstinnercreate