
    h(                     :    d Z ddlZddlZddlmZ  G d de      Zy)a  DEPRECATED - A manager to handle when cursors are killed after they are
closed.

New cursor managers should be defined as subclasses of CursorManager and can be
installed on a client by calling
:meth:`~pymongo.mongo_client.MongoClient.set_cursor_manager`.

.. versionchanged:: 3.3
   Deprecated, for real this time.

.. versionchanged:: 3.0
   Undeprecated. :meth:`~pymongo.cursor_manager.CursorManager.close` now
   requires an `address` argument. The ``BatchCursorManager`` class is removed.
    N)integer_typesc                       e Zd ZdZd Zd Zy)CursorManagerz+DEPRECATED - The cursor manager base class.c                 p    t        j                  dt        d       t        j                  |      | _        y)z[Instantiate the manager.

        :Parameters:
          - `client`: a MongoClient
        zCursor managers are deprecated.   )
stacklevelN)warningswarnDeprecationWarningweakrefref_CursorManager__client)selfclients     Y/var/www/html/ranktracker/api/venv/lib/python3.12/site-packages/pymongo/cursor_manager.py__init__zCursorManager.__init__&   s+     	-	  F+    c                 |    t        |t              st        d      | j                         j	                  |g|       y)a2  Kill a cursor.

        Raises TypeError if cursor_id is not an instance of (int, long).

        :Parameters:
          - `cursor_id`: cursor id to close
          - `address`: the cursor's server's (host, port) pair

        .. versionchanged:: 3.0
           Now requires an `address` argument.
        zcursor_id must be an integerN)
isinstancer   	TypeErrorr   kill_cursors)r   	cursor_idaddresss      r   closezCursorManager.close2   s2     )]3:;;$$i[':r   N)__name__
__module____qualname____doc__r   r    r   r   r   r   #   s    5
,;r   r   )r   r	   r   bson.py3compatr   objectr   r   r   r   <module>r"      s!      (;F ;r   