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/sql/annotation.pyc
�
���ec@sdZddlmZddlmZddlmZddlmZddlm	Z	e	j
�Zdefd	��YZ
d
e
fd��YZde
fd
��YZdefd��YZiZd�Zded�Zdd�Zd�Zd�Zd�ZdS(s�The :class:`.Annotated` class and related routines; creates hash-equivalent
copies of SQL constructs which contain context-specific markers and
associations.

i(t	operators(tHasCacheKey(tanon_map(tInternalTraversali(tutiltSupportsAnnotationscBs)eZeZejd��Zd�ZRS(cCst�}|j|�S(N(Rt_gen_annotations_cache_key(tselft	anon_map_((sJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyt_annotations_cache_keys	csIdt�fd�gt|j�D]}||j|f^q"D��fS(Nt_annotationsc3sB|]8\}}|t|t�r3|j�g�n|fVqdS(N(t
isinstanceRt_gen_cache_key(t.0tkeytvalue(R(sJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pys	<genexpr>$s(ttupletsortedR
(RRR((RsJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyR s
(t__name__t
__module__tEMPTY_ANNOTATIONSR
Rtmemoized_propertyR	R(((sJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyRstSupportsCloneAnnotationscBs;eZdejfgZd�Zd�Zded�Z	RS(R
cCsK|j�}|jj|�|_|jjdd�|jjdd�|S(sgreturn a copy of this ClauseElement with annotations
        updated by the given dictionary.

        R	t_generate_cache_keyN(t_cloneR
tuniont__dict__tpoptNone(Rtvaluestnew((sJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyt	_annotate8s
cCsH|j�}tj|�|_|jjdd�|jjdd�|S(shreturn a copy of this ClauseElement with annotations
        replaced by the given dictionary.

        R	RN(RRt
immutabledictR
RRR(RRR((sJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyt_with_annotationsCs
cCsI|s|jrA|j�}tj�|_|jjdd�|S|SdS(s�return a copy of this :class:`_expression.ClauseElement`
        with annotations
        removed.

        :param values: optional tuple of individual values
         to remove.

        R	N(R
RRR RRR(RRtcloneR((sJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyt_deannotateNs	N(
RRRtdp_annotations_keyt%_clone_annotations_traverse_internalsRR!RtFalseR#(((sJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyR2s		tSupportsWrappingAnnotationscBs)eZd�Zd�Zded�ZRS(cCs
t||�S(sgreturn a copy of this ClauseElement with annotations
        updated by the given dictionary.

        (t	Annotated(RR((sJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyRcscCs
t||�S(shreturn a copy of this ClauseElement with annotations
        replaced by the given dictionary.

        (R((RR((sJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyR!jscCs|r|j�}|S|SdS(s�return a copy of this :class:`_expression.ClauseElement`
        with annotations
        removed.

        :param values: optional tuple of individual values
         to remove.

        N(R(RRR"ts((sJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyR#qs	N(RRRR!RR&R#(((sJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyR'bs		R(cBs�eZdZeZd�Zd�Zd�Zd�Zd
e
d�Zd�Ze
d��Zd�Zd	�Zd
�Zd�Ze
d��ZRS(sIclones a SupportsAnnotated and applies an 'annotations' dictionary.

    Unlike regular clones, this clone also mimics __hash__() and
    __cmp__() of the original element so that it takes its place
    in hashed collections.

    A reference to the original element is maintained, for the important
    reason of keeping its hash value current.  When GC'ed, the
    hash value may be reused, causing conflicts.

    .. note::  The rationale for Annotated producing a brand new class,
       rather than placing the functionality directly within ClauseElement,
       is **performance**.  The __hash__() method is absent on plain
       ClauseElement which leads to significantly reduced function call
       overhead, as the use of sets and dictionaries against ClauseElement
       objects is prevalent, but most are not "annotated".

    cGsg|stj|�S|\}}yt|j}Wn#tk
rUt|j|�}nXtj|�SdS(N(tobjectt__new__tannotated_classest	__class__tKeyErrort_new_annotation_type(tclstargstelementR((sJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyR+�s

cCsf|jj�|_|jjdd�|jjdd�||_tj|�|_t|�|_	dS(NR	R(
RtcopyRRt_Annotated__elementRR R
thasht_hash(RR2R((sJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyt__init__�s	cCs|jj|�}|j|�S(N(R
RR!(RRt_values((sJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyR�scCsZ|jj|j�}|jj�|_|jjdd�|jjdd�||_|S(NR	R(R-R+RR3RRR
(RRR"((sJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyR!�s	csF�dkr|jS|jtj�fd�|jj�D���SdS(Ncs+i|]!\}}|�kr||�qS(((R
RR(R(sJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pys
<dictcomp>�s		(RR4R!RR R
titems(RRR"((RsJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyR#�scKs|jjj|||�S(N(R4R-t_compiler_dispatch(Rtvisitortkw((sJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyR:�scCs
|jjS(N(R4t_constructor(R((sJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyR=�scKsO|jj|�}||jkr%|S|jj|j�|j||j�SdS(N(R4RRtupdateR-R
(RR<R"((sJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyR�s
cCs|j|j|jffS(N(R-R4R
(R((sJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyt
__reduce__�scCs|jS(N(R6(R((sJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyt__hash__�scCs9|jr|jjj||�St|�t|�kSdS(N(t_is_column_operatorsR4R-t__eq__R5(Rtother((sJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyRB�s	cCs+d|jkr|jdjS|jjSdS(Ntentity_namespace(R
RDR4(R((sJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyRD�sN(RRt__doc__R&RAR+R7RR!RtTrueR#R:tpropertyR=RR?R@RBRD(((sJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyR(�s									cCs0y
|j}Wntk
r!|SX||�SdS(N(RtAttributeError(tto_annotatetannotationsR((sJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyt_safe_annotate�s


csFi������fd��|dk	r<�|�}nd�|S(s�Deep copy the given ClauseElement, annotating each element
    with the given annotations dictionary.

    Elements within the exclude collection will be cloned but not annotated.

    cs��|d<t|�}|�kr*�|S�rit|d�ri|jj��ri|jd�|�}nW�|jkr��r�|jr�t|jd�|���}q�t|��}n|}|jd��|�|<|S(Ntdetect_subquery_colst	proxy_setR"(	tidthasattrRMtintersectionRR
t
_is_immutableRKt_copy_internals(telemR<tid_tnewelem(RJR"t
cloned_idsRLtexclude(sJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyR"s"

N(R(R2RJRWRL((RJR"RVRLRWsJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyt_deep_annotates
cs@i����fd��|dk	r6�|�}nd�|S(s2Deep copy the given element, removing annotations.csi�rt|�}n|}|�kr]|jd�dt�}|jd��|�|<|S�|SdS(NRR"(RNR#RFRR(RSR<RRU(R"tclonedR(sJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyR"5s
N(R(R2R((R"RYRsJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyt_deep_deannotate0scCs|j|�}|j�|S(s
Annotate the given ClauseElement and copy its internals so that
    internal objects refer to the new annotated object.

    Basically used to apply a "don't traverse" annotation to a
    selectable, without digging throughout the whole
    structure wasting time.
    (RRR(R2RJ((sJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyt_shallow_annotateIs
cCs8t|t�r|S|tkr't|Sx+|jD] }|tkr1t|}Pq1q1Wtd|j||fi�t|<}|t�d|j<d|jkr�t|j	�dt
jfg|_	n:|jjdt
�r�t|j	�dt
jfg|_	n|jjdt
�rt|_nt|tj�|_|S(NsAnnotated%st_traverse_internalsR
t
inherit_cache(t
issubclassR(R,t__mro__ttypeRtglobalsRtlistR\RR$tgetR&RFR]RtColumnOperatorsRA(R0tbase_clstsuper_tanno_cls((sJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyR/Vs*
$cCs+x$tj|�D]}t||�qWdS(N(Rtwalk_subclassesR/(ttarget_hierarchyReR0((sJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyt_prepare_annotations|sN(REtRtbaseRt
traversalsRtvisitorsRRR RR*RRR'R(R,RKRR&RXRZR[R/Rj(((sJ/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyt<module>s"0q	
.	
	&