o
    gf!t                     @   s  d Z ddlZddlmZ ddlZddlZddlZddlZddlZddl	m
Z
 ddl	mZ ddl	mZ ddl	mZ dd	l	mZ dd
l	mZ ddl	mZ ddl	mZ ddl	mZ ddl	mZ ddl	mZ ddl	mZ ddl	mZ ddl	mZ ddlmZ dZdZdZG dd deZG dd deZdGddZ dHddZ!d d! Z"d"d# Z#d$d% Z$d&d' Z%d(d) Z&d*d+ Z'd,d- Z(d.d/ Z)dId1d2Z*dId3d4Z+G d5d6 d6e,Z-G d7d8 d8e,Z.d9d: Z/G d;d< d<e0Z1G d=d> d>ej2Z3G d?d@ d@e,Z4G dAdB dBe,Z5G dCdD dDe5Z6G dEdF dFe5Z7dS )Ja[  
The MIT License

Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
    N)sha1   )PY3)b)parse_qs)quote)STRING_TYPES)TEXT)uunquote)unquote_to_bytes)	urlencode)urlsplit)
urlunsplit)urlparse)
urlunparse)__version__z1.0GET	PLAINTEXTc                   @   s.   e Zd ZdZd
ddZedd Zdd Zd	S )ErrorzGeneric exception class.OAuth error occurred.c                 C   s
   || _ d S N_message)selfmessage r   P/var/www/html/humari/django-venv/lib/python3.10/site-packages/oauth2/__init__.py__init__9   s   
zError.__init__c                 C      | j S )z3A hack to get around the deprecation errors in 2.6.r   r   r   r   r   r   <   s   zError.messagec                 C   r    r   r   r!   r   r   r   __str__A   s   zError.__str__N)r   )__name__
__module____qualname____doc__r   propertyr   r"   r   r   r   r   r   6   s    

r   c                   @   s   e Zd ZdS )MissingSignatureN)r#   r$   r%   r   r   r   r   r(   E   s    r(    c                 C   s   dd|  iS )z,Optional WWW-Authenticate header (401 error)WWW-AuthenticateOAuth realm="%s"r   realmr   r   r   build_authenticate_headerI      r.   c                 C   sp   t ||d| }t }|||| g }t| D ]\}}|dur-|d|t|f  qdd| d|f S )z;Build an XOAUTH string for use in SMTP/IMPA authentication.r   N%s="%s"z%s %s %s,)	Requestfrom_consumer_and_tokenSignatureMethod_HMAC_SHA1sign_requestsorteditemsappendescapejoin)urlconsumertokenrequestsigning_methodparamskvr   r   r   build_xoauth_stringN   s   rC   c              
   C   sf   t | ts1t | tstdt| | f z| d} W | S  ty0 } ztd| |f d}~ww | S )zn Convert to unicode, raise exception with instructive error
    message if s is not unicode, ascii, or utf-8. zCYou are required to pass either unicode or bytes here, not: %r (%s)utf-8zYou are required to pass either a unicode object or a utf-8-enccoded bytes string here. You passed a bytes object which contained non-utf-8: %r. The UnicodeDecodeError that resulted from attempting to interpret it as utf-8 was: %sN)
isinstancer	   bytes	TypeErrortypedecodeUnicodeDecodeError)sler   r   r   
to_unicode^   s   


	rM   c                 C   s   t | dS )NrD   )rM   encoderK   r   r   r   to_utf8q      rP   c                 C      t | tr	t| S | S r   )rE   r   rM   rO   r   r   r   to_unicode_if_stringt      
rS   c                 C   rR   r   )rE   r   rP   rO   r   r   r   to_utf8_if_stringz   rT   rU   c              
   C   f   t | tr	t| S zt| }W n ty+ } zdt|v sJ | W  Y d}~S d}~ww dd |D S )zw
    Raise TypeError if x is a str containing non-utf8 bytes or if x is
    an iterable which contains such a str.
    is not iterableNc                 S      g | ]}t |qS r   )rM   .0er   r   r   
<listcomp>       z0to_unicode_optional_iterator.<locals>.<listcomp>)rE   r   rM   listrG   strxlr[   r   r   r   to_unicode_optional_iterator      
rc   c              
   C   rV   )zX
    Raise TypeError if x is a str or if x is an iterable which
    contains a str.
    rW   Nc                 S   rX   r   rU   rY   r   r   r   r\      r]   z-to_utf8_optional_iterator.<locals>.<listcomp>)rE   r   rP   r^   rG   r_   r`   r   r   r   to_utf8_optional_iterator   rd   rf   c                 C   s    t | ts
| d} t| ddS )zEscape a URL including any /.rD   ~)safe)rE   rF   rN   r   rO   r   r   r   r9      s   

r9   c                   C   s   t t S zGet seconds since epoch (UTC).)inttimer   r   r   r   generate_timestamp   r/   rl      c                 C      d dd t| D S )Generate pseudorandom number.r)   c                 S       g | ]}t t d dqS r   	   r_   randomSystemRandomrandintrZ   ir   r   r   r\           z"generate_nonce.<locals>.<listcomp>r:   rangelengthr   r   r   generate_nonce      r~   c                 C   rn   )ro   r)   c                 S   rp   rq   rs   rw   r   r   r   r\      ry   z%generate_verifier.<locals>.<listcomp>rz   r|   r   r   r   generate_verifier   r   r   c                   @   s(   e Zd ZdZdZdZdd Zdd ZdS )Consumera  A consumer of OAuth-protected services.
 
    The OAuth consumer is a "third-party" service that wants to access
    protected resources from an OAuth service provider on behalf of an end
    user. It's kind of the OAuth client.
 
    Usually a consumer must be registered with the service provider by the
    developer of the consumer software. As part of that process, the service
    provider gives the consumer a *key* and a *secret* with which the consumer
    software can identify itself to the service. The consumer will include its
    key in each request to identify itself, but will use its secret only when
    signing requests, to prove that the request is from that particular
    registered consumer.
 
    Once registered, the consumer can then use its consumer credentials to ask
    the service provider for a request token, kicking off the OAuth
    authorization process.
    Nc                 C   ,   || _ || _| j d u s| jd u rtdd S NzKey and secret must be set.keysecret
ValueErrorr   r   r   r   r   r   r      
   zConsumer.__init__c                 C   s   | j | jd}t|S )N)oauth_consumer_keyoauth_consumer_secret)r   r   r   )r   datar   r   r   r"      s   zConsumer.__str__)r#   r$   r%   r&   r   r   r   r"   r   r   r   r   r      s    r   c                   @   sb   e Zd ZdZdZdZdZdZdZdd Z	dd Z
dddZd	d
 Zdd Zedd Zdd ZdS )TokenaX  An OAuth credential used to request authorization or a protected
    resource.
 
    Tokens in OAuth comprise a *key* and a *secret*. The key is included in
    requests to identify the token being used, but the secret is used only in
    the signature, to prove that the requester is who the server gave the
    token to.
 
    When first negotiating the authorization, the consumer asks for a *request
    token* that the live user authorizes with the service provider. The
    consumer then exchanges the request token for an *access token* that can
    be used to access protected resources.
    Nc                 C   r   r   r   r   r   r   r   r      r   zToken.__init__c                 C   s   || _ d| _d S )Ntrue)callbackcallback_confirmed)r   r   r   r   r   set_callback   s   
zToken.set_callbackc                 C   s   |d ur	|| _ d S t | _ d S r   )verifierr   )r   r   r   r   r   set_verifier   s   
zToken.set_verifierc                 C   sf   | j r0| jr0t| j }|d d \}}}}}}|r!d|| jf }nd| j }t||||||fS | j S )N   z%s&oauth_verifier=%szoauth_verifier=%s)r   r   r   r   )r   partsschemenetlocpathr@   queryfragmentr   r   r   get_callback_url   s   


zToken.get_callback_urlc                 C   s6   d| j fd| jfg}| jdur|d| jf t|S )zReturns this token as a plain string, suitable for storage.
 
        The resulting string includes the token's secret, so you should never
        send or store this string where a third party can read it.
        oauth_tokenoauth_token_secretNoauth_callback_confirmed)r   r   r   r8   r   )r   r7   r   r   r   	to_string  s   
zToken.to_stringc                 C   s   t | stdtt| dd}t |stdz|d d }W n ty+   tdw z|d d }W n ty?   tdw t||}z
|d	 d |_W |S  tyY   Y |S w )
zNDeserializes a token from a string like one returned by
        `to_string()`.zInvalid parameter string.Fkeep_blank_valuesr   r   z)'oauth_token' not found in OAuth request.r   z0'oauth_token_secret' not found in OAuth request.r   )lenr   r   r
   	Exceptionr   r   KeyError)rK   r@   r   r   r=   r   r   r   from_string  s.   
zToken.from_stringc                 C   s   |   S r   )r   r!   r   r   r   r"   :  s   zToken.__str__r   )r#   r$   r%   r&   r   r   r   r   r   r   r   r   r   r   staticmethodr   r"   r   r   r   r   r      s    

r   c                    s*   | j   fdd} fdd}t|| |S )Nc                    s$   z| j   W S  ty   t w r   )__dict__r   AttributeErrorr!   namer   r   getterA  s
   zsetter.<locals>.getterc                    s   | j  = d S r   )r   r!   r   r   r   deleterG  s   zsetter.<locals>.deleter)r#   r'   )attrr   r   r   r   r   setter>  s   r   c                   @   s   e Zd ZdZeZeddddfddZedd Z	ed	d
 Z
dd Zdd Zd*ddZdd Zdd Zdd Zdd Zdd Zedd Zedd Ze		d+d d!Zededdddfd"d#Zededdfd$d%Zed&d' Zed(d) ZdS ),r2   am  The parameters and information for an HTTP request, suitable for
    authorizing with OAuth credentials.
 
    When a consumer wants to access a service's protected resources, it does
    so using a signed HTTP request identifying itself (the consumer) with its
    key, and providing an access token authorized by the end user to access
    those resources.
 
    N    Fc                 C   sZ   |d ur	t || _|| _|d ur%| D ]\}}t |}t|}|| |< q|| _|| _d S r   )rM   r;   methodr7   rc   bodyis_form_encoded)r   r   r;   
parametersr   r   rA   rB   r   r   r   r   [  s   


zRequest.__init__c                 C   s   || j d< |d urOt|\}}}}}|dkr%|dd  dkr%|d d }n|dkr7|dd  dkr7|d d }|dvrCtd	||f t|||d d f| _d S d | _d | j d< d S )
Nr;   httpz:80httpsz:443)r   r   zUnsupported URL %s (%s).)r   r   r   r   normalized_url)r   valuer   r   r   r   r   r   r   r   r;   h  s   
zRequest.urlc                 C   s   |  | jd< d S )Nr   )upperr   )r   r   r   r   r   r   |  s   zRequest.methodc                 C   s   | d | d fS )Noauth_timestampoauth_noncer   r!   r   r   r   _get_timestamp_nonce  s   zRequest._get_timestamp_noncec                 C   s   t dd |  D S )zGet any non-OAuth parameters.c                 S   s"   g | ]\}}| d s||fqS )oauth_
startswithrZ   rA   rB   r   r   r   r\     s    z3Request.get_nonoauth_parameters.<locals>.<listcomp>)dictr7   r!   r   r   r   get_nonoauth_parameters  s   zRequest.get_nonoauth_parametersr)   c                 C   sX   dd |   D }dd |D }dd |D }d|}d| }|r(d||f }d|iS )	z.Serialize as a header for an HTTPAuth request.c                 s   s&    | ]\}}| d r||fV  qdS )r   Nr   r   r   r   r   	<genexpr>  s   
 z$Request.to_header.<locals>.<genexpr>c                 s   s     | ]\}}|t |fV  qd S r   )r9   r   r   r   r   r         c                 s   s     | ]\}}d ||f V  qdS )r0   Nr   r   r   r   r   r     r   , r+   z%s, %sAuthorization)r7   r:   )r   r-   oauth_paramsstringy_paramsheader_paramsparams_headerauth_headerr   r   r   	to_header  s   
zRequest.to_headerc                 C   sD   g }t |  D ]\}}||dt|f qt|dddS )z*Serialize as post data for a POST request.rD   T+%20)r6   r7   r8   rN   rf   r   replace)r   r7   rA   rB   r   r   r   to_postdata  s   zRequest.to_postdatac                 C   s   t | j}tr0t|j}|  D ]\}}||g t| q|j	}|j
}|j}|j}|j}	n6tt|j}|  D ]\}}|t|g t| q;t|j	}t|j
}t|j}t|j}t|j}	||||t|d|	f}
t|
S )z%Serialize as a URL for a GET request.T)r   r;   r   r   r   r7   
setdefaultr8   rf   r   r   r   r@   r   rP   r   r   )r   base_urlr   rA   rB   r   r   r   r@   r   r;   r   r   r   to_url  s(   






zRequest.to_urlc                 C   s"   |  |}|d u rtd| |S )NzParameter not found: %s)getr   )r   	parameterretr   r   r   get_parameter  s   
zRequest.get_parameterc                    s  g }|   D ]R\ } dkrqt|tr |t t|f qzt|}W n% tyK } zdt|v s6J |t t|f W Y d}~qd}~ww |	 fdd|D  qt
| jd }| |  }dd |D }|	| |  t|d	}|d
dddS )zAReturn a string that contains the parameters that must be signed.oauth_signaturerW   Nc                 3   s     | ]}t  t |fV  qd S r   re   )rZ   itemr   r   r   r     r   z4Request.get_normalized_parameters.<locals>.<genexpr>   c                 S   s(   g | ]\}}|d krt |t|fqS )r   )rP   rf   r   r   r   r   r\     s   ( z5Request.get_normalized_parameters.<locals>.<listcomp>Tr   r   z%7Erg   )r7   rE   r   r8   rU   rP   r^   rG   r_   extendr   r;   _split_url_stringsortr   r   )r   r7   r   r[   r   	url_itemsencoded_strr   r   r   get_normalized_parameters  s*   
"

z!Request.get_normalized_parametersc                 C   sf   | j stt| j | d< d| vr|j| d< |r#d| vr#|j| d< |j| d< || ||| d< dS )z2Set the signature parameter to the result of sign.oauth_body_hashr   r   oauth_signature_methodr   N)	r   base64	b64encoder   r   digestr   r   sign)r   signature_methodr<   r=   r   r   r   r5     s   


zRequest.sign_requestc                 C   s   t tt S ri   )r_   rj   rk   clsr   r   r   make_timestamp  s   zRequest.make_timestampc                 C   s   t t ddS )ro   r   i rs   r   r   r   r   
make_nonce  s   zRequest.make_noncec                 C   s   |du ri }|rEd}|  D ]\}}| dks| dkr |}q|rE|dd dkrE|dd }z| |}	||	 W n   td|rQ| |}
||
 t|d }| |}|| |ri| |||S dS )z$Combines multiple parameter sources.NauthorizationHTTP_AUTHORIZATIONr   zOAuth z;Unable to parse OAuth parameters from Authorization header.r   )r7   lowerr   _split_headerupdater   r   r   )r   http_methodhttp_urlheadersr   query_stringr   rA   rB   r   query_params	param_str
url_paramsr   r   r   from_request  s2   




zRequest.from_requestc           	      C   s`   |si }|j |  |  | jd}|| |}|r'|j |d< |jr'|j|d< | |||||dS )N)r   r   r   oauth_versionr   oauth_verifier)r   r   )r   r   r   versionr   r   )	r   r<   r=   r   r   r   r   r   defaultsr   r   r   r3   +  s    



zRequest.from_consumer_and_tokenc                 C   s*   |si }|j |d< |r||d< | |||S )Nr   oauth_callbackr   )r   r=   r   r   r   r   r   r   r   from_token_and_callbackD  s   
zRequest.from_token_and_callbackc                 C   sZ   i }|  d}|D ]!}|ddkrq	| }| dd}t|d d||d < q	|S )z+Turn Authorization: header into parameters.r1   r-   =r   "r   )splitfindstripr   )headerr@   r   paramparam_partsr   r   r   r   R  s   
zRequest._split_headerc                 C   sd   t st| d} t| dd}| D ]\}}t|dkr$t|d ||< qtdd |D ||< q|S )z Turn URL string into parameters.rD   Tr   r   r   c                 S   rX   r   r   )rZ   rK   r   r   r   r\   o  r]   z-Request._split_url_string.<locals>.<listcomp>)r   r   r   r7   r   r   r6   )r   r   rA   rB   r   r   r   r   c  s   
zRequest._split_url_stringr)   )NNN)r#   r$   r%   r&   OAUTH_VERSIONr   HTTP_METHODr   r   r;   r   r   r   r   r   r   r   r   r5   classmethodr   r   r   r3   r   r   r   r   r   r   r   r   r2   M  sN    




"

(
r2   c                       s@   e Zd ZdZd fdd	Zdd Zdddejdfd	d
Z  Z	S )Clientz8OAuthClient is a worker to attempt to execute a request.Nc                    sb   |d urt |tstd|d urt |tstd|| _|| _t | _tt	| j
di | d S )NzInvalid consumer.zInvalid token.r   )rE   r   r   r   r<   r=   r4   r   superr  r   )r   r<   r=   kwargs	__class__r   r   r   v  s   zClient.__init__c                 C   s   t |ts	td|| _d S )NzInvalid signature method.)rE   SignatureMethodr   r   )r   r   r   r   r   set_signature_method  s   

zClient.set_signature_methodr   r   c              	   C   s   d}t |ts	i }|dkr|d||d< |ddk}|r%|r%t|}	nd }	tj| j| j|||	||d}
|
| j	| j| j t
|\}}}}}}t||dd d d f}|rZ|
 }n|dkrc|
 }n	||
j|d tjj| ||||||dS )	Nz!application/x-www-form-urlencodedPOSTzContent-Type)r=   r   r   r   r   r   r)   r   r,   )r   r   r   redirectionsconnection_type)rE   r   r   r   r2   r3   r<   r=   r5   r   r   r   r   r   r   r   httplib2Httpr>   )r   urir   r   r   r  r  DEFAULT_POST_CONTENT_TYPEr   r   reqr   r   r   r@   r   r   r-   r   r   r   r>     s8   



zClient.requestr   )
r#   r$   r%   r&   r   r  r  DEFAULT_MAX_REDIRECTSr>   __classcell__r   r   r  r   r  s  s    r  c                   @   sh   e Zd ZdZdZeZdZdddZdd Z	dd	 Z
dddZdd Zdd Zdd Zdd Zdd ZdS )Servera/  A skeletal implementation of a service provider, providing protected
    resources to requests from authorized consumers.
 
    This class implements the logic to check requests for authorization. You
    can use it with your web server or web framework to protect certain
    resources with OAuth.
    i,  Nc                 C   s   |pi | _ d S r   )signature_methods)r   r   r   r   r   r     rQ   zServer.__init__c                 C   s   || j |j< | j S r   )r   r   )r   r   r   r   r   add_signature_method  s   zServer.add_signature_methodc                 C   s$   |  | | ||| | }|S )z3Verifies an api call and checks all the parameters.)_check_version_check_signaturer   )r   r>   r<   r=   r   r   r   r   verify_request  s   
zServer.verify_requestr)   c                 C   s   dd| iS )z-Optional support for the authenticate header.r*   r+   r   )r   r-   r   r   r   r.     r/   z Server.build_authenticate_headerc                 C   s0   |  |}|r|| jkrtdt| dS dS )z:Verify the correct version of the request for this server.zOAuth version %s not supported.N)_get_versionr   r   r_   r   r>   r   r   r   r   r"    s   
zServer._check_versionc                 C   s"   z| d}W |S    t}Y |S )z2Return the version of the request for this server.r   )r   r  r&  r   r   r   r%    s   zServer._get_versionc                 C   sR   | d}|du rt}z| j| W S  ty(   d| j }td||f w )z,Figure out the signature with some defaults.r   Nr   z>Signature method %s not supported try one of the following: %s)r   SIGNATURE_METHODr   r   r:   keysr   )r   r>   r   signature_method_namesr   r   r   _get_signature_method  s   
zServer._get_signature_methodc                 C   sp   |  \}}| | | |}|d}|d u rtd|||||}|s6||||\}	}
td|
 d S )Nr   zMissing oauth_signature.z5Invalid signature. Expected signature base string: %s)r   _check_timestampr*  r   r(   checksigning_baser   )r   r>   r<   r=   	timestampnoncer   	signaturevalidr   baser   r   r   r#    s   


zServer._check_signaturec                 C   s>   t |}t t }|| }|| jkrtd||| jf dS )z#Verify that timestamp is recentish.zQExpired timestamp: given %d and now %s has a greater difference than threshold %dN)rj   rk   timestamp_thresholdr   )r   r.  nowlapsedr   r   r   r+    s   
zServer._check_timestampr   r
  )r#   r$   r%   r&   r3  r  r   r   r   r!  r$  r.   r"  r%  r*  r#  r+  r   r   r   r   r    s    

	r  c                   @   s(   e Zd ZdZdd Zdd Zdd ZdS )	r  a0  A way of signing requests.
 
    The OAuth protocol lets consumers and service providers pick a way to sign
    requests. This interface shows the methods expected by the other `oauth`
    modules for signing requests. Subclass it and implement its methods to
    provide a new way to sign requests.
    c                 C      t )a  Calculates the string that needs to be signed.

        This method returns a 2-tuple containing the starting key for the
        signing and the message to be signed. The latter may be used in error
        messages to help clients debug their software.

        NotImplementedErrorr   r>   r<   r=   r   r   r   r-       zSignatureMethod.signing_basec                 C   r6  )a  Returns the signature for the given request, based on the consumer
        and token also provided.

        You should use your implementation of `signing_base()` to build the
        message to sign. Otherwise it may be less useful for debugging.

        r7  r9  r   r   r   r      r:  zSignatureMethod.signc                 C   s   |  |||}||kS )zReturns whether the given signature is the correct signature for
        the given consumer and token signing the given request.)r   )r   r>   r<   r=   r0  builtr   r   r   r,  *  s   zSignatureMethod.checkN)r#   r$   r%   r&   r-  r   r,  r   r   r   r   r    s
    

r  c                   @       e Zd ZdZdd Zdd ZdS )r4   z	HMAC-SHA1c                 C   sx   t |dr
|jd u rtdt|jt|jt| f}dt|j }|r-|t|j7 }d|}|d|dfS )Nr   z Base URL for request is not set.%s&&ascii)	hasattrr   r   r9   r   r   r   r:   rN   )r   r>   r<   r=   sigr   rawr   r   r   r-  4  s   

z&SignatureMethod_HMAC_SHA1.signing_basec                 C   s6   |  |||\}}t||t}t| dd S )z!Builds the base signature string.Nr  )r-  hmacnewr   binascii
b2a_base64r   )r   r>   r<   r=   r   rB  hashedr   r   r   r   D  s   zSignatureMethod_HMAC_SHA1.signNr#   r$   r%   r   r-  r   r   r   r   r   r4   1  s    r4   c                   @   r<  )SignatureMethod_PLAINTEXTr   c                 C   s(   dt |j }|r|t |j }||fS )zIConcatenates the consumer key and secret with the token's
        secret.r=  )r9   r   )r   r>   r<   r=   rA  r   r   r   r-  R  s   z&SignatureMethod_PLAINTEXT.signing_basec                 C   s   |  |||\}}|dS )Nutf8)r-  rN   )r   r>   r<   r=   r   rB  r   r   r   r   Z  s   
zSignatureMethod_PLAINTEXT.signNrH  r   r   r   r   rI  N  s    rI  r
  r   )rm   )8r&   r   hashlibr   rk   rt   rC  rE  r  _compatr   r   r   r   r   r	   r
   r   r   r   r   r   r   r   _versionr   r  r  r'  RuntimeErrorr   r(   r.   rC   rM   rP   rS   rU   rc   rf   r9   rl   r~   r   objectr   r   r   r   r2   r  r  r  r  r4   rI  r   r   r   r   <module>   sf    



%d  (?[$