Ë
    Æ²…aª  ã            	       óä   — d Z eZg d¢Z	 ddlmZ ddlZddlm	Z	 dZ
dZdZd	Zd
ZdZdZdZdZdZdZdZdZdZ ee
e
eeeee¬«      Z eeeeeeee¬«      Zd„ Zd„ Zd„ Zd„ Zy# e$ r	 ddlmZ Y Œ^w xY w)z¡Launchpad-specific URIs and convenience lookup functions.

The code in this module lets users say "staging" when they mean
"https://api.staging.launchpad.net/".
)Úlookup_service_rootÚlookup_web_rootÚweb_root_for_service_rooté    )ÚurlparseN)ÚURIzhttps://api.launchpad.net/z$https://api.qastaging.launchpad.net/z"https://api.staging.launchpad.net/zhttps://api.launchpad.test/zhttps://api.dogfood.paddev.net/zhttp://api.launchpad.test:8085/zhttps://launchpad.net/z https://qastaging.launchpad.net/zhttps://staging.launchpad.net/zhttps://launchpad.test/zhttps://dogfood.paddev.net/zhttp://launchpad.test:8085/zhttps://api.edge.launchpad.net/zhttps://edge.launchpad.net/)Ú
productionÚedgeÚ	qastagingÚstagingÚdogfoodÚdevÚtest_devc                 óª   — | dk(  rt        j                  dt        «       | |v r||    S t        | «      \  }}}}}}|dk7  r|dk7  r| S t	        d| z  «      ‚)z3Dereference what might a URL or an alias for a URL.r	   zCLaunchpad edge server no longer exists. Using 'production' instead.Ú z:%s is not a valid URL or an alias for any Launchpad server)ÚwarningsÚwarnÚDeprecationWarningr   Ú
ValueError)ÚrootÚaliasesÚschemeÚnetlocÚpathÚ
parametersÚqueryÚfragments           ú3/usr/lib/python3/dist-packages/launchpadlib/uris.pyÚ_dereference_aliasr   O   st   € àˆv‚~Ü�‰ð.ô ô	
ð ˆw�Ø�t‰}Ðô ;CÀ4».Ñ7€VˆV�T˜: u¨hØ�‚|˜ "šØˆô ØGÈ$ÑNóð ó    c                 ó8   — | t         k(  rd} t        | t        «      S )zÌDereference an alias to a service root.

    A recognized server alias such as "staging" gets turned into the
    appropriate URI. A URI gets returned as is. Any other string raises a
    ValueError.
    r	   )ÚEDGE_SERVICE_ROOTr   Úservice_roots)Úservice_roots    r   r   r   g   s   € ð Ô(Ò(àˆÜ˜l¬MÓ:Ð:r   c                 ó8   — | t         k(  rd} t        | t        «      S )zÌDereference an alias to a website root.

    A recognized server alias such as "staging" gets turned into the
    appropriate URI. A URI gets returned as is. Any other string raises a
    ValueError.
    r	   )ÚEDGE_WEB_ROOTr   Ú	web_roots)Úweb_roots    r   r   r   t   s   € ð ”=Ò àˆÜ˜h¬	Ó2Ð2r   c                 ó¶   — t        | «      } t        | «      }d|_        |j                  j	                  ddd«      |_        t        |j                  «       «      }|S )zeTurn a service root URL into a web root URL.

    This is done heuristically, not with a lookup.
    r   zapi.é   )r   r   r   ÚhostÚreplaceÚstrÚensureSlash)r#   Úweb_root_urir'   s      r   r   r   �   sU   € ô
 ' |Ó4€LÜ�|Ó$€LØ€LÔØ$×)Ñ)×1Ñ1°&¸"¸aÓ@€LÔÜ�<×+Ñ+Ó-Ó.€HØ€Or   )Ú__doc__ÚtypeÚ__metaclass__Ú__all__Úurllib.parser   ÚImportErrorr   Úlazr.urir   ÚLPNET_SERVICE_ROOTÚQASTAGING_SERVICE_ROOTÚSTAGING_SERVICE_ROOTÚDEV_SERVICE_ROOTÚDOGFOOD_SERVICE_ROOTÚTEST_DEV_SERVICE_ROOTÚLPNET_WEB_ROOTÚQASTAGING_WEB_ROOTÚSTAGING_WEB_ROOTÚDEV_WEB_ROOTÚDOGFOOD_WEB_ROOTÚTEST_DEV_WEB_ROOTr!   r%   Údictr"   r&   r   r   r   r   © r   r   ú<module>rD      sä   ðñ"ð €ò€ð
"Ý%ó Ý à1Ð Ø?Ð Ø;Ð Ø0Ð Ø8Ð Ø9Ð à)€Ø7Ð Ø3Ð Ø(€Ø0Ð Ø1Ð ð
 6Ð Ø-€áØ!Ø	Ø$Ø Ø ØØ"ô€ñ ØØ	Ø ØØØØô€	òò0
;ò
3ó
øðE ò "ß!ð"ús   ŠA! Á!A/Á.A/