HEX
Server: LiteSpeed
System: Linux us-phx-web1284.main-hosting.eu 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: u300739242 (300739242)
PHP: 8.2.30
Disabled: system, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/engine/util.pyc
�
���ec@s�ddlmZddlmZddlmZddlmZd�ZdZej�Zd�Zd�Z	d�Z
d	efd
��YZdS(
i(texc(tutil(tcollections_abc(t
immutabledictcstj�fd��}|S(s�Decorator, memoize a function in a connection.info stash.

    Only applicable to functions which take no arguments other than a
    connection.  The memo will be stored in ``connection.info[key]``.
    csN|j�}y|j�SWn,tk
rI|||�|j�<}|SXdS(N(tconnecttinfotKeyError(tfntselft
connectiontval(tkey(sG/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/engine/util.pyt	decorateds
(Rt	decorator(RR((RsG/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/engine/util.pytconnection_memoizes	cCs�|s$|r|j�|gSgSn�t|�dkr�|d}t|ttf�r�|s�t|dd�r�t|dd�r�|S|gSq�t|d�r�|gS|j�|ggSn<|j�t|dd�r�t|dd�r�|S|gSdS(sGiven arguments from the calling form \*multiparams, \**params,
    return a list of bind parameter structures, usually a list of
    dictionaries.

    In the case of 'raw' execution which accepts positional parameters,
    it may be a list of tuples or lists.

    iit__iter__tstriptkeysN(t_warn_for_legacy_exec_formattlent
isinstancetlistttuplethasattr(R	tmultiparamstparamstzero((sG/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/engine/util.pyt_distill_params%s,






cCs�|s|r|gSgSn�t|�dkr�|d}t|ttf�r�|syt|dd�r}t|dd�r}|S|gSq�t|d�r�|gS|ggSn2t|dd�r�t|dd�r�|S|gSdS(s�_distill_params without any warnings.  more appropriate for
    "cursor" params that can include tuple arguments, lists of tuples,
    etc.

    iiRRRN(RRRRR(R	RRR((sG/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/engine/util.pyt_distill_cursor_paramsXs&


cCs�|dkrttfSt|t�rg|rZt|dtjtf�rZtj	d��n|ftfSt|tt
tf�s�t|tj�r�|ftfStj	d��dS(Nis9List argument must consist only of tuples or dictionariess+mapping or sequence expected for parameters(tNonet	_no_tuplet_no_kwRRRtMappingRRt
ArgumentErrortdictR(R((sG/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/engine/util.pyt_distill_params_20�s
	

tTransactionalContextcBsYeZdZdZd�Zd�Zd�Zd�Ze	d��Z
d�Zd�ZRS(	s�Apply Python context manager behavior to transaction objects.

    Performs validation to ensure the subject of the transaction is not
    used if the transaction were ended prematurely.

    cCs
t��dS(N(tNotImplementedError(R((sG/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/engine/util.pyt_transaction_is_active�scCs
t��dS(N(R%(R((sG/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/engine/util.pyt_transaction_is_closed�scCs
t��dS(sindicates the object is in a state that is known to be acceptable
        for rollback() to be called.

        This does not necessarily mean rollback() will succeed or not raise
        an error, just that there is currently no state detected that indicates
        rollback() would fail or emit warnings.

        It also does not mean that there's a transaction in progress, as
        it is usually safe to call rollback() even if no transaction is
        present.

        .. versionadded:: 1.4.28

        N(R%(R((sG/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/engine/util.pyt_rollback_can_be_called�scCs
t��dS(N(R%(R((sG/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/engine/util.pyt_get_subject�scCs4|j}|r0|j�s0tjd��q0ndS(Ns�Can't operate on closed transaction inside context manager.  Please complete the context manager before emitting further commands.(t_trans_context_managerR&RtInvalidRequestError(tclstsubjectt
trans_context((sG/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/engine/util.pyt_trans_ctx_check�s
	cCs4|j�}|j}||_||_||_|S(N(R)R*t_outer_trans_ctxt_trans_subject(RR-R.((sG/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/engine/util.pyt	__enter__�s				cCs"|j}|dkp!|j|k	}|dkr�|j�r�zHy|j�Wn3tj��|j�ry|j�nWdQXnXWd|s�|j	|_nd|_|_	XnnzE|j�s�|j
�s�|j�q�n|j�r�|j�nWd|s
|j	|_nd|_|_	XdS(N(R1RR*R&tcommitRtsafe_reraiseR(trollbackR0R'tclose(Rttype_tvaluet	tracebackR-tout_of_band_exit((sG/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/engine/util.pyt__exit__�s,	

N(
t__name__t
__module__t__doc__RR1R&R'R(R)tclassmethodR/R2R;(((sG/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/engine/util.pyR$�s					N((
tRRRRRRRRRR#tobjectR$(((sG/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/engine/util.pyt<module>s		3	.