ó
~XEXc           @@  s=  d  Z  d d l m Z d d l Z d „  Z e d ƒ e d ƒ e d ƒ e d ƒ e d	 ƒ e d
 ƒ e d ƒ e d ƒ e d ƒ e d ƒ e d ƒ e d ƒ e d ƒ e d ƒ e d ƒ e d ƒ e d ƒ e d ƒ e d ƒ e d ƒ e d ƒ e d ƒ e d ƒ e d ƒ e d ƒ e d ƒ e d ƒ d S(    s:  
Debian and other distributions "unbundle" requests' vendored dependencies, and
rewrite all imports to use the global versions of ``urllib3`` and ``chardet``.
The problem with this is that not only requests itself imports those
dependencies, but third-party code outside of the distros' control too.

In reaction to these problems, the distro maintainers replaced
``requests.packages`` with a magical "stub module" that imports the correct
modules. The implementations were varying in quality and all had severe
problems. For example, a symlink (or hardlink) that links the correct modules
into place introduces problems regarding object identity, since you now have
two modules in `sys.modules` with the same API, but different identities::

    requests.packages.urllib3 is not urllib3

With version ``2.5.2``, requests started to maintain its own stub, so that
distro-specific breakage would be reduced to a minimum, even though the whole
issue is not requests' fault in the first place. See
https://github.com/kennethreitz/requests/pull/2375 for the corresponding pull
request.
i    (   t   absolute_importNc         C@  sÈ   d j  t |  ƒ } y  t | t ƒ  t ƒ  d d ƒWn t k
 rÃ y  t |  t ƒ  t ƒ  d d ƒWn t k
 ru qÄ Xt j |  t j | <| j d d ƒ \ } } t	 t j | | t j |  ƒ n Xd  S(   Ns   {0}.{1}t   leveli    t   .i   (
   t   formatt   __name__t
   __import__t   globalst   localst   ImportErrort   syst   modulest   rsplitt   setattr(   t
   modulenamet   vendored_namet   baset   head(    (    s>   /usr/lib/python2.7/dist-packages/requests/packages/__init__.pyt   vendored   s      	t   chardett   urllib3s   urllib3._collectionss   urllib3.connections   urllib3.connectionpools   urllib3.contribs   urllib3.contrib.ntlmpools   urllib3.contrib.pyopenssls   urllib3.exceptionss   urllib3.fieldss   urllib3.fileposts   urllib3.packagess   urllib3.packages.ordered_dicts   urllib3.packages.sixs#   urllib3.packages.ssl_match_hostnames3   urllib3.packages.ssl_match_hostname._implementations   urllib3.poolmanagers   urllib3.requests   urllib3.responses   urllib3.utils   urllib3.util.connections   urllib3.util.requests   urllib3.util.responses   urllib3.util.retrys   urllib3.util.ssl_s   urllib3.util.timeouts   urllib3.util.url(   t   __doc__t
   __future__R    R	   R   (    (    (    s>   /usr/lib/python2.7/dist-packages/requests/packages/__init__.pyt   <module>   s<   	

























