3
O6b{              -   @   s  d Z ddlZddlZddlmZ ddlmZ ddlmZm	Z	 ddl
mZmZmZmZmZ ddlmZ ddlmZ dd	lmZ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$m%Z% ddl&m'Z'm(Z( ddl)m*Z*m+Z+ yddl,m-Z- ee-fZ.W n e/k
r,   efZ.Y nX erBddl0m1Z1 nddl2m1Z1 dZ3de3 Z4dZ5dZ6dZ7dZ8dZ9dZ:dZ;dZ<dZ=dZ>dZ?dZ@d ZAd!ZBdZCdZDdZEdZFd"ZGd#ZHd#ZIdZJdZKd'ZLd(d) ZMd*d+ ZNd,d- ZOejPejQejRejSejTd.ZUd/d0 ZVd1d2 ZWd3d4 ZXd5d6 ZYd7d8 ZZd9d: Z[d;d< Z\d=d> Z]d?d@ Z^dAdB Z_dCdD Z`dEdF ZadGdH ZbdIdJ ZcdKdL ZddMdN ZedOdP ZfdQdR ZgdSdT ZhdUdV ZidWdX ZjdYdZ Zkd[d\ Zlemd]d^d_d`gZndadb Zodcdd Zpdedf Zqdgdh Zrdidj Zsdkdl Ztdmdn Zudodp Zvdqdr Zwdsdt Zxdudv Zydwdx Zzdydz Z{d{d| Z|emd}d~dgZ}dd Z~dd Zdgdgdgdgdgdgdgdgdgd	Zewejeoe^eefeWedeWecede\ege_eiele_eWeWeWeeefe[eWe(e'dd eWe[e[e_dd eWeaeZed$ZeWexeyeWeZeWe[eWe~eke]eddZepeqehe ee_e_ezed	Zddddddddddd
Zddddddddddd
Zeje x<eeD ]0\ZZx$eD ]ZeekrNee ee< qNW q@W ej Zeje dddddddgZemdgZdd Zdd ZdddZemddddddgZG dd deZG dd dejZdS )z9Functions and classes common to multiple pymongo modules.    N)SON)UuidRepresentation)CodecOptionsTypeRegistry)abcinteger_types	iteritemsstring_typePY3)RawBSONDocument)
MECHANISMS)validate_compressorsvalidate_zlib_compression_level)
DriverInfo)	ServerApi)%validate_auto_encryption_opts_or_none)ConfigurationError)_validate_event_listeners)ReadConcern)_MONGOS_MODES_ServerMode)validate_cert_reqsvalidate_allow_invalid_certs)DEFAULT_WRITE_CONCERNWriteConcern)OrderedDict)unquote_plus   i      i  z2.6   
         g      ?<   g      4@d      T;   @  @  i'  c             C   sZ   | }d}| j d}|dkr<| d| t| |d d  }}|jdrR|dd }||fS )z5Split a host:port string into (host, int(port)) pair.ii  :r!   N[r+   )rfindint
startswith)nodehostportidx r3   M/var/www/html/sandeepIITI/myenv/lib/python3.6/site-packages/pymongo/common.pypartition_nodez   s    
"
r5   c             C   s   t | \}}|j |fS )z6Split and normalize a node name from a hello response.)r5   lower)r/   r0   r1   r3   r3   r4   
clean_node   s    r7   c             C   s   t d| f dS )z1Raise ConfigurationError with the given key name.zUnknown option %sN)r   )keydummyr3   r3   r4   raise_config_error   s    r:   )ZunspecifiedstandardZpythonLegacyZ
javaLegacyZcsharpLegacyc             C   s    t |tr|S td| f dS )z(Validates that 'value' is True or False.z%s must be True or FalseN)
isinstancebool	TypeError)optionvaluer3   r3   r4   validate_boolean   s    
rA   c             C   s2   t |tr(|dkr td| f |dkS t| |S )z8Validates that value is True, False, 'true', or 'false'.truefalsez)The value of %s must be 'true' or 'false')rB   rC   )r<   r	   
ValueErrorrA   )r?   r@   r3   r3   r4   validate_boolean_or_string   s    

rE   c             C   sV   t |tr|S t |trDyt|S  tk
rB   td| f Y nX td| f dS )zIValidates that 'value' is an integer (or basestring representation).
    z"The value of %s must be an integerz+Wrong type for %s, value must be an integerN)r<   r   r	   r-   rD   r>   )r?   r@   r3   r3   r4   validate_integer   s    

rF   c             C   s$   t | |}|dkr td| f |S )zKValidate that 'value' is a positive integer, which does not include 0.
    r   z*The value of %s must be a positive integer)rF   rD   )r?   r@   valr3   r3   r4   validate_positive_integer   s
    

rH   c             C   s$   t | |}|dk r td| f |S )z6Validate that 'value' is a positive integer or 0.
    r   z.The value of %s must be a non negative integer)rF   rD   )r?   r@   rG   r3   r3   r4   validate_non_negative_integer   s
    

rI   c             C   s(   |dkr|S t | |}t|dj  |S )z6Validates that 'value' is file-like and readable.
    Nr)validate_stringopenclose)r?   r@   r3   r3   r4   validate_readable   s
    
rN   c             C   s   |dkr|S t | |S )z9Validate that 'value' is a positive integer or None.
    N)rH   )r?   r@   r3   r3   r4   !validate_positive_integer_or_none   s    rO   c             C   s   |dkr|S t | |S )z>Validate that 'value' is a positive integer or 0 or None.
    N)rI   )r?   r@   r3   r3   r4   %validate_non_negative_integer_or_none   s    rP   c             C   s$   t |tr|S td| tjf dS )zbValidates that 'value' is an instance of `basestring` for Python 2
    or `str` for Python 3.
    z2Wrong type for %s, value must be an instance of %sN)r<   r	   r>   __name__)r?   r@   r3   r3   r4   rK      s    
rK   c             C   s   |dkr|S t | |S )zEValidates that 'value' is an instance of `basestring` or `None`.
    N)rK   )r?   r@   r3   r3   r4   validate_string_or_none   s    rR   c             C   sH   t |tr|S t |tr6yt|S  tk
r4   |S X td| f dS )z4Validates that 'value' is an integer or string.
    z7Wrong type for %s, value must be an integer or a stringN)r<   r   r	   r-   rD   r>   )r?   r@   r3   r3   r4   validate_int_or_basestring  s    

rS   c             C   sV   t |tr|S t |trDyt|}W n tk
r8   |S X t| |S td| f dS )z4Validates that 'value' is an integer or string.
    zDWrong type for %s, value must be an non negative integer or a stringN)r<   r   r	   r-   rD   rI   r>   )r?   r@   rG   r3   r3   r4   'validate_non_negative_int_or_basestring  s    


rT   c             C   sx   d| f }yt |}W n6 tk
r2   t|Y n tk
rL   t|Y nX d|  k o`dk n  sttd| f |S )z[Validates that 'value' is a float, or can be converted to one, and is
       positive.
    z%s must be an integer or floatr   g    eAz3%s must be greater than 0 and less than one billion)floatrD   r>   )r?   r@   errmsgr3   r3   r4   validate_positive_float  s    

rW   c             C   s   |dks|dkrdS t | |S )zgValidates that 'value' is 0 or a positive float, or can be converted to
    0 or a positive float.
    r   0)rW   )r?   r@   r3   r3   r4   validate_positive_float_or_zero2  s    rY   c             C   s   |dkr|S t | |d S )zcValidates a timeout specified in milliseconds returning
    a value in floating point seconds.
    Ng     @@)rW   )r?   r@   r3   r3   r4   validate_timeout_or_none;  s    rZ   c             C   s8   |dkrt d| f |dks&|dkr*dS t| |d S )zValidates a timeout specified in milliseconds returning
    a value in floating point seconds for the case where None is an error
    and 0 is valid. Setting the timeout to nothing in the URI string is a
    config error.
    Nz%s cannot be Noner   rX   g     @@)r   rW   )r?   r@   r3   r3   r4   validate_timeout_or_zeroD  s
    r[   c             C   s*   |dks|dks|dkrdS t | |d S )zValidates a timeout specified in milliseconds returning
    a value in floating point seconds. value=0 and value="0" are treated the
    same as value=None which means unlimited timeout.
    Nr   rX   g     @@)rW   )r?   r@   r3   r3   r4    validate_timeout_or_none_or_zeroQ  s    r\   c             C   s   |dks|dkrdS t | |S )zBValidates maxStalenessSeconds according to the Max Staleness Spec.r!   z-1r+   r+   )rH   )r?   r@   r3   r3   r4   validate_max_staleness[  s    r]   c             C   s   t |tstd|f |S )z Validate a read preference.
    z%r is not a read preference.)r<   r   r>   )r9   r@   r3   r3   r4   validate_read_preferencec  s    
r^   c             C   s   |t krtd|f |S )zValidate read preference mode for a MongoReplicaSetClient.

    .. versionchanged:: 3.5
       Returns the original ``value`` instead of the validated read preference
       mode.
    z!%s is not a valid read preference)r   rD   )r9   r@   r3   r3   r4   validate_read_preference_modek  s    r_   c             C   s(   |t kr$|dkr$td| tt f |S )z+Validate the authMechanism URI option.
    zCRAM-MD5z%s must be in %s)r   rD   tuple)r?   r@   r3   r3   r4   validate_auth_mechanismw  s    ra   c             C   s6   yt | S  tk
r0   td|tt f Y nX dS )zAValidate the uuid representation option selected in the URI.
    z7%s is an invalid UUID representation. Must be one of %sN)_UUID_REPRESENTATIONSKeyErrorrD   r`   )r9   r@   r3   r3   r4   validate_uuid_representation  s
    rd   c             C   s   t |ts|g}g }x|D ]}|dkr2|ji  qyDi }x0|jdD ]"}|jd\}}t||t|< qDW |j| W q tk
r   td|| f Y qX qW |S )z:Parse readPreferenceTags if passed as a client kwarg.
     ,r)   z%r not a valid value for %s)r<   listappendsplitr   	ExceptionrD   )namer@   Ztag_setsZtag_settagstagr8   rG   r3   r3   r4   validate_read_preference_tags  s"    


rn   ZSERVICE_NAMECANONICALIZE_HOST_NAMEZSERVICE_REALMAWS_SESSION_TOKENc             C   s   t | |}i }x|jdD ]}y|jd\}}W n. tk
r^   d|krLd}td|f Y nX |tkr|td|ttf |dkrt||||< qt|||< qW |S )z!Validate authMechanismProperties.rf   r)   rp   z_AWS_SESSION_TOKEN:<redacted token>, did you forget to percent-escape the token with quote_plus?zTauth mechanism properties must be key:value pairs like SERVICE_NAME:mongodb, not %s.zA%s is not a supported auth mechanism property. Must be one of %s.ro   )rK   ri   rD   _MECHANISM_PROPSr`   rE   r   )r?   r@   propsoptr8   rG   r3   r3   r4   "validate_auth_mechanism_properties  s"    
rt   c             C   s"   t |tjtfstd| f |S )z#Validate the document_class option.zh%s must be dict, bson.son.SON, bson.raw_bson.RawBSONDocument, or a sublass of collections.MutableMapping)
issubclassr   MutableMappingr   r>   )r?   r@   r3   r3   r4   validate_document_class  s    
rw   c             C   s(   |dk	r$t |t r$td| tf |S )z"Validate the type_registry option.Nz%s must be an instance of %s)r<   r   r>   )r?   r@   r3   r3   r4   validate_type_registry  s    rx   c             C   s   t |tstd| f |S )z!Validates that 'value' is a list.z%s must be a list)r<   rg   r>   )r?   r@   r3   r3   r4   validate_list  s    
ry   c             C   s   |dkr|S t | |S )z)Validates that 'value' is a list or None.N)ry   )r?   r@   r3   r3   r4   validate_list_or_none  s    rz   c             C   s"   t |tjtfstd| f dS )z/Validates that 'value' is a list or a document.zw%s must either be a list or an instance of dict, bson.son.SON, or any other type that inherits from collections.MappingN)r<   r   Mappingrg   r>   )r?   r@   r3   r3   r4   validate_list_or_mapping  s    r|   c             C   s   t |tjstd| f dS )z=Validate the type of method arguments that expect a document.zf%s must be an instance of dict, bson.son.SON, or any other type that inherits from collections.MappingN)r<   r   r{   r>   )r?   r@   r3   r3   r4   validate_is_mapping  s    r}   c             C   s"   t |tjtfstd| f dS )zEValidate the type of method arguments that expect a MongoDB document.z%s must be an instance of dict, bson.son.SON, bson.raw_bson.RawBSONDocument, or a type that inherits from collections.MutableMappingN)r<   r   rv   r   r>   )r?   r@   r3   r3   r4   validate_is_document_type  s    r~   c             C   s:   |dkr|S t | | t|jddkr6td| f |S )zValidate the appname option.Nzutf-8   z%s must be <= 128 bytes)rK   lenencoderD   )r?   r@   r3   r3   r4   validate_appname_or_none  s    
r   c             C   s(   |dkr|S t |ts$td| f |S )z Validate the driver keyword arg.Nz$%s must be an instance of DriverInfo)r<   r   r>   )r?   r@   r3   r3   r4   validate_driver_or_none  s
    
r   c             C   s(   |dkr|S t |ts$td| f |S )z$Validate the server_api keyword arg.Nz#%s must be an instance of ServerApi)r<   r   r>   )r?   r@   r3   r3   r4   validate_server_api_or_none  s
    
r   c             C   s&   |dkr|S t |s"td| f |S )z%Validates that 'value' is a callable.Nz%s must be a callable)callablerD   )r?   r@   r3   r3   r4   validate_is_callable_or_none  s
    r   c             C   s<   t d|  | r8t| t r8tt| }|jdr8tddS )z Validate a replacement document.replacement$z'replacement can not include $ operatorsN)r}   r<   r   nextiterr.   rD   )r   firstr3   r3   r4   validate_ok_for_replace#  s
    

r   c             C   sJ   t d|  | stdt| t }tt| }|rF|jd rFtddS )zValidate an update document.updatezupdate cannot be emptyr   z"update only works with $ operatorsN)r|   rD   r<   rg   r   r   r.   )r   Zis_documentr   r3   r3   r4   validate_ok_for_update-  s    
r   strictreplaceignorec             C   s    |t krtd|tt f |S )zFValidate the Unicode decode error handler option of CodecOptions.
    z@%s is an invalid Unicode decode error handler. Must be one of %s)_UNICODE_DECODE_ERROR_HANDLERSrD   r`   )r9   r@   r3   r3   r4   %validate_unicode_decode_error_handler=  s    r   c             C   s&   |dk	r"t |tj r"td| |S )zValidate the tzinfo option
    Nz)%s must be an instance of datetime.tzinfo)r<   datetimetzinfor>   )r9   r@   r3   r3   r4   validate_tzinfoG  s    r   jwtimeoutsslssl_cert_reqsssl_match_hostnamessl_crlfilessl_ca_certsssl_certfilessl_pem_passphrase)	journal
wtimeoutmstlstlsallowinvalidcertificatestlsallowinvalidhostnames
tlscrlfile	tlscafiletlscertificatekeyfiletlscertificatekeyfilepasswordc              G   s
   t |   S )N)rE   )xr3   r3   r4   <lambda>~  s    r   c              G   s
   t |   S )N)rE   )r   r3   r3   r4   r     s    )$appnameZauthmechanismauthmechanismpropertiesZ
authsourceZcompressorsconnecttimeoutmsZdirectconnectionheartbeatfrequencymsr   ZlocalthresholdmsmaxidletimemsZmaxpoolsizemaxstalenesssecondsZreadconcernlevelZreadpreferenceZreadpreferencetagsZ
replicasetZ
retryreadsZretrywritesZloadbalancedserverselectiontimeoutmssockettimeoutmsssl_keyfiler   r   r   r   r   r   r   r   tlsdisableocspendpointcheckZtlsinsecurewr   Zzlibcompressionlevel)connectZdriverZ
server_apifsyncZminpoolsizeZsocketkeepaliver   Ztz_awareZunicode_decode_error_handlerZuuidrepresentationwaitqueuemultiplewaitqueuetimeoutms)	Zdocument_classZtype_registryread_preferenceZevent_listenersr   usernamepasswordZserver_selectorZauto_encryption_optsr   r   Zssl_check_ocsp_endpoint)
r   r   r   r   r   r   r   r   r   r   renamed
wTimeoutMStlsAllowInvalidCertificatestlsAllowInvalidHostnames
tlsCRLFile	tlsCAFileremovedInstead of using ssl_certfile to specify the certificate file, use tlsCertificateKeyFile to pass a single file containing both the client certificate and the private keyInstead of using ssl_keyfile to specify the private keyfile, use tlsCertificateKeyFile to pass a single file containing both the client certificate and the private keytlsCertificateKeyFilePasswordqInstead of using waitQueueMultiple to bound queuing, limit the size of the thread pool in your application server)
r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   c             C   s,   t | |\}}|tkr$td| f | |fS )z1Validate optional authentication parameters.
    z!Unknown authentication option: %s)validate_AUTH_OPTIONSr   )r?   r@   r6   r3   r3   r4   validate_auth_option  s
    
r   c             C   s&   | j  }tj|t}|| |}| |fS )z!Generic validation function.
    )r6   
VALIDATORSgetr:   )r?   r@   r6   	validatorr3   r3   r4   r     s    
r   c       
         s   t  tr&t }dd } fdd}ni }dd }dd }xt D ]v\}}||}ytj|t}|||}W n> tttfk
r }	 z|rt	j
t|	 n W Y dd}	~	X qDX ||||< qDW |S )a  Validate each entry in options and raise a warning if it is not valid.
    Returns a copy of options with invalid entries removed.

    :Parameters:
        - `opts`: A dict containing MongoDB URI options.
        - `warn` (optional): If ``True`` then warnings will be logged and
          invalid options will be ignored. Otherwise, invalid options will
          cause errors.
    c             S   s   | S )Nr3   )r   r3   r3   r4   r     s    z'get_validated_options.<locals>.<lambda>c                s
    j | S )N)	cased_key)r   )optionsr3   r4   r     s    c             S   s   | j  S )N)r6   )r   r3   r3   r4   r     s    c             S   s   | S )Nr3   )r   r3   r3   r4   r     s    N)r<   _CaseInsensitiveDictionaryr   URI_OPTIONS_VALIDATOR_MAPr   r:   rD   r>   r   warningswarnstr)
r   r   Zvalidated_optionsZget_normed_keyZget_setter_keyrs   r@   Z
normed_keyr   excr3   )r   r4   get_validated_options  s&    

r   r   r   c               @   sX   e Zd ZdZdd Zedd Zedd Zdd	 Zed
d Z	dd Z
edd ZdS )
BaseObjectzA base class that provides attributes and methods common
    to multiple pymongo classes.

    SHOULD NOT BE USED BY DEVELOPERS EXTERNAL TO MONGODB.
    c             C   sj   t |tstd|| _t |ts0td|f || _t |tsHtd|| _t |ts`td|| _	d S )NzDcodec_options must be an instance of bson.codec_options.CodecOptionszT%r is not valid for read_preference. See pymongo.read_preferences for valid options.zGwrite_concern must be an instance of pymongo.write_concern.WriteConcernzDread_concern must be an instance of pymongo.read_concern.ReadConcern)
r<   r   r>   _BaseObject__codec_optionsr   _BaseObject__read_preferencer   _BaseObject__write_concernr   _BaseObject__read_concern)selfcodec_optionsr   write_concernread_concernr3   r3   r4   __init__=  s    




zBaseObject.__init__c             C   s   | j S )zdRead only access to the :class:`~bson.codec_options.CodecOptions`
        of this instance.
        )r   )r   r3   r3   r4   r   U  s    zBaseObject.codec_optionsc             C   s   | j S )zRead only access to the :class:`~pymongo.write_concern.WriteConcern`
        of this instance.

        .. versionchanged:: 3.0
          The :attr:`write_concern` attribute is now read only.
        )r   )r   r3   r3   r4   r   \  s    zBaseObject.write_concernc             C   s   |r|j rtS | jS )zKRead only access to the write concern of this instance or session.
        )Zin_transactionr   r   )r   sessionr3   r3   r4   _write_concern_forf  s    
zBaseObject._write_concern_forc             C   s   | j S )zRead only access to the read preference of this instance.

        .. versionchanged:: 3.0
          The :attr:`read_preference` attribute is now read only.
        )r   )r   r3   r3   r4   r   n  s    zBaseObject.read_preferencec             C   s   |r|j  p| jS | jS )zMRead only access to the read preference of this instance or session.
        )Z_txn_read_preferencer   )r   r   r3   r3   r4   _read_preference_forw  s    zBaseObject._read_preference_forc             C   s   | j S )zRead only access to the :class:`~pymongo.read_concern.ReadConcern`
        of this instance.

        .. versionadded:: 3.2
        )r   )r   r3   r3   r4   r     s    zBaseObject.read_concernN)rQ   
__module____qualname____doc__r   propertyr   r   r   r   r   r   r3   r3   r3   r4   r   6  s   
	r   c               @   s   e Z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
dd Zd"ddZdd Zdd Zdd Zd#ddZdd Zd d! ZdS )$r   c             O   s    i | _ i | _| jt|| d S )N)%_CaseInsensitiveDictionary__casedkeys _CaseInsensitiveDictionary__datar   dict)r   argskwargsr3   r3   r4   r     s    z#_CaseInsensitiveDictionary.__init__c             C   s   |j  | jkS )N)r6   r   )r   r8   r3   r3   r4   __contains__  s    z'_CaseInsensitiveDictionary.__contains__c             C   s
   t | jS )N)r   r   )r   r3   r3   r4   __len__  s    z"_CaseInsensitiveDictionary.__len__c             C   s   dd | j D S )Nc             s   s   | ]
}|V  qd S )Nr3   ).0r8   r3   r3   r4   	<genexpr>  s    z6_CaseInsensitiveDictionary.__iter__.<locals>.<genexpr>)r   )r   r3   r3   r4   __iter__  s    z#_CaseInsensitiveDictionary.__iter__c                s   t  fdd D S )Nc                s   i | ]} j |  j| qS r3   )r   r   )r   k)r   r3   r4   
<dictcomp>  s    z7_CaseInsensitiveDictionary.__repr__.<locals>.<dictcomp>)r   )r   r3   )r   r4   __repr__  s    z#_CaseInsensitiveDictionary.__repr__c             C   s    |j  }|| j|< || j|< d S )N)r6   r   r   )r   r8   r@   lc_keyr3   r3   r4   __setitem__  s    
z&_CaseInsensitiveDictionary.__setitem__c             C   s   | j |j  S )N)r   r6   )r   r8   r3   r3   r4   __getitem__  s    z&_CaseInsensitiveDictionary.__getitem__c             C   s   |j  }| j|= | j|= d S )N)r6   r   r   )r   r8   r   r3   r3   r4   __delitem__  s    z&_CaseInsensitiveDictionary.__delitem__c             C   sJ   t |tjstS t| t|kr$dS x |D ]}| | || kr*dS q*W dS )NFT)r<   r   r{   NotImplementedr   )r   otherr8   r3   r3   r4   __eq__  s    
z!_CaseInsensitiveDictionary.__eq__Nc             C   s   | j j|j |S )N)r   r   r6   )r   r8   defaultr3   r3   r4   r     s    z_CaseInsensitiveDictionary.getc             O   s*   |j  }| jj|d  | jj|f||S )N)r6   r   popr   )r   r8   r   r   r   r3   r3   r4   r     s    z_CaseInsensitiveDictionary.popc             C   s"   | j j \}}| jj|}||fS )N)r   popitemr   r   )r   r   r   r@   r3   r3   r4   r     s    z"_CaseInsensitiveDictionary.popitemc             C   s   | j j  | jj  d S )N)r   clearr   )r   r3   r3   r4   r     s    
z _CaseInsensitiveDictionary.clearc             C   s6   |j  }|| kr| j| S || j|< || j|< |S d S )N)r6   r   r   )r   r8   r   r   r3   r3   r4   
setdefault  s    


z%_CaseInsensitiveDictionary.setdefaultc             C   sJ   t |tr,x:|D ]}|| | |j|< qW nx|D ]}|| | |< q2W d S )N)r<   r   r   )r   r   r8   r3   r3   r4   r     s
    


z!_CaseInsensitiveDictionary.updatec             C   s   | j |j  S )N)r   r6   )r   r8   r3   r3   r4   r     s    z$_CaseInsensitiveDictionary.cased_key)N)N)rQ   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r3   r3   r3   r4   r     s    

	r   i   i   )r&   )r   r'   r(   )r   r   )r   r   )r   r   )r   r   )r   r   )r   r   )r   r   )r   r   )r   r   )r   r   )T)r   r   r   Zbsonr   Zbson.binaryr   Zbson.codec_optionsr   r   Zbson.py3compatr   r   r   r	   r
   Zbson.raw_bsonr   Zpymongo.authr   Zpymongo.compression_supportr   r   Zpymongo.driver_infor   Zpymongo.server_apir   Zpymongo.encryption_optionsr   Zpymongo.errorsr   Zpymongo.monitoringr   Zpymongo.read_concernr   Zpymongo.read_preferencesr   r   Zpymongo.ssl_supportr   r   Zpymongo.write_concernr   r   collectionsr   ZORDERED_TYPESImportErrorurllib.parser   urllibZMAX_BSON_SIZEZMAX_MESSAGE_SIZEZMIN_WIRE_VERSIONZMAX_WIRE_VERSIONZMAX_WRITE_BATCH_SIZEZMIN_SUPPORTED_SERVER_VERSIONZMIN_SUPPORTED_WIRE_VERSIONZMAX_SUPPORTED_WIRE_VERSIONZHEARTBEAT_FREQUENCYZKILL_CURSOR_FREQUENCYZEVENTS_QUEUE_FREQUENCYZSERVER_SELECTION_TIMEOUTZMIN_HEARTBEAT_INTERVALZMIN_SRV_RESCAN_INTERVALZCONNECT_TIMEOUTZMAX_POOL_SIZEZMIN_POOL_SIZEZMAX_IDLE_TIME_MSZMAX_IDLE_TIME_SECZWAIT_QUEUE_TIMEOUTZLOCAL_THRESHOLD_MSZRETRY_WRITESZRETRY_READSZCOMMAND_NOT_FOUND_CODESZUNAUTHORIZED_CODESZ_MAX_END_SESSIONSr5   r7   r:   ZUNSPECIFIEDZSTANDARDZPYTHON_LEGACYZJAVA_LEGACYZCSHARP_LEGACYrb   rA   rE   rF   rH   rI   rN   rO   rP   rK   rR   rS   rT   rW   rY   rZ   r[   r\   r]   r^   r_   ra   rd   rn   	frozensetrq   rt   rw   rx   ry   rz   r|   r}   r~   r   r   r   r   r   r   r   r   r   ZURI_OPTIONS_ALIAS_MAPr   ZNONSPEC_OPTIONS_VALIDATOR_MAPZKW_VALIDATORSZINTERNAL_URI_OPTION_NAME_MAPZURI_OPTIONS_DEPRECATION_MAPr   optnamealiasesaliascopyr   ZTIMEOUT_OPTIONSr   r   r   r   ZWRITE_CONCERN_OPTIONSobjectr   rv   r   r3   r3   r3   r4   <module>   s  




		
					


   





	
$S