3
Z'ícÉ7 ã @ s d dl mZ d dlZd dlmZ ddlmZ ddlmZ ddd d
ddd
gZ dKZ
ejdZejdZ
ejdejejB ZdZdZdjeedZeedZddddddddd g Zd!Zd"d#jd$d% eD d& Zd'e d( Zd)e d" e d* Zd+Zejd,Zejd-e d. Zejd-e d. Zejd-e d. Z ejd-eddL
d. Z!ejd/e d0 Z"d1eeef Z#eje#ejejB Z$e%d2Z&e%d3Z'e&e'B d4hB Z(e(d5d6hB Z)e)d7hB Z*Z+G d8d9 d9ed9e Z,d:d; Z-dMd=d>Z.d?d@ Z/dAdB Z0dCdD Z1dEdF Z2dGdH Z3dIdJ Z4dS )Né )Úabsolute_importN)Ú
namedtupleé )ÚLocationParseError)ÚsixÚschemeÚauthÚhostÚportÚpathÚqueryÚfragmentÚhttpÚhttpsz%[a-fA-F0-9]{2}z^(?:[a-zA-Z][a-zA-Z0-9+-]*:|/)zS^(?:([a-zA-Z][a-zA-Z0-9+.-]*):)?(?://([^\\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?$z(?:[0-9]{1,3}\.){3}[0-9]{1,3}z[0-9A-Fa-f]{1,4}z(?:{hex}:{hex}|{ipv4}))ÚhexZipv4)r Zls32z(?:%(hex)s:){6}%(ls32)sz::(?:%(hex)s:){5}%(ls32)sz%(?:%(hex)s)?::(?:%(hex)s:){4}%(ls32)sz2(?:(?:%(hex)s:)?%(hex)s)?::(?:%(hex)s:){3}%(ls32)sz6(?:(?:%(hex)s:){0,2}%(hex)s)?::(?:%(hex)s:){2}%(ls32)sz/(?:(?:%(hex)s:){0,3}%(hex)s)?::%(hex)s:%(ls32)sz'(?:(?:%(hex)s:){0,4}%(hex)s)?::%(ls32)sz&(?:(?:%(hex)s:){0,5}%(hex)s)?::%(hex)sz(?:(?:%(hex)s:){0,6}%(hex)s)?::zDABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._!\-~z(?:ú|c C s g | ]}|t qS © )Ú_subs)Ú.0Úxr r ú3/tmp/pip-build-gk9425m9/urllib3/urllib3/util/url.pyú
<listcomp>6 s r ú)z
(?:%25|%)(?:[z]|%[a-fA-F0-9]{2})+z\[z)?\]z!(?:[^\[\]%:/?#]|%[a-fA-F0-9]{2})*z!^(/[^?#]*)(?:\?([^#]*))?(?:#.*)?$ú^ú$ú(z)\]$z)^(%s|%s|%s)(?::0*?(|0|[1-9][0-9]{0,4}))?$zBABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._-~z!$&'()*+,;=ú:ú@ú/ú?c s^ e Zd ZdZf Zd fdd Zedd Zedd Zed d
Z edd Z
d
d Z ZS )ÚUrlzÍ
Data structure 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 sF |r|j d rd| }|d k r(|j }tt| j| |||||||S )Nr )Ú
startswithÚlowerÚsuperr Ú__new__)Úclsr r r r