Skip to content

Consider using the stdlib to parse and build instead #1

@pombredanne

Description

@pombredanne

The current code is working but rather contrived.... We can do better!
For instance with this snippet:

>>> try:
...     from urlparse import urlparse
... except ImportError:
...     # Python 3
...     from urllib.parse import urlparse
... 
>>> urlparse('GO:google.golang.org/genproto@abcdedf?arch=i386#/googleapis/api/annotations/', allow_fragments=True)
ParseResult(scheme='go', netloc='', path='google.golang.org/genproto@abcdedf', params='', query='arch=i386', fragment='/googleapis/api/annotations/')
>>> urlparse('npm:%40angular/animation@12.3.1')
ParseResult(scheme='npm', netloc='', path='%40angular/animation@12.3.1', params='', query='', fragment='')

@ashcrow ping :)

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