← Back to DAGDA | Support | Source: https://github.com/cdent/gabbi/issues/277
Skip to content

Python 3.7.6 urllib.parse changes break gabbi tests #277

Closed

Description

@cdent

Python 3.7.6 was released with a change to how urllib.parse will deal with "localhost:80".

3.7.5:

>>> from urllib import parse
>>> parse.urlparse("foobar.com:999")
ParseResult(scheme='', netloc='', path='foobar.com:999', params='', query='', fragment='')

3.7.6

>>> from urllib import parse
>>> parse.urlparse("foobar.com:999")
ParseResult(scheme='foobar.com', netloc='', path='999', params='', query='', fragment='')

See this bug: https://bugs.python.org/issue27657 and a related pull request: python/cpython#16839

This breaks gabbi.utils:host_info_from_target. It also apparently break a whole ton of other software out there in the world. This a) seems like the wrong fix, b) if it is indeed correct, is bad for a minor release.

Since gabbi only talks http, it can probably be fixed by branch on whether the target starts with http but some discussion is probably worth having before going down that route.

Activity

  1. cdent commented on Dec 16, 2020

    @cdent
    OwnerAuthor

    This reactivated for python 3.9 so will need a real fix.

  2. added a commit that references this issue on Dec 19, 2020
    5d62e1c
  3. added a commit that references this issue on Dec 19, 2020
    3d9cf77
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions