/opt/cloudlinux/venv/lib/python3.11/site-packages/sqlalchemy/pool/__pycache__
Edit: /opt/cloudlinux/venv/lib/python3.11/site-packages/sqlalchemy/pool/__pycache__/base.cpython-311.pyc (43409B)
§
�—Øgqã óf — d Z ddlmZ ddlZddlZddlmZ ddlmZ ddlmZ ddlm Z dd lm
Z
dd
l
mZ e
j d¦ « Z
e
j d¦ « Z e
j d
¦ « Z G d„ de¦ « Z G d„ de j ¦ « Z G d„ de¦ « Z dd„Z e¦ « Z G d„ de¦ « ZdS )z'Base constructs for connection pools.
é )ÚdequeNé )Úevent)Úexc)Ú
interfaces)Úlog)Úutil)Ú threadingÚreset_rollbackÚreset_commitÚ
reset_nonec ó* — e Zd ZdZd„ Zd„ Zd„ Zd„ ZdS )Ú_ConnDialectzýpartial implementation of :class:`.Dialect`
which provides DBAPI connection methods.
When a :class:`_pool.Pool` is combined with an :class:`_engine.Engine`,
the :class:`_engine.Engine` replaces this with its own
:class:`.Dialect`.
c ó. — | ¦ « d S ©N)Úrollback©ÚselfÚdbapi_connections úh/builddir/build/BUILD/cloudlinux-venv-1.0.12/venv/lib64/python3.11/site-packages/sqlalchemy/pool/base.pyÚdo_rollbackz_ConnDialect.do_rollback) s € Ø×!Ò!Ñ#Ô#Ð#Ð#Ð#ó c ó. — | ¦ « d S r )Úcommitr s r Ú do_commitz_ConnDialect.do_commit, s € Ø×ÒÑ!Ô!Ð!Ð!Ð!r c ó. — | ¦ « d S r )Úcloser s r Údo_closez_ConnDialect.do_close/ s € Ø×ÒÑ Ô Ð Ð Ð r c ó — t d¦ « ‚)NzJThe ping feature requires that a dialect is passed to the connection pool.©ÚNotImplementedErrorr s r Údo_pingz_ConnDialect.do_ping2 s € Ý!ð
-ñ
ô
ð
r N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r r r r" © r r r r sZ € € € € € ðð ð$ð $ð $ð"ð "ð "ð!ð !ð !ð
ð
ð
ð
ð
r r c ó& — e Zd ZdZ e¦ « Z ej dd¬¦ « dd „¦ « Ze d
„ ¦ « Z
e
j d„ ¦ « Z
d„ Zd
„ Z
ej dd¦ « d„ ¦ « Zd„ Zd„ Zdd„Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ ZdS )ÚPoolz)Abstract base class for connection pools.)z1.3zkThe :paramref:`_pool.Pool.use_threadlocal` parameter is deprecated and will be removed in a future release.)ú0.7z¹:class:`.PoolListener` is deprecated in favor of the :class:`_events.PoolEvents` listener interface. The :paramref:`_pool.Pool.listeners` parameter will be removed in a future release.)Úuse_threadlocalÚ listenerséÿÿÿÿNFTc ó4 — |r|x| _ | _ nd| _ t j | |¬¦ « t j ¦ « | _ || _ || _ d| _ || _
|
| _ t j
|t ddgt g d¢t" dgidd ¬
¦ « | _ || _ |r| j |d ¬¦ « | r| | _ |r|D ]\ }}
t/ j | |
|¦ « Œ|r|D ]}| |¦ « ŒdS dS )a-
Construct a Pool.
:param creator: a callable function that returns a DB-API
connection object. The function will be called with
parameters.
:param recycle: If set to a value other than -1, number of
seconds between connection recycling, which means upon
checkout, if this timeout is surpassed the connection will be
closed and replaced with a newly opened connection. Defaults to -1.
:param logging_name: String identifier which will be used within
the "name" field of logging records generated within the
"sqlalchemy.pool" logger. Defaults to a hexstring of the object's
id.
:param echo: if True, the connection pool will log
informational output such as when connections are invalidated
as well as when connections are recycled to the default log handler,
which defaults to ``sys.stdout`` for output.. If set to the string
``"debug"``, the logging will include pool checkouts and checkins.
The :paramref:`_pool.Pool.echo` parameter can also be set from the
:func:`_sa.create_engine` call by using the
:paramref:`_sa.create_engine.echo_pool` parameter.
.. seealso::
:ref:`dbengine_logging` - further detail on how to configure
logging.
:param use_threadlocal: If set to True, repeated calls to
:meth:`connect` within the same application thread will be
guaranteed to return the same connection object that is already
checked out. This is a legacy use case and the flag has no
effect when using the pool with a :class:`_engine.Engine` object.
:param reset_on_return: Determine steps to take on
connections as they are returned to the pool.
reset_on_return can have any of these values:
* ``"rollback"`` - call rollback() on the connection,
to release locks and transaction resources.
This is the default value. The vast majority
of use cases should leave this value set.
* ``True`` - same as 'rollback', this is here for
backwards compatibility.
* ``"commit"`` - call commit() on the connection,
to release locks and transaction resources.
A commit here may be desirable for databases that
cache query plans if a commit is emitted,
such as Microsoft SQL Server. However, this
value is more dangerous than 'rollback' because
any data changes present on the transaction
are committed unconditionally.
* ``None`` - don't do anything on the connection.
This setting should generally only be made on a database
that has no transaction support at all,
namely MySQL MyISAM; when used on this backend, performance
can be improved as the "rollback" call is still expensive on
MySQL. It is **strongly recommended** that this setting not be
used for transaction-supporting databases in conjunction with
a persistent pool such as :class:`.QueuePool`, as it opens
the possibility for connections still in a transaction to be
idle in the pool. The setting may be appropriate in the
case of :class:`.NullPool` or special circumstances where
the connection pool in use is not being used to maintain connection
lifecycle.
* ``False`` - same as None, this is here for
backwards compatibility.
:param events: a list of 2-tuples, each of the form
``(callable, target)`` which will be passed to :func:`.event.listen`
upon construction. Provided here so that event listeners
can be assigned via :func:`_sa.create_engine` before dialect-level
listeners are applied.
:param listeners: A list of :class:`.PoolListener`-like objects or
dictionaries of callables that receive events when DB-API
connections are created, checked out and checked in to the
pool.
:param dialect: a :class:`.Dialect` that will handle the job
of calling rollback(), close(), or commit() on DBAPI connections.
If omitted, a built-in "stub" dialect is used. Applications that
make use of :func:`_sa.create_engine` should not use this parameter
as it is handled by the engine creation strategy.
.. versionadded:: 1.1 - ``dialect`` is now a public parameter
to the :class:`_pool.Pool`.
:param pre_ping: if True, the pool will emit a "ping" (typically
"SELECT 1", but is dialect-specific) on the connection
upon checkout, to test if the connection is alive or not. If not,
the connection is transparently re-connected and upon success, all
other pooled connections established prior to that timestamp are
invalidated. Requires that a dialect is passed as well to
interpret the disconnection error.
.. versionadded:: 1.2
N)Úechoflagr r T)ÚnoneNFr Úreset_on_returnF)Úresolve_symbol_names)Úonly_propagate)Úlogging_nameÚ_orig_logging_namer Úinstance_loggerr
ÚlocalÚ_threadconnsÚ_creatorÚ_recycleÚ_invalidate_timeÚ_use_threadlocalÚ _pre_pingr ÚsymbolÚparse_user_argumentr r
r Ú_reset_on_returnÚechoÚdispatchÚ_updateÚ_dialectr ÚlistenÚadd_listener)r ÚcreatorÚrecyclerA r+ r4 r1 r, ÚeventsÚdialectÚpre_pingÚ _dispatchÚfnÚtargetÚls r Ú__init__z
Pool.__init__? sp € ðH ð +Ø:FÐFˆDÔ Ô 7Ð 7à&*ˆDÔ#åÔ˜D¨4Ð0Ñ0Ô0Ð0Ý%œOÑ-Ô-ˆÔ؈Œ
؈Œ
Ø !ˆÔØ /ˆÔØ!ˆŒÝ $¤× ?Ò ?Øå ¨TÐ 2ÝÐ1Ð1Ð1ݘx˜jð
ð
Ø!&ð !@ñ !
ô !
ˆÔ𠈌 àð CØŒM×!Ò! )¸EÐ!ÑBÔBÐBØð $Ø#ˆDŒMØð /Ø$ð
/ð
/‘
��FÝ”˜T 6¨2Ñ.Ô.Ð.Ð.Øð %Øð
%ð
%�Ø×!Ò! !Ñ$Ô$Ð$Ð$ð %ð %ð
%ð
%r c ó — | j d S ©Nr9 )Ú__dict__©r s r r9 z
Pool._creatorç s € àŒ}˜ZÔ(Ð(r c óN — || j d<