Skip to content

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

Closed

Description

@ned-deily
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']

    Activity

    1. ned-deily commented on Mar 15, 2014

      @ned-deily
      MemberAuthor

      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/
    2. added
      tests
      on Mar 15, 2014
    3. python-dev commented on Mar 15, 2014

      python-devmannequin
      Mannequin

      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

    4. ned-deily commented on Mar 15, 2014

      @ned-deily
      MemberAuthor

      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.

    5. python-dev commented on Mar 17, 2014

      python-devmannequin
      Mannequin

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

    6. ned-deily commented on Mar 17, 2014

      @ned-deily
      MemberAuthor

      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.

    7. self-assigned this
      on Mar 17, 2014
    8. orsenthil commented on Mar 20, 2014

      @orsenthil
      Member

      The suggested patch(s) looks good to me.

    9. python-dev commented on Mar 27, 2014

      python-devmannequin
      Mannequin

      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

    10. python-dev commented on Mar 27, 2014

      python-devmannequin
      Mannequin

      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

    11. ned-deily commented on Mar 27, 2014

      @ned-deily
      MemberAuthor

      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.

    12. ned-deily commented on Jun 23, 2014

      @ned-deily
      MemberAuthor

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

    13. python-dev commented on Sep 30, 2014

      python-devmannequin
      Mannequin

      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

    14. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    tests

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions