3 ���] � @ s\ d dl Z d dlZyd dlmZmZ W n$ ek rH d dlmZmZ Y nX ejd dkZejdd� dkZ er�e Z d dlmZ d dl mZ d dlmZmZmZmZmZ d d lmZ efZefZe jd �Zn~d dlmZ d dlmZ d dl mZmZmZmZ d d l!mZ d d l"mZ e#Zee$fZe jd�Ze �r<d dl%mZ nd dl&mZ dd� Zdd� Z'dS )� N)�MutableMapping�Sequence� � � )� lru_cache)�StringIO)�unquote�urljoin� urlunsplit�SplitResult�urlsplit)�urlopen�items)�izip)r r r r )r � iteritemsc C s: t | �\}}}}}d|kr*|jdd�\}}t|||||�S )N�#� )� _urlsplit�splitr )�url�schemeZnetloc�pathZqueryZfragment� r �/usr/lib/python3.6/compat.pyr * s r c C s>