+
    Dfj                          R t ^ RIHt ^ RIHtHtHt ^ RI	H
t RP                  ]! ^^4       U u. uF  p ]! V 4      P                  R4      NK  	  up 4      tR t ! R R4      tR	# u up i )
z(
L{URLPath}, a representation of a URL.
)cast)quoteunquote
urlunsplit)URL    asciic                >   a RV ,           o\        V3R lV3R l4      # )z
Attriute declaration to preserve mutability on L{URLPath}.

@param name: a public attribute name
@type name: native L{str}

@return: a descriptor which retrieves the private version of the attribute
    on get and calls rerealize on set.
_c                    < \        V S4      # N)getattr)selfprivateNames   &8/usr/lib/python3/dist-packages/twisted/python/urlpath.py<lambda>"_rereconstituter.<locals>.<lambda>   s    WT;/r   c                    < \        T S\        V\        4      '       d   TMVP                  R 4      4      ;'       g    V P	                  4       # )charmap)setattr
isinstancebytesencode_reconstitute)r   valuer   s   &&r   r   r      sH    #E511u||I7N $ $
 !!#$r   )property)namer   s   &@r   _rereconstituterr      s#     *K/	

 
r   c                   &  a  ] tR t^)t o RtRR ltR t]! R4      t]! R4      t	]! R4      t
]! R4      t]! R4      t]R	 4       tRR
 lt]R 4       t]R 4       t]R 4       tR tRR ltRR ltRR ltRR ltR tV 3R lR ltV 3R lR ltRtV tR# )URLPatha  
A representation of a URL.

@ivar scheme: The scheme of the URL (e.g. 'http').
@type scheme: L{bytes}

@ivar netloc: The network location ("host").
@type netloc: L{bytes}

@ivar path: The path on the network location.
@type path: L{bytes}

@ivar query: The query argument (the portion after ?  in the URL).
@type query: L{bytes}

@ivar fragment: The page fragment (the portion after # in the URL).
@type fragment: L{bytes}
c                    T;'       g    R V n         W n        T;'       g    RV n        W@n        WPn        V P                  4        R# )s   http   /N)_scheme_netloc_path_query	_fragmentr   )r   schemenetlocpathqueryfragments   &&&&&&r   __init__URLPath.__init__=   s;     ((\\T
!r   c           	        \        \        V P                  V P                  V P                  V P
                  V P                  34      \        R7      p\        P                  ! VP                  R4      P                  R4      4      V n        R# )z=
Reconstitute this L{URLPath} from all its given attributes.
safer   N)urlquoter   r"   r#   r$   r%   r&   	_allascii_URLfromTextr   decode_url)r   urltexts   & r   r   URLPath._reconstituteG   sc     t||TZZdnnU 	
 MM'.."9"@"@"IJ	r   r'   r(   r)   r*   r+   c                   V P                  V 4      pTP                  VP                  ;'       g    R.R7      Vn        VP                  P                  P                  R4      Vn        VP                  P                  4       P                  R4      Vn        \        VP                  P                  RR7      P                  4       P                  4       P                  R4      Vn        \        VP                  P                  R7      P                  4       P                  4       P                  R4      R,          Vn        VP                  P                  P                  R4      Vn        V# )z
Reconstruct all the public instance variables of this L{URLPath} from
its underlying L{_URL}.

@param urlInstance: the object to base this L{URLPath} on.
@type urlInstance: L{_URL}

@return: a new L{URLPath}
 )r)   r   T)r)   rooted)r*   :   NN)__new__replacer)   r6   r'   r   r"   	authorityr#   r3   asURIasTextr$   r*   r%   r+   r&   )clsurlInstancer   s   && r   _fromURLURLPath._fromURLY   s    {{3''[-=-=-E-E"'F	yy''..w7yy**,33G<diinnT288:AACJJ7S 	
 $))//288:AACJJ7SUWX++227;r   c                    V P                   P                  pR pV'       d   V3R lpR.V Uu. uF
  qT! V4      NK  	  up,           # u upi )z
Split this URL's path into its components.

@param unquote: whether to remove %-encoding from the returned strings.

@param copy: (ignored, do not use)

@return: The components of C{self.path}
@rtype: L{list} of L{bytes}
c                 $    V P                  R 4      # )r   )r   xs   &r   r   "URLPath.pathList.<locals>.<lambda>{   s    188G,r   c                 $    V! \        V 4      4      # r   )
urlunquote)rI   ms   &&r   r   rJ   }   s    :a=)9r   r   )r6   r)   )r   r   copysegmentsmappersegments   &&&   r   pathListURLPath.pathListo   sD     99>>,!'9Fux@xGwx@@@@s   Ac                    \        V\        4      '       g   \        R4      hV P                  \        P
                  ! V4      4      # )z
Make a L{URLPath} from a L{str} or L{unicode}.

@param url: A L{str} representation of a URL.
@type url: L{str} or L{unicode}.

@return: a new L{URLPath} derived from the given string.
@rtype: L{URLPath}
z'url' must be a str)r   str
ValueErrorrD   r3   r4   )klassurls   &&r   
fromStringURLPath.fromString   s5     #s##233~~dmmC011r   c                    \        V\        4      '       g   \        R4      h\        V\        R7      pV P                  V4      # )z
Make a L{URLPath} from a L{bytes}.

@param url: A L{bytes} representation of a URL.
@type url: L{bytes}

@return: a new L{URLPath} derived from the given L{bytes}.
@rtype: L{URLPath}

@since: 15.4
z'url' must be bytesr/   )r   r   rV   r1   r2   rY   )rW   rX   quoteds   && r   	fromBytesURLPath.fromBytes   s:     #u%%233#I.''r   c                @    V P                  VP                  4       4      # )z
Make a L{URLPath} from a L{twisted.web.http.Request}.

@param request: A L{twisted.web.http.Request} to make the L{URLPath}
    from.

@return: a new L{URLPath} derived from the given request.
@rtype: L{URLPath}
)r]   
prePathURL)rW   requests   &&r   fromRequestURLPath.fromRequest   s     w11344r   c                    T P                  TP                  RV'       d    V P                  P                  R7      4      # RR7      4      # )a  
Return a modified copy of C{self} using C{newURL}, keeping the query
string if C{keepQuery} is C{True}.

@param newURL: a L{URL} to derive a new L{URLPath} from
@type newURL: L{URL}

@param keepQuery: if C{True}, preserve the query parameters from
    C{self} on the new L{URLPath}; if C{False}, give the new L{URLPath}
    no query parameters.
@type keepQuery: L{bool}

@return: a new L{URLPath}
r:   )r+   r*    )rD   r>   r6   r*   )r   newURL	keepQuerys   &&&r   _modURLPath._mod   sA     }}NNBdiiooNS
 	
PRNS
 	
r   c                v    V P                  V P                  P                  VP                  R4      4      V4      # )a=  
Get the sibling of the current L{URLPath}.  A sibling is a file which
is in the same directory as the current file.

@param path: The path of the sibling.
@type path: L{bytes}

@param keepQuery: Whether to keep the query parameters on the returned
    L{URLPath}.
@type keepQuery: L{bool}

@return: a new L{URLPath}
r   )rh   r6   siblingr5   r   r)   rg   s   &&&r   rk   URLPath.sibling   s-     yy**4;;w+?@)LLr   c                v    V P                  V P                  P                  VP                  R4      4      V4      # )z
Get the child of this L{URLPath}.

@param path: The path of the child.
@type path: L{bytes}

@param keepQuery: Whether to keep the query parameters on the returned
    L{URLPath}.
@type keepQuery: L{bool}

@return: a new L{URLPath}
r   )rh   r6   childr5   rl   s   &&&r   ro   URLPath.child   s+     yyW)=>	JJr   c                X    V P                  V P                  P                  R4      V4      # )z
Get the parent directory of this L{URLPath}.

@param keepQuery: Whether to keep the query parameters on the returned
    L{URLPath}.
@type keepQuery: L{bool}

@return: a new L{URLPath}
z..rh   r6   clickr   rg   s   &&r   parentURLPath.parent   s"     yy.	::r   c                X    V P                  V P                  P                  R4      V4      # )z
Get the current directory of this L{URLPath}.

@param keepQuery: Whether to keep the query parameters on the returned
    L{URLPath}.
@type keepQuery: L{bool}

@return: a new L{URLPath}
.rr   rt   s   &&r   hereURLPath.here   s"     yy-y99r   c                t    V P                  V P                  P                  VP                  R4      4      4      # )z
Return a path which is the URL where a browser would presumably take
you if you clicked on a link with an HREF as given.

@param st: A relative URL, to be interpreted relative to C{self} as the
    base URL.
@type st: L{bytes}

@return: a new L{URLPath}
r   )rD   r6   rs   r5   )r   sts   &&r   rs   URLPath.click   s)     }}TYY__RYYw-?@AAr   c                    < V ^8  d   QhRS[ /#    returnrU   )format__classdict__s   "r   __annotate__URLPath.__annotate__  s     5 5 5r   c                n    \        \        V P                  P                  4       P	                  4       4      # )z-
The L{str} of a L{URLPath} is its URL text.
)r   rU   r6   r@   rA   r   s   &r   __str__URLPath.__str__  s%     C*11344r   c                    < V ^8  d   QhRS[ /# r   r   )r   r   s   "r   r   r     s     
 
# 
r   c                    RP                  V P                  V P                  V P                  V P                  V P
                  4      # )zc
The L{repr} of a L{URLPath} is an eval-able expression which will
construct a similar L{URLPath}.
zGURLPath(scheme={!r}, netloc={!r}, path={!r}, query={!r}, fragment={!r}))r   r'   r(   r)   r*   r+   r   s   &r   __repr__URLPath.__repr__  s;    
 Y__KKKKIIJJMM
 	
r   )r&   r#   r$   r%   r"   r6   N)r   s	   localhostr   r   r   )FT)F)__name__
__module____qualname____firstlineno____doc__r,   r   r   r'   r(   r)   r*   r+   classmethodrD   rR   rY   r]   rb   rh   rk   ro   ru   ry   rs   r   r   __static_attributes____classdictcell__)r   s   @r   r   r   )   s     &
K h'Fh'FF#DW%E
+H *A" 2 2 ( (" 
5 
5
&M K
;
:B5 5
 
r   r   N)r   typingr   urllib.parser   r1   r   rL   r   	hyperlinkr   r3   joinrangechrr   r2   r   r   rH   s   0r   <module>r      s_   
  M M !HHeAsmDmc!fmmG,mDE	0m
 m
7 Es    A%