Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_geturl of test_urllibnet fails with 'https://www.python.org/' != 'http://www.python.org/' #65138

Closed
ned-deily opened this issue Mar 15, 2014 · 11 comments
Assignees
Labels
tests Tests in the Lib/test dir

Comments

@ned-deily
Copy link
Member

BPO 20939
Nosy @birkenfeld, @orsenthil, @benjaminp, @ned-deily
Files
  • issue20939_all_27.patch: 2.7
  • issue20939_all_31.patch: 3.1
  • issue20939_all_32.patch: 3.2
  • issue20939_all_33.patch: 3.3
  • issue20939_all_3x.patch: 3.4 and default
  • 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 = 'https://github.com/ned-deily'
    closed_at = <Date 2014-06-23.00:55:16.948>
    created_at = <Date 2014-03-15.19:41:17.137>
    labels = ['tests']
    title = "test_geturl of test_urllibnet fails with 'https://www.python.org/' != 'http://www.python.org/'"
    updated_at = <Date 2014-09-30.14:22:56.499>
    user = 'https://github.com/ned-deily'

    bugs.python.org fields:

    activity = <Date 2014-09-30.14:22:56.499>
    actor = 'python-dev'
    assignee = 'ned.deily'
    closed = True
    closed_date = <Date 2014-06-23.00:55:16.948>
    closer = 'ned.deily'
    components = ['Tests']
    creation = <Date 2014-03-15.19:41:17.137>
    creator = 'ned.deily'
    dependencies = []
    files = ['34454', '34455', '34456', '34457', '34458']
    hgrepos = []
    issue_num = 20939
    keywords = ['patch']
    message_count = 11.0
    messages = ['213677', '213679', '213680', '213795', '213846', '214177', '214937', '214938', '214946', '221331', '227930']
    nosy_count = 8.0
    nosy_names = ['georg.brandl', 'orsenthil', 'benjamin.peterson', 'ned.deily', 'Arfrever', 'python-dev', 'ddvento@ucar.edu', 'GreenKey']
    pr_nums = []
    priority = 'high'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue20939'
    versions = ['Python 2.7', 'Python 3.4', 'Python 3.5']

    @ned-deily
    Copy link
    Member Author

    It looks like another change to the new python.org website is breaking another test:

    ======================================================================
    FAIL: test_geturl (test.test_urllibnet.urlopenNetworkTests)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/test/test_urllibnet.py", line 86, in test_geturl
        self.assertEqual(gotten_url, URL)
    AssertionError: 'https://www.python.org/' != 'http://www.python.org/'
    - https://www.python.org/
    ?     -
    + http://www.python.org/

    @ned-deily ned-deily added the tests Tests in the Lib/test dir label Mar 15, 2014
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Mar 15, 2014

    New changeset 9b02f23bc129 by Ned Deily in branch '2.7':
    Issue bpo-20939: Fix test_geturl failure in test_urllibnet due to
    http://hg.python.org/cpython/rev/9b02f23bc129

    New changeset 030efedd70ca by Ned Deily in branch '3.3':
    Issue bpo-20939: Fix test_geturl failure in test_urllibnet due to
    http://hg.python.org/cpython/rev/030efedd70ca

    New changeset 9358a41b245b by Ned Deily in branch 'default':
    Issue bpo-20939: merge from 3.3
    http://hg.python.org/cpython/rev/9358a41b245b

    @ned-deily
    Copy link
    Member Author

    The above changes temporarily fix the problem as long as the build include ssl support. We should probably change all of the tests to use some other domain that does not redirect to https: www.example.com has been suggested.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Mar 17, 2014

    New changeset 7f4fba171a40 by Ned Deily in branch '3.4':
    Issue bpo-20939: merge from 3.3
    http://hg.python.org/cpython/rev/7f4fba171a40

    @ned-deily
    Copy link
    Member Author

    Here are patches to change network use of www.python.org to www.example.com so that the tests should pass even if the interpreter is built without SSL support. It turns out that there are references to www.python.org in unexpected places (like test_site) so, while I ran all tests and tested the changes both with and without SSL availability, it wouldn't surprise me if I missed a few spots. Also, as requested by Benjamin, I produced patches for and tested on 3.1 and 3.2. I'm +0 on applying the changes there as there are other, unrelated test failures with those releases on some platforms, but with the patches no one can blame the new python.org website for them.

    @ned-deily ned-deily self-assigned this Mar 17, 2014
    @orsenthil
    Copy link
    Member

    The suggested patch(s) looks good to me.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Mar 27, 2014

    New changeset 426a7046cdb0 by Ned Deily in branch '2.7':
    Issue bpo-20939: Use www.example.com instead of www.python.org to avoid test
    http://hg.python.org/cpython/rev/426a7046cdb0

    New changeset 31e42208eb99 by Ned Deily in branch '3.4':
    Issue bpo-20939: Backout test_urllib2.test_issue16464 disables:
    http://hg.python.org/cpython/rev/31e42208eb99

    New changeset 6134684ba222 by Ned Deily in branch '3.4':
    Issue bpo-20939: Use www.example.com instead of www.python.org to avoid test
    http://hg.python.org/cpython/rev/6134684ba222

    New changeset 67dcb2d19dc4 by Ned Deily in branch 'default':
    Issue bpo-20939: merge from 3.4
    http://hg.python.org/cpython/rev/67dcb2d19dc4

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Mar 27, 2014

    New changeset b533cc11d114 by Ned Deily in branch '3.4':
    Issue bpo-20939: remove stray character from comment
    http://hg.python.org/cpython/rev/b533cc11d114

    New changeset ff27cb871b16 by Ned Deily in branch 'default':
    Issue bpo-20939: merge from 3.4
    http://hg.python.org/cpython/rev/ff27cb871b16

    @ned-deily
    Copy link
    Member Author

    I've pushed the changes to 2.7, 3.4, and default. That has exposed a new intermittent failure of test_fileno in test.test_urllibnet (see bpo-21069). I'll leave this issue open until that is resolved. And I'll leave it up to the respective release managers to decide whether they want to backport to their security-fix-only branches.

    @ned-deily
    Copy link
    Member Author

    Since the original problems reported here have been fixed in current branches, I'm closing this issue.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Sep 30, 2014

    New changeset 97c329849ef3 by Ned Deily in branch '3.2':
    Issue bpo-20939: Use www.example.com instead of www.python.org to avoid test
    https://hg.python.org/cpython/rev/97c329849ef3

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    tests Tests in the Lib/test dir
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants