+
    ˜h©j�4  ã                  ó  € ^ RI Ht ^ RIt^ RIHt ^ RIHt ^ RIHt ^ RIHt ^RIHt ^RIH	t	 ^R	IH
t
 ^R
IHt ^RIHt ^RIHt ]P                  '       d   ^RIHt ^RIHt  ! R R]P(                  ]	,          4      tR# )é    )ÚannotationsN)ÚAny)ÚOptional)ÚType)ÚUnion)ÚConnectionPoolEntry)ÚPool)ÚPoolProxiedConnection)ÚPoolResetState)Úevent)Úutil)ÚEngine)ÚDBAPIConnectionc                  ó$  € ] tR t^tRtRt]t]P                  ! R4      ]
R R l4       4       t]
R R l4       tR R	 ltR
 R ltR R ltR R lt]P$                  ! RRR.R 4      R R l4       tR R ltR R ltR R ltR R ltR R ltR tR!# )"Ú
PoolEventsaz  Available events for :class:`_pool.Pool`.

The methods here define the name of an event as well
as the names of members that are passed to listener
functions.

When using an :class:`.Engine` object created via :func:`_sa.create_engine`
(or indirectly via :func:`.create_async_engine`), :class:`.PoolEvents`
listeners are expected to be registered in terms of the :class:`.Engine`,
which will direct the listeners to the :class:`.Pool` contained within::

    from sqlalchemy import create_engine
    from sqlalchemy import event

    engine = create_engine("postgresql+psycopg2://scott:tiger@localhost/test")


    @event.listens_for(engine, "checkout")
    def my_on_checkout(dbapi_conn, connection_rec, connection_proxy):
        "handle an on checkout event"

:class:`.PoolEvents` may also be registered with the :class:`_pool.Pool`
class, with the :class:`.Engine` class, as well as with instances of
:class:`_pool.Pool`.

.. tip::

    Registering :class:`.PoolEvents` with the :class:`.Engine`, if present,
    is recommended since the :meth:`.Engine.dispose` method will carry
    along event listeners from the old pool to the new pool.

ÚSomeEngineOrPoolzsqlalchemy.enginec               ó$   € V ^8„  d   QhRRRRRR/# )é   Útargetz-Union[Pool, Type[Pool], Engine, Type[Engine]]Ú
identifierÚstrÚreturnz!Optional[Union[Pool, Type[Pool]]]© )Úformats   "ÚQ/var/www/html/bestweb/venv/lib/python3.14/site-packages/sqlalchemy/pool/events.pyÚ__annotate__ÚPoolEvents.__annotate__B   s(   € ÷ ñ à=ðð ðð 
+ñ	ó    c                	ó¾  € \         P                  '       g%   \        P                  P                  P
                  p\        V\        4      '       d3   \        VX4      '       d   \        # \        V\        4      '       g   Q hV# \        VX4      '       d   VP                  # \        V\        4      '       d   V# \        VR 4      '       d   VP                  4        R# R# )Ú_no_async_engine_eventsN)ÚtypingÚTYPE_CHECKINGr   Ú	preloadedÚenginer   Ú
isinstanceÚtypeÚ
issubclassr	   ÚpoolÚhasattrr    )Úclsr   r   r   s   &&& r   Ú_accept_withÚPoolEvents._accept_with@   s¢   € ô ×#×#Ð#Ü—^‘^×*Ñ*×1Ñ1ˆFä�fœd×#Ò#Ü˜& &×)Ò)Ü�ä! &¬$×/Ò/Ð/Ð/Ø�Ü˜ ×'Ò'Ø—;‘;ÐÜ˜¤×%Ò%ØˆMÜ�VÐ6×7Ò7Ø×*Ñ*Ö,ár   c               ó$   € V ^8„  d   QhRRRRRR/# )r   Ú	event_keyzevent._EventKey[Pool]Úkwr   r   ÚNoner   )r   s   "r   r   r   Z   s(   € ÷ 	$ñ 	$à(ð	$ð ð	$ð 
ñ		$r   c                	óz   € VP                   pVP                  R VP                  4       VP                  ! R/ VB  R# )ÚasyncioNr   )Údispatch_targetÚ
setdefaultÚ_is_asyncioÚbase_listen)r*   r.   r/   r   s   &&, r   Ú_listenÚPoolEvents._listenY   s4   € ð ×*Ñ*ˆà
�‰�i ×!3Ñ!3Ô4à×ÒÑ# Ô#r   c               ó$   € V ^8„  d   QhRRRRRR/# ©r   Údbapi_connectionr   Úconnection_recordr   r   r0   r   )r   s   "r   r   r   e   s(   € ÷ ñ à)ðð /ðð 
ñ	r   c                ó   € R# )a×  Called at the moment a particular DBAPI connection is first
created for a given :class:`_pool.Pool`.

This event allows one to capture the point directly after which
the DBAPI module-level ``.connect()`` method has been used in order
to produce a new DBAPI connection.

:param dbapi_connection: a DBAPI connection.
 The :attr:`.ConnectionPoolEntry.dbapi_connection` attribute.

:param connection_record: the :class:`.ConnectionPoolEntry` managing
 the DBAPI connection.

Nr   ©Úselfr;   r<   s   &&&r   ÚconnectÚPoolEvents.connecte   ó   ‚ r   c               ó$   € V ^8„  d   QhRRRRRR/# r:   r   )r   s   "r   r   r   y   s(   € ÷ ñ à)ðð /ðð 
ñ	r   c                ó   € R# )a™  Called exactly once for the first time a DBAPI connection is
checked out from a particular :class:`_pool.Pool`.

The rationale for :meth:`_events.PoolEvents.first_connect`
is to determine
information about a particular series of database connections based
on the settings used for all connections.  Since a particular
:class:`_pool.Pool`
refers to a single "creator" function (which in terms
of a :class:`_engine.Engine`
refers to the URL and connection options used),
it is typically valid to make observations about a single connection
that can be safely assumed to be valid about all subsequent
connections, such as the database version, the server and client
encoding settings, collation settings, and many others.

:param dbapi_connection: a DBAPI connection.
 The :attr:`.ConnectionPoolEntry.dbapi_connection` attribute.

:param connection_record: the :class:`.ConnectionPoolEntry` managing
 the DBAPI connection.

Nr   r>   s   &&&r   Úfirst_connectÚPoolEvents.first_connecty   rB   r   c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r   r;   r   r<   r   Úconnection_proxyr
   r   r0   r   )r   s   "r   r   r   –   s2   € ÷ ñ à)ðð /ðð 0ð	ð
 
ñr   c                ó   € R# )a  Called when a connection is retrieved from the Pool.

:param dbapi_connection: a DBAPI connection.
 The :attr:`.ConnectionPoolEntry.dbapi_connection` attribute.

:param connection_record: the :class:`.ConnectionPoolEntry` managing
 the DBAPI connection.

:param connection_proxy: the :class:`.PoolProxiedConnection` object
  which will proxy the public interface of the DBAPI connection for the
  lifespan of the checkout.

If you raise a :class:`~sqlalchemy.exc.DisconnectionError`, the current
connection will be disposed and a fresh connection retrieved.
Processing of all checkout listeners will abort and restart
using the new connection.

.. seealso:: :meth:`_events.ConnectionEvents.engine_connect`
   - a similar event
   which occurs upon creation of a new :class:`_engine.Connection`.

Nr   )r?   r;   r<   rH   s   &&&&r   ÚcheckoutÚPoolEvents.checkout–   rB   r   c               ó$   € V ^8„  d   QhRRRRRR/# )r   r;   zOptional[DBAPIConnection]r<   r   r   r0   r   )r   s   "r   r   r   ³   s(   € ÷ ñ à3ðð /ðð 
ñ	r   c                ó   € R# )a¶  Called when a connection returns to the pool.

Note that the connection may be closed, and may be None if the
connection has been invalidated.  ``checkin`` will not be called
for detached connections.  (They do not return to the pool.)

:param dbapi_connection: a DBAPI connection.
 The :attr:`.ConnectionPoolEntry.dbapi_connection` attribute.

:param connection_record: the :class:`.ConnectionPoolEntry` managing
 the DBAPI connection.

Nr   r>   s   &&&r   ÚcheckinÚPoolEvents.checkin³   rB   r   z2.0r;   r<   c                	ó
   € V V3# )Nr   )r;   r<   Úreset_states   &&&r   Ú<lambda>ÚPoolEvents.<lambda>É   s   € ØØñB
r   c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r   r;   r   r<   r   rQ   r   r   r0   r   )r   s   "r   r   r   Î   s2   € ÷ 6ñ 6à)ð6ð /ð6ð $ð	6ð
 
ñ6r   c                ó   € R# )a‡  Called before the "reset" action occurs for a pooled connection.

This event represents
when the ``rollback()`` method is called on the DBAPI connection
before it is returned to the pool or discarded.
A custom "reset" strategy may be implemented using this event hook,
which may also be combined with disabling the default "reset"
behavior using the :paramref:`_pool.Pool.reset_on_return` parameter.

The primary difference between the :meth:`_events.PoolEvents.reset` and
:meth:`_events.PoolEvents.checkin` events are that
:meth:`_events.PoolEvents.reset` is called not just for pooled
connections that are being returned to the pool, but also for
connections that were detached using the
:meth:`_engine.Connection.detach` method as well as asyncio connections
that are being discarded due to garbage collection taking place on
connections before the connection was checked in.

Note that the event **is not** invoked for connections that were
invalidated using :meth:`_engine.Connection.invalidate`.    These
events may be intercepted using the :meth:`.PoolEvents.soft_invalidate`
and :meth:`.PoolEvents.invalidate` event hooks, and all "connection
close" events may be intercepted using :meth:`.PoolEvents.close`.

The :meth:`_events.PoolEvents.reset` event is usually followed by the
:meth:`_events.PoolEvents.checkin` event, except in those
cases where the connection is discarded immediately after reset.

:param dbapi_connection: a DBAPI connection.
 The :attr:`.ConnectionPoolEntry.dbapi_connection` attribute.

:param connection_record: the :class:`.ConnectionPoolEntry` managing
 the DBAPI connection.

:param reset_state: :class:`.PoolResetState` instance which provides
 information about the circumstances under which the connection
 is being reset.

 .. versionadded:: 2.0

.. seealso::

    :ref:`pool_reset_on_return`

    :meth:`_events.ConnectionEvents.rollback`

    :meth:`_events.ConnectionEvents.commit`

Nr   )r?   r;   r<   rQ   s   &&&&r   ÚresetÚPoolEvents.resetÆ   rB   r   c               ó(   € V ^8„  d   QhRRRRRRRR/# ©	r   r;   r   r<   r   Ú	exceptionzOptional[BaseException]r   r0   r   )r   s   "r   r   r     s2   € ÷ ñ à)ðð /ðð +ð	ð
 
ñr   c                ó   € R# )a±  Called when a DBAPI connection is to be "invalidated".

This event is called any time the
:meth:`.ConnectionPoolEntry.invalidate` method is invoked, either from
API usage or via "auto-invalidation", without the ``soft`` flag.

The event occurs before a final attempt to call ``.close()`` on the
connection occurs.

:param dbapi_connection: a DBAPI connection.
 The :attr:`.ConnectionPoolEntry.dbapi_connection` attribute.

:param connection_record: the :class:`.ConnectionPoolEntry` managing
 the DBAPI connection.

:param exception: the exception object corresponding to the reason
 for this invalidation, if any.  May be ``None``.

.. seealso::

    :ref:`pool_connection_invalidation`

Nr   ©r?   r;   r<   rZ   s   &&&&r   Ú
invalidateÚPoolEvents.invalidate  rB   r   c               ó(   € V ^8„  d   QhRRRRRRRR/# rY   r   )r   s   "r   r   r   $  s2   € ÷ ñ à)ðð /ðð +ð	ð
 
ñr   c                ó   € R# )aÞ  Called when a DBAPI connection is to be "soft invalidated".

This event is called any time the
:meth:`.ConnectionPoolEntry.invalidate`
method is invoked with the ``soft`` flag.

Soft invalidation refers to when the connection record that tracks
this connection will force a reconnect after the current connection
is checked in.   It does not actively close the dbapi_connection
at the point at which it is called.

:param dbapi_connection: a DBAPI connection.
 The :attr:`.ConnectionPoolEntry.dbapi_connection` attribute.

:param connection_record: the :class:`.ConnectionPoolEntry` managing
 the DBAPI connection.

:param exception: the exception object corresponding to the reason
 for this invalidation, if any.  May be ``None``.

Nr   r\   s   &&&&r   Úsoft_invalidateÚPoolEvents.soft_invalidate$  rB   r   c               ó$   € V ^8„  d   QhRRRRRR/# r:   r   )r   s   "r   r   r   @  s(   € ÷ ñ à)ðð /ðð 
ñ	r   c                ó   € R# )am  Called when a DBAPI connection is closed.

The event is emitted before the close occurs.

The close of a connection can fail; typically this is because
the connection is already closed.  If the close operation fails,
the connection is discarded.

The :meth:`.close` event corresponds to a connection that's still
associated with the pool. To intercept close events for detached
connections use :meth:`.close_detached`.

:param dbapi_connection: a DBAPI connection.
 The :attr:`.ConnectionPoolEntry.dbapi_connection` attribute.

:param connection_record: the :class:`.ConnectionPoolEntry` managing
 the DBAPI connection.

Nr   r>   s   &&&r   ÚcloseÚPoolEvents.close@  rB   r   c               ó$   € V ^8„  d   QhRRRRRR/# r:   r   )r   s   "r   r   r   Y  s(   € ÷ ñ à)ðð /ðð 
ñ	r   c                ó   € R# )a~  Called when a DBAPI connection is "detached" from a pool.

This event is emitted after the detach occurs.  The connection
is no longer associated with the given connection record.

:param dbapi_connection: a DBAPI connection.
 The :attr:`.ConnectionPoolEntry.dbapi_connection` attribute.

:param connection_record: the :class:`.ConnectionPoolEntry` managing
 the DBAPI connection.

Nr   r>   s   &&&r   ÚdetachÚPoolEvents.detachY  rB   r   c               ó    € V ^8„  d   QhRRRR/# )r   r;   r   r   r0   r   )r   s   "r   r   r   k  s   € ÷ ñ ¨ð À4ñ r   c                ó   € R# )al  Called when a detached DBAPI connection is closed.

The event is emitted before the close occurs.

The close of a connection can fail; typically this is because
the connection is already closed.  If the close operation fails,
the connection is discarded.

:param dbapi_connection: a DBAPI connection.
 The :attr:`.ConnectionPoolEntry.dbapi_connection` attribute.

Nr   )r?   r;   s   &&r   Úclose_detachedÚPoolEvents.close_detachedk  rB   r   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú_target_class_docr	   Ú_dispatch_targetr   Úpreload_moduleÚclassmethodr+   r7   r@   rE   rJ   rN   r   Ú_legacy_signaturerV   r]   ra   re   ri   rm   Ú__static_attributes__r   r   r   r   r      s³   † ñðB +ÐØÐà	×ÒÐ,Ó-Øôó ó .ðð. ô	$ó ð	$õõ(õ:õ:ð& ×ÒØØ	Ð0Ð1ñ	
óô6óð6õpõ<õ8õ2÷$ñ r   r   )Ú
__future__r   r!   r   r   r   r   Úbaser   r	   r
   r   Ú r   r   r"   r$   r   Úengine.interfacesr   ÚEventsr   r   r   r   Ú<module>r      sT   ðõ #ã Ý Ý Ý Ý å %Ý Ý 'Ý  Ý Ý à	××ÐÝÝ3ô\�—‘˜dÕ#ö \r   