Viewing File: /usr/lib/python3.6/site-packages/pip/_vendor/urllib3/util/__pycache__/url.cpython-36.opt-1.pyc
3
aj @ s d dl mZ d dlmZ d dlZddlmZ dddd d
ddgZdZej dZ
ddlmZ G dd dedeZ
dd Zdd Zdd ZdS ) )absolute_import)
namedtupleN )LocationParseErrorschemeauthhostportpathqueryfragmenthttphttpsz[ - ])quotec s^ e Zd ZdZf Zd fdd Zedd Zedd Zed d
Z edd Z
d
d Z ZS )Urlz
Datastructure for representing an HTTP URL. Used as a return value for
:func:`parse_url`. Both the scheme and host are normalized as they are
both case-insensitive according to RFC 3986.
Nc sV |r|j d rd| }|r$|j }|r8|tkr8|j }tt| j| |||||||S )N/)
startswithlowerNORMALIZABLE_SCHEMESsuperr __new__)clsr r r r r
r r ) __class__ /usr/lib/python3.6/url.pyr s zUrl.__new__c C s | j S )z@For backwards-compatibility with urlparse. We're nice like that.)r )selfr r r hostname$ s zUrl.hostnamec C s&