o
    'h                     @  sF   d Z ddlmZ ddlmZ ddlmZ G dd dedg dZdS )	zAdvanced options for MongoDB drivers implemented on top of PyMongo.

.. seealso:: This module is compatible with both the synchronous and asynchronous PyMongo APIs.
    )annotations)
namedtuple)Optionalc                      s&   e Zd ZdZ	dd fd	d
Z  ZS )
DriverInfoa  Info about a driver wrapping PyMongo.

    The MongoDB server logs PyMongo's name, version, and platform whenever
    PyMongo establishes a connection. A driver implemented on top of PyMongo
    can add its own info to this log message. Initialize with three strings
    like 'MyDriver', '1.2.3', 'some platform info'. Any of these strings may be
    None to accept PyMongo's default.
    NnamestrversionOptional[str]platformreturnc                   sV   t  | |||}|  D ]\}}|d ur(t|ts(td| dt| q|S )NzWrong type for DriverInfo z/ option, value must be an instance of str, not )super__new___asdictitems
isinstancer   	TypeErrortype)clsr   r   r
   selfkeyvalue	__class__ O/var/www/html/olx_land/venv/lib/python3.10/site-packages/pymongo/driver_info.pyr   #   s   zDriverInfo.__new__)NN)r   r   r   r	   r
   r	   r   r   )__name__
__module____qualname____doc__r   __classcell__r   r   r   r   r      s    
r   )r   r   r
   N)r   
__future__r   collectionsr   typingr   r   r   r   r   r   <module>   s
   