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/util/langhelpers.pyc
�
���ec@sndZddlZddlmZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
mZddl
mZddl
mZd	�Zd
efd��YZd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zdd�Zdefd��YZ d�Z!dd�Z"d�Z#e$e$d�Z%e&d�Z'e&d�Z(d_d`dad�Z)d �Z*d!�Z+dbddcd"�Z,d#efd$��YZ-d%�Z.d&�Z/ddd'dd(�Z0d)�Z1dddd*�Z2d+efd,��YZ3d-�Z4d.efd/��YZ5d0efd1��YZ6d2�Z7d3�Z8d4�Z9e&dd5�Z:d6�Z;d7�Z<d8�Z=dd9�Z>d:�Z?d;�Z@d<eAfd=��YZBd>efd?��YZCd@efdA��YZDdBeEfdC��YZFdDeF_GdDefdE��YZHdaIdF�ZJdG�ZKdHdI�ZLdJejMfdK��YZNddL�ZOdM�ZPdddN�ZQdO�ZRejSdP�ZTejSdQ�ZUeUeTdR�ZVeWd�ZXdS�ZYdTeWfdU��YZZdV�Z[dW�Z\dX�Z]dY�Z^dZ�Z_ejSd[�Z`d\�Zad]�Zbd^�ZcdS(ds�Routines to help with the creation, loading and introspection of
modules, classes, hierarchies, attributes, functions, and methods.

i����N(tupdate_wrapperi(t_collections(tcompati(texccCs>tjr|jd�}ntj�}|j|�|j�S(Nsutf-8(Rtpy3ktencodethashlibtmd5tupdatet	hexdigest(txtm((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytmd5_hexs
	
tsafe_reraisecBs2eZdZdZed�Zd�Zd�ZRS(sKReraise an exception after invoking some
    handler code.

    Stores the existing exception info before
    invoking so that it is maintained across a potential
    coroutine context switch.

    e.g.::

        try:
            sess.commit()
        except:
            with safe_reraise():
                sess.rollback()

    t	warn_onlyt	_exc_infocCs
||_dS(N(R(tselfR((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyt__init__:scCstj�|_dS(N(tsystexc_infoR(R((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyt	__enter__=scCs�|dkrI|j\}}}d|_|js�tj|d|�q�natjr�|jr�|jdr�td|jd|jdf�nd|_tj|d|�dS(Ntwith_tracebackisfAn exception has occurred during handling of a previous exception.  The previous exception is:
 %s %s
i(tNoneRRRtraise_Rtwarn(Rttype_tvaluet	tracebacktexc_typet	exc_valuetexc_tb((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyt__exit__@s		
 	(RR(t__name__t
__module__t__doc__t	__slots__tFalseRRR(((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR
&s
	ccsft�}|g}xM|ra|j�}||kr9qn
|j|�|j|j��|VqWdS(N(tsettpoptaddtextendt__subclasses__(tclstseentstack((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytwalk_subclassesWs			
cCsAt|tj�r|Syt|�SWntk
r<d|SXdS(Nsunprintable element %r(t
isinstanceRtstring_typeststrt	Exception(telement((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytstring_or_unprintablees
cCs&djd�tjd|j�D��S(Nt css|]}|j�VqdS(N(tlower(t.0tn((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pys	<genexpr>qss
([A-Z][a-z]+)(tjointretfindallR (R*((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytclsname_as_plain_nameoscCsCt|t�s|j}n|}|j}t||�}||kS(s1Return True if the two class methods don't match.(R.ttypet	__class__R tgetattr(tinstance_or_clstagainst_methodtcurrent_clstmethod_nametcurrent_method((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytmethod_is_overriddenus	cCs^g}xK|j|j|jfD]1}t|d�rC|j�}n|j|�qWt|�S(srdecode a slice object as sent to __getitem__.

    takes into account the 2.5 __index__() method, basically.

    t	__index__(tstarttstoptstepthasattrREtappendttuple(tslctretR
((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytdecode_slice�sc's�t|�}x�|D]y�tj�ftj�fd�td���}x@|D](}||krP|j|�|VPqPqPWtd���qWdS(Ncs�t|�S(N(R0(ti(tbase(sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyt<lambda>�ti�s&exhausted namespace for symbol base %s(R%t	itertoolstchainRtitertools_imaptrangeR't	NameError(tusedtbasestpooltsym((RPsL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyt_unique_symbols�s
$

ccs5x.|r0||d@}||�V||N}qWdS(s6Call the given function given each nonzero bit from n.iN((tfnR7tb((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytmap_bits�s	cs�fd�}t|��S(s'A signature-matching decorator factory.c	s=tj|�r/tj|�r/td��ntj|�}i}t||�}t|d�|dd!|jf}t	|dd�\}}t
d|d|�}|jt|dt
��|j|d<d	|}|ji�|6||6|jd
6�t|||j�}t|d|�j|_||_t||�S(Nsnot a decoratable functioniiittargetR]tgroupedtnamesDdef %(name)s(%(args)s):
    return %(target)s(%(fn)s, %(apply_kw)s)
R t__func__(tinspectt
isfunctiontismethodR1Rtinspect_getfullargspect!_update_argspec_defaults_into_envRKR R\tdictRtformat_argspec_plusR$R!t_exec_code_in_envR>t__defaults__t__wrapped__R(	R]tspectenvtnamest	targ_nametfn_nametmetadatatcodet	decorated(R`(sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytdecorate�s" %
%	(R(R`Rv((R`sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyt	decorator�scCs�|jr�g}d}xa|jD]V}t|�jdkrhd|}|||<|j|�|d7}q|j|�qWt|�}t|�|d<tj|�S|SdS(	sCgiven a FullArgSpec, convert defaults to be symbol names in an env.itbuiltinst__builtin__sx%diiN(RxRy(tdefaultsR<R!RJtlistRKRtFullArgSpec(RnRotnew_defaultsROtargRbtelem((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyRh�s	




cBs||U||S(N((RtRoRr((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyRk�scBs"e|e�rD|j}|}d|r-|n
d|j|f}n|}}d|}|jd�d}ej|�}|dd=e|de�}||d<d	|}	i|d
6e	d6|j
d6}
|	|
U|
|}e|d
�rR|j\}}
|j
}|dkr'd|j
|jf}ne|d|
||fd�}||_
n|j
|_
d|jdd�d|_
|j
ejkr�ed|j
f��nejs�e|d�r�||j_
e|jd
�s||f|j_qn*||_
e|d
�s||f|_n|S(s�Produce a wrapping function for the given cls or classmethod.

    Rationale here is so that the __init__ method of the
    class can serve as documentation for the function.

    s�Construct a new :class:`%s` object. 

This constructor is mirrored as a public API function; see :func:`sqlalchemy%s` for a full usage and argument description.s.%ssSThis function is mirrored; see :func:`sqlalchemy%s` for a description of arguments.t.i����iRaRbs5def %(name)s(%(args)s):
    return cls(%(apply_kw)s)
R*tsymbolR t
_linked_tos%s.%ss�.. container:: inherited_member

    This documentation is inherited from :func:`sqlalchemy%s`; this constructor, :func:`sqlalchemy%s`,   creates a :class:`sqlalchemy%s` object.  See that class for additional details describing this subclass.it
sqlalchemys0public_factory location %s is not in sys.modulesRcN(R.R<RR tsplitRRgRjR$R�R!RIR�R"Rtinject_docstring_texttrsplitRtmodulestImportErrortpy2kRc(R`tlocationtclass_locationR]t	callable_tdoct
location_nameRnRsRtRoRut	linked_totlinked_to_locationt
linked_to_doc((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytpublic_factory�s^	




	
		tPluginLoadercBs/eZdd�Zd�Zd�Zd�ZRS(cCs||_i|_||_dS(N(tgrouptimplstauto_fn(RR�R�((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR@s		cCs|jj�dS(N(R�tclear(R((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR�EscCs�||jkr|j|�S|jrR|j|�}|rR||j|<|�SnxCtj|j�D]/}|j|kre|j|j|<|j�SqeWtjd|j|f��dS(NsCan't load plugin: %s:%s(	R�R�Rtimportlib_metadata_getR�RbtloadRtNoSuchModuleError(RRbtloadertimpl((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR�Hs	

cs#��fd�}||j|<dS(NcsItj��}x*�jd�dD]}t||�}q#Wt|��S(NR�i(Rtimport_R�R>(tmodttoken(t
modulepathtobjname(sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR�\s(R�(RRbR�R�R�((R�R�sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytregister[sN(R R!RRR�R�R�(((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR�?s		cCsy
tj}Wn5tk
rDtj|�}|dt|d�fSX|j}|j}t|j	| �t|j
|@�fSdS(Nii(RdtCO_VARKEYWORDStAttributeErrorRRgtboolt__code__tco_argcountR{tco_varnamestco_flags(R]tco_varkeywordsRntcotnargs((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyt_inspect_func_argses

		cCs�|dk}|rt�}n|jjdt�}|o]t|tj�o]t|jtj	�}|r�t
|�\}}|j|�|r�|r�dSn|s�|r�x-|jD]}t
||�dkr�Pq�q�Wn|jd�|S(seReturn the full set of inherited kwargs for the given `cls`.

    Probes a class's __init__ method, collecting all named arguments.  If the
    __init__ defines a \**kwargs catch-all, then the constructor is presumed
    to pass along unrecognized keywords to its base classes, and the
    collection process is repeated recursively on each of the bases.

    Uses a subset of inspect.getfullargspec() to cut down on method overhead,
    as this is used within the Core typing system to create copies of type
    objects which is a performance-sensitive operation.

    No anonymous tuple arguments please !

    RRN(RR%t__dict__tgetR$R.ttypestFunctionTypeR�tCodeTypeR�Rt	__bases__tget_cls_kwargstdiscard(R*t_setttopleveltctrthas_initRpthas_kwtc((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR�ys$


cCstj|�dS(s�Return the set of legal kwargs for the given `func`.

    Uses getargspec so is safe to call for methods, functions,
    etc.

    i(RRg(tfunc((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytget_func_kwargs�scCs�tj|�r"td|��n�tj|�r�|r�|r�tj|�}tj|jd|j|j	|j
|j|j|j
�Stj|�Sntj|�r|r|s�|jrtj|j�}tj|jd|j|j	|j
|j|j|j
�Stj|j�Sn�tj|�r=t|jd|dt�St|d�r\tj|j�St|d�r�tj|j�r�t|jd|�Std|��ntd|��dS(	s�Return the argument signature for any callable.

    All pure-Python callables are accepted, including
    functions, methods, classes, objects with __call__;
    builtins and other edge cases like functools.partial() objects
    raise a TypeError.

    sCan't inspect builtin: %sitno_selft_is_initRct__call__sCan't inspect callable: %sN(Rdt	isbuiltint	TypeErrorReRRgR|targstvarargstvarkwRzt
kwonlyargstkwonlydefaultstannotationsRft__self__Rctisclasstget_callable_argspecRtTrueRIR�(R]R�R�Rn((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR��sH	



cCs;tj|�r!tj|�}n|}tj|�}tj|d|d|dd|d�}|dr�|dd}tj|dd|d|dd|d�}n-|dr�d|d}|}nd}|}d}|dr�|t|d�7}n|dr |t|d�7}n|d|d}|rI|d|}	nd}	tj||d|d|	dd��}
|dr�tj|d|d|d|	dd	��}n|
}|r�td
|d|d|d
|
d|d|�Std
|dd!d|d|dd!d
|
dd!d|dd!d|dd!�SdS(sReturns a dictionary of formatted, introspected function arguments.

    A enhanced variant of inspect.formatargspec to support code generation.

    fn
       An inspectable callable or tuple of inspect getargspec() results.
    grouped
      Defaults to True; include (parens, around, argument) lists

    Returns:

    args
      Full inspect.formatargspec for fn
    self_arg
      The name of the first positional argument, varargs[0], or None
      if the function defines no positional arguments.
    apply_pos
      args, re-written in calling rather than receiving syntax.  Arguments are
      passed positionally.
    apply_kw
      Like apply_pos, except keyword-ish args are passed as keywords.
    apply_pos_proxied
      Like apply_pos but omits the self/cls argument

    Example::

      >>> format_argspec_plus(lambda self, a, b, c=3, **d: 123)
      {'args': '(self, a, b, c=3, **d)',
       'self_arg': 'self',
       'apply_kw': '(self, a, b, c=c, **d)',
       'apply_pos': '(self, a, b, c, **d)'}

    iiiis%s[0]itformatvaluecSsd|S(Nt=((R
((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyRQ3RRcSsd|S(NR�((R
((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyRQ<RRR�tself_argt	apply_postapply_kwtapply_pos_proxiedtapply_kw_proxiedi����N((RtcallableRgtinspect_formatargspecRtlenRi(R]RaRnR�R�R�R�tnum_defaultst	name_argstdefaulted_valsR�R�((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyRj�sj"%
,
	






c
Cs�|tjkr6|rdnd}|r-dnd}nLyt|d|�SWn5tk
r�|rfdnd}|rxdnd	}nXtd
dd|d|d
|d|d|�S(sformat_argspec_plus with considerations for typical __init__ methods

    Wraps format_argspec_plus with error handling strategies for typical
    __init__ cases::

      object.__init__ -> (self)
      other unreflectable (usually C) -> (self, *args, **kwargs)

    s(self)Rs()RRRas(self, *args, **kwargs)sself, *args, **kwargss(*args, **kwargs)s*args, **kwargsR�R�R�R�R�R�(tobjectRRjR�Ri(tmethodRaR�tproxied((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytformat_argspec_initUs 

cs"������fd�}|S(s�A class decorator that will copy attributes to a proxy class.

    The class to be instrumented must define a single accessor "_proxied".

    cs$t���fd�}���fd�}xL�D]D}t||�rbtd||f��nt||||��q4WxL�D]D}t||�r�td||f��nt||||��q�WxR�D]J}t||�rtd||f��nt||||dt��q�W|S(Nc	st�|�}tj|�}i|jd6}t||�}t|dt�}i|jd6|dd6|dd6|dd6|dd6}|r�d|}�|d	<n
d
|}t|||j�}t|d|�j	|_	t
|jd��fd
�|_|rt|�}n|S(NR RaRbR�R�R�R�sLdef %(name)s(%(args)s):
    return target_cls.%(name)s(%(apply_kw_proxied)s)t
target_clssWdef %(name)s(%(args)s):
    return %(self_arg)s._proxied.%(name)s(%(apply_kw_proxied)s)RcsS.. container:: class_bases

    Proxied for the %s class on behalf of the %s class.i(
R>RRgR!RhRjR$R RkRlR�R"tclassmethod(	RbtclslevelR]RnRotcaller_argspecRsRttproxy_fn(tproxy_cls_sphinx_nameR�ttarget_cls_sphinx_name(sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyt
instrument�s6


csw�jj|d�}|dk	rCt|jd��fd�}nd}di|d6}t|i|d6d�}|S(NsS.. container:: class_bases

    Proxied for the %s class on behalf of the %s class.is�def set_(self, attr):
    self._proxied.%(name)s = attr
def get(self):
    return self._proxied.%(name)s
get.__doc__ = doc
getset = property(get, set_)RbR�tgetset(R�R�RR�R"Rk(RbtattrR�RtR�(R�R�R�(sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytmakeprop�ss class %s already has a method %sR�(R$RIR�tsetattrR�(R*R�R�tmethtprop(t
attributestclassmethodstmethodsR�R�R�(sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyRv�s$-


 ((R�R�R�R�R�R�Rv((R�R�R�R�R�R�sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytcreate_proxy_methodsvsccCs^ytj|�SWnFtk
rY|tjkrCdgdddfSdgdddfSnXdS(s�inspect.getargspec with considerations for typical __init__ methods

    Wraps inspect.getargspec with error handling for typical __init__ cases::

      object.__init__ -> (self)
      other unreflectable (usually C) -> (self, *args, **kwargs)

    RR�tkwargsN(RRgR�R�RR(R�((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytgetargspec_init�s	
cCs+t|tj�r#|jr#|jS|SdS(sSAdjust the incoming callable such that a 'self' argument is not
    required.

    N(R.R�t
MethodTypeR�Rc(tfunc_or_cls((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytunbound_method_to_callable�scs|dkr�g}ntj|�}t�}g}tj�}d}x8t|�D]*\}}	ytj|	j�}
Wnt	k
r�qUqUX|
j
r�t|
j
�p�d}|dkr|
jr�|
j}n|r�|j
|
jd|!�q6|j
|
jd�n1|jg|
jd|!D]}||f^q�|rU|jgt|
j||
j
�D]\}}
||
f^q]�qUqUWg}|j
�fd�|D��|dk	r�t�|�r�|j
gt�|�D]}t|�^q��nx�|j�D]z\}}||krqnyHt�||�}||k	re||kre|jd||f�nWqtk
ryqXqW|r�xs|D]h\}}yHt�||�}||k	r�||kr�|jd||f�nWq�tk
r�q�Xq�Wnd�jjdj|�fS(s}Produce a __repr__() based on direct association of the __init__()
    specification vs. same-named attributes present.

    iic3s'|]}tt�|d��VqdS(N(treprR>R(R6R~(tobj(sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pys	<genexpr>5ss%s=%rs%s(%s)s, N(RRtto_listR�tOrderedDictt	enumerateRRgRR�RzR�R�R(R�RtzipRIR>R�titemsRJR1R=R R8(R�t
additional_kwt
to_inspectt
omit_kwargtmissingtpos_argstkw_argstvargsROtinspRntdefault_lenR~tdefaulttoutputtvaltdefval((R�sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytgeneric_reprs`	
	+;2

tportable_instancemethodcBs;eZdZd	Zd�Zd�Zd
d�Zd�ZRS(s_Turn an instancemethod into a (parent, name) pair
    to produce a serializable callable.

    R`RbR�t__weakref__cCs"i|jd6|jd6|jd6S(NR`RbR�(R`RbR�(R((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyt__getstate__Xs

cCs3|d|_|d|_|jdd�|_dS(NR`RbR�((R`RbR�R�(Rtstate((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyt__setstate___s

cCs%|j|_|j|_||_dS(N(R�R`R RbR�(RR�R�((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyRdscOs,|j|j�t|j|j�||�S(N(RR�R>R`Rb(RR~tkw((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR�is(R`RbR�R((R R!R"R#RRRR�(((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR
Ps		cs�tjr%t|tj�r%t�Sn|h�t|j�}x=|r||j�}tjr�t|tj�rsq@n�fd�|jD�}n�fd�|jD�}x(|D] }|j	|��j
|�q�Wtjr|jdks@t
|d�r)q@q)n%|jdks@t
|d�r)q@nxMg|j�D]}|�kr9|^q9D] }|j	|��j
|�qUWq@Wt��S(s�Return an unordered sequence of all classes related to cls.

    Traverses diamond hierarchies.

    Fibs slightly: subclasses of builtin types are not returned.  Thus
    class_hierarchy(class A(object)) returns (A, object), not A plus every
    class systemwide that derives from object.

    Old-style classes are discarded and hierarchies rooted on them
    will not be descended.

    c3s4|]*}|�krt|tj�r|VqdS(N(R.R�t	ClassType(R6t_(thier(sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pys	<genexpr>�sc3s!|]}|�kr|VqdS(N((R6R(R(sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pys	<genexpr>�sRxR)Ry(RR�R.R�RR{t__mro__R&R�RJR'RR!RIR)(R*tprocessR�RYR^Rts((RsL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytclass_hierarchyns4
	
			

		
2
ccsZt|�}xG|D]?}x6|jD]+}||jkr#||j|fVPq#q#WqWdS(s�iterate all the keys and attributes associated
    with a class, without using getattr().

    Does not use getattr() so that class-sensitive
    descriptors (i.e. property.__get__()) are not called.

    N(tdirRR�(R*tkeystkeyR�((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytiterate_attributes�s
s
self.proxycCs�|r|}nn|dkr$d}ngt|�D]F}|jd�r1|jd�r1t||�r1||kr1|^q1}x4|D],}y:t||�}	t|	d�s�w�nt|	d	|	�}	Wntk
r�q�nXy=tj|	�}
tj	|
d
�}tj	|
d
d�}Wnt
k
r7d}d
}nXdt�}
|dk	r^i||6pai}tj|
|�y|	j
||_
Wntk
r�nXt||||�q�WdS(s9Automates delegation of __specials__ for a proxying type.R#t__del__t__getattribute__t
__metaclass__RRt__R�Rciis(self, *args, **kw)s
(*args, **kw)s?def %(method)s%(fn_args)s: return %(name)s.%(method)s%(d_args)sN(R#RRRRR(RRt
startswithtendswithRIR>R�RRgR�R�tlocalstexec_RlR�(tinto_clstfrom_clstskiptonlyRbt
from_instancetdundersRR�R]Rntfn_argstd_argstpyRo((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytmonkeypatch_proxied_specials�sN
		





cCs"t|d|�t|d|�kS(s;Return True if the two methods are the same implementation.Rc(R>(tmeth1tmeth2((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytmethods_equivalent�sc
Cs1|r|rtd��nt|t�r?t||�r?|St|psgt|�D]}|jd�sU|^qU�}tt|��}tj}t|t�r�|}n'|s�t�}tj}nt|�}||j	|�|�r�|St|t
�s>|tjkrdpd}td||dj|�f��ndtfd��Y}	|rmd	|j
|	_
nt�}
x�t|�D]v\}}||kr�td
|��ntj|�s�td||f��nt|	|t|��|
j|�q�W||
|�r|	Stddj||
���d
S(s�Ensure basic interface compliance for an instance or dict of callables.

    Checks that ``obj`` implements public methods of ``cls`` or has members
    listed in ``methods``. If ``required`` is not supplied, implementing at
    least one interface method is sufficient. Methods present on ``obj`` that
    are not in the interface are ignored.

    If ``obj`` is a dict and ``dict`` does not meet the interface
    requirements, the keys of the dictionary are inspected. Keys present in
    ``obj`` that are not in the interface will raise TypeErrors.

    Raises TypeError if ``obj`` does not meet the interface criteria.

    In all passing cases, an object with callable members is returned.  In the
    simple case, ``obj`` is returned as-is; if dict processing kicks in then
    an anonymous class is returned.

    obj
      A type, instance, or dictionary of callables.
    cls
      Optional, a type.  All public methods of cls are considered the
      interface.  An ``obj`` instance of cls will always pass, ignoring
      ``required``..
    methods
      Optional, a sequence of method names to consider as the interface.
    required
      Optional, a sequence of mandatory implementations. If omitted, an
      ``obj`` that provides at least one interface method is considered
      sufficient.  As a convenience, required may be a type, in which case
      all public methods of the type are required.

    s2a class or collection of method names are requiredRsany ofsall ofs%r does not implement %s: %ss, tAnonymousInterfacecBseZdZRS(sA callable-holding shell.(R R!R"(((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR06st	Anonymouss%r: unknown in this interfaces%r=%r is not callables,dictionary does not contain required keys %sN(R�R.R<R%RRtoperatortgetgttintersectionRiR8R�R tdictlike_iteritemsRR�R�tstaticmethodR'(
R�R*R�trequiredRt	interfacetimplementedtcompliest	qualifierR0tfoundR�R�((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytas_interface�sH!:				tmemoized_propertycBs;eZdZdd�Zd�Zd�Zed��ZRS(s2A read-only @property that is only evaluated once.cCs+||_|p|j|_|j|_dS(N(tfgetR"R (RR@R�((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyRQs	cCs1|dkr|S|j|�|j|j<}|S(N(RR@R�R (RR�R*tresult((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyt__get__VscCstj||j�dS(N(R?tresetR (RR�((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyt_reset\scCs|jj|d�dS(N(R�R&R(R*R�Rb((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyRC_sN(	R R!R"RRRBRDR�RC(((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR?Ns
		cs�fd�}t|��S(s�Decorate a method memoize its return value.

    Best applied to no-arg methods: memoization is not sensitive to
    argument values, and will always return the same value even when
    called with different arguments.

    csM�|||���fd�}�j|_�j|_||j�j<�S(Ncs�S(N((taR(RA(sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytmemops(R R"R�(RR�RRF(R](RAsL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytoneshotms(R(R]RG((R]sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytmemoized_instancemethodds	tHasMemoizedcBs]eZdZdZe�Zd�Zd�Zd�Zde	fd��YZ
ed��ZRS(syA class that maintains the names of memoized elements in a
    collection for easy cache clearing, generative, etc.

    cCs+x$|jD]}|jj|d�q
WdS(N(t_memoized_keysR�R&R(RR((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyt_reset_memoizations�scCs-x&|jD]}||jks
t�q
WdS(N(RJR�tAssertionError(RR((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyt_assert_no_memoizations�scCs#||j|<|j|hO_dS(N(R�RJ(RRR((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyt_set_memoized_attribute�s
tmemoized_attributecBs#eZdZdd�Zd�ZRS(sTA read-only @property that is only evaluated once.

        :meta private:

        cCs+||_|p|j|_|j|_dS(N(R@R"R (RR@R�((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR�s	cCsF|dkr|S|j|�|j|j<}|j|jhO_|S(N(RR@R�R RJ(RR�R*RA((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyRB�s
N(R R!R"RRRB(((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyRO�scs�fd�}t|��S(s+Decorate a method memoize its return value.csb�|||���fd�}�j|_�j|_||j�j<|j�jhO_�S(Ncs�S(N((RER(RA(sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyRF�s(R R"R�RJ(RR�RRF(R](RAsL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyRG�s(R(R*R]RG((R]sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyRH�s((
R R!R"R#t	frozensetRJRKRMRNR�ROR�RH(((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyRI{s				t
MemoizedSlotscBs&eZdZdZd�Zd�ZRS(s�Apply memoized items to an object using a __getattr__ scheme.

    This allows the functionality of memoized_property and
    memoized_instancemethod to be available to a class using __slots__.

    cCst|��dS(N(R�(RR((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyt_fallback_getattr�scs��jd�rt���n�t�d��r[t�d���}t��|�|St�d��r�t�d������fd�}�j|_|S�j��SdS(Nt	_memoizeds_memoized_attr_%ss_memoized_method_%scsJ�||���fd�}�j|_�j|_t��|��S(Ncs�S(N((RER(RA(sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyRF�s(R R"R�(R�RRF(R]RR(RAsL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyRG�s(RR�RIR>R�R"RR(RRRRG((R]RRsL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyt__getattr__�s((R R!R"R#RRRT(((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyRQ�s	cCsat|tj�rW|j�j�}|dkr4tS|dkrDtStd
|��nt|�S(Nttruetyestontyttt1tfalsetnotoffR7tft0sString is not true/false: %r(RURVRWRXRYRZ(R[R\R]R7R^R_(	R.RR/tstripR5R�R$t
ValueErrorR�(R�((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytasbool�scs�fd�}|S(sqReturn a callable that will evaluate a string as
    boolean, or one of a set of "alternate" string values.

    cs|�kr|St|�SdS(N(Rb(R�(ttext(sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyt
bool_or_value�s((RcRd((RcsL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytbool_or_str�scCs|dkr|St|�S(sCoerce to integer.N(Rtint(R((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytasint�scCs�|dkr|}n||kr�t|t�sEt|||�r�||dk	r�|tkr~|r~t||�||<q�|||�||<ndS(s�If 'key' is present in dict 'kw', coerce its value to type 'type\_' if
    necessary.  If 'flexi_bool' is True, the string '0' is considered false
    when coercing to boolean.
    N(RR.R<R�Rb(RRRt
flexi_booltdest((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytcoerce_kw_types	$cs-t|�}|ft�fd�|D��S(sbProduce a tuple structure that is cacheable using the __dict__ of
    obj to retrieve values

    c3s1|]'}|�jkr|�j|fVqdS(N(R�(R6tk(R�(sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pys	<genexpr>s(R�RK(R�R*Rp((R�sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytconstructor_keys	cs?t|�}|j�fd�|j|�D��|||�S(s�Instantiate cls using the __dict__ of obj as constructor arguments.

    Uses inspect to match the named arguments of ``cls``.

    c3s1|]'}|�jkr|�j|fVqdS(N(R�(R6Rk(R�(sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pys	<genexpr>+s(R�Rt
difference(R�R*R�RRp((R�sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytconstructor_copy"s cs4tjj��tjd����fd�}|S(s%Return a threadsafe counter function.ics��t��SWdQXdS(N(tnext((tcountertlock(sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyt_next7s(Rt	threadingtLockRStcount(Rr((RpRqsL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyRp0scCs�t|d�r>|jdk	r4t|jt�r4tS|jSnt|t�rStpVt}||t�rltS||t�rtS||t�r�tSt|d�r�tSt|d�r�tSt|d�r�tS|SdS(s�Given an instance or class, guess if it is or is acting as one of
    the basic collection types: list, set and dict.  If the __emulates__
    property is present, return that preferentially.
    t__emulates__RJR'R%N(	RIRvRt
issubclassR%R.R<R{Ri(tspecimenRtisa((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytduck_type_collection>s&
cCs�t||�r|St|t�rZtjd|djd�|D��t|�f��n"tjd||t|�f��dS(Ns8Argument '%s' is expected to be one of type %s, got '%s's or css|]}d|VqdS(s'%s'N((R6RE((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pys	<genexpr>fss6Argument '%s' is expected to be of type '%s', got '%s'(R.RKRt
ArgumentErrorR8R<(R~targtypeRb((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytassert_arg_type_s/cstjr+t�d�rct�j��Sn8t�d�rD�j�St�d�rct�j��St�dt�dd
����d
kr�t	d���nt�d�r���fd�}|�St�d�r�t�fd	��j
�D��St	d���d
S(s?Return a (key, value) iterator for almost any dict-like object.R�t	iteritemst__getitem__R�sObject '%r' is not dict-liketiterkeysc3s,x%�j�D]}|�|�fVq
WdS(N(R�(R(tdictliketgetter(sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytiterator�sRc3s!|]}|�|�fVqdS(N((R6R(R�(sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pys	<genexpr>�sN(RRRIR{R�R~titerR>RR�R(R�R�((R�R�sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR6os 	
 t
classpropertycBs eZdZd�Zd�ZRS(sAA decorator that behaves like @property except that operates
    on classes rather than instances.

    The decorator is currently special when using the declarative
    module, but note that the
    :class:`~.sqlalchemy.ext.declarative.declared_attr`
    decorator should be used for this purpose with declarative.

    cOs,tt|�j|||�|j|_dS(N(tsuperR�RR"(RR@R~R((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR�scCs
|j|�S(N(R@(tdescRR*((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyRB�s(R R!R"RRB(((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR��s		thybridpropertycBs#eZd�Zd�Zd�ZRS(cCs||_||_dS(N(R�R�(RR�((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR�s	cCs0|dkr|j|�}|S|j|�SdS(N(RR�R�(Rtinstancetownertclsval((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyRB�scCs
||_|S(N(R�(RR�((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyt
classlevel�s	(R R!RRBR�(((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR��s		thybridmethodcBs)eZdZd�Zd�Zd�ZRS(s/Decorate a function as cls- or instance- level.cCs||_|_||_dS(N(R�RcR�(RR�((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR�scCs9|dkr"|jj||j�S|jj||�SdS(N(RR�RBR=R�(RR�R�((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyRB�scCs
||_|S(N(R�(RR�((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR��s	(R R!R"RRBR�(((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR��s		t_symbolcBs2eZddd�Zd�Zd�Zd�ZRS(cCsdt|tj�st�|dkr3t|�}ntjt|�}||_	|r`||_
n|S(sConstruct a new named symbol.N(R.RR/RLRthashRft__new__R�RbR"(RRbR�t	canonicaltv((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR��s	cCst|jdt|�ffS(NR
(R�RbRf(R((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyt
__reduce__�scCs
t|�S(N(R�(R((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyt__str__�scCsd|jS(Ns
symbol(%r)(Rb(R((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyt__repr__�sN(R R!RR�R�R�R�(((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR��s		R�cBsDeZdZiZejj�Zddd�Z	e
ed��ZRS(s�A constant symbol.

    >>> symbol('foo') is symbol('foo')
    True
    >>> symbol('foo')
    <symbol 'foo>

    A slight refinement of the MAGICCOOKIE=object() pattern.  The primary
    advantage of symbol() is its repr().  They are also singletons.

    Repeated calls of symbol('name') will all return the same instance.

    The optional ``doc`` argument assigns to ``__doc__``.  This
    is strictly so that Sphinx autoattr picks up the docstring we want
    (it doesn't appear to pick up the in-module docstring if the datamember
    is in a different module - autoattribute also blows up completely).
    If Sphinx fixes/improves this then we would no longer need
    ``doc`` here.

    cCsV|j�G|jj|�}|dkrHt|||�|j|<}n|SWdQXdS(N(t_locktsymbolsR�RR�(R*RbR�R�R[((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR��s

 cCs�xS|j�D]E\}}||kr)|S|rB||jkrB|S||kr
|Sq
W|dkrfdStjd||f��dS(s�Given a user parameter, parse the parameter into a chosen symbol.

        The user argument can be a string name that matches the name of a
        symbol, or the symbol object itself, or any number of alternate choices
        such as True/False/ None etc.

        :param arg: the user argument.
        :param choices: dictionary of symbol object to list of possible
         entries.
        :param name: name of the argument.   Used in an :class:`.ArgumentError`
         that is raised if the parameter doesn't match any available argument.
        :param resolve_symbol_names: include the name of each symbol as a valid
         entry.

        sInvalid value for '%s': %rN(R�RbRRR{(R*R~tchoicesRbtresolve_symbol_namesR[tchoice((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytparse_user_argument�sN(
R R!R"R�RRsRtR�RR�R�R$R�(((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR��scCst|_td7adS(s�Assign a '_creation_order' sequence to the given instance.

    This allows multiple instances to be sorted in order of creation
    (typically within a single thread; the counter is not particularly
    threadsafe).

    iN(t_creation_order(R�((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytset_creation_order"s		cOsDy|||�SWn,tk
r?tdtj�dd!�nXdS(sXexecutes the given function, catches all exceptions and converts to
    a warning.

    s%s('%s') ignorediiN(R1RRR(R�R�R�((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytwarn_exception/s
icCsBy)t|�|kr$d|d|!S|SWntk
r=|SXdS(Ns%s...i(R�R�(Rtlen_((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytellipses_string:s
t_hash_limit_stringcBs)eZdZd�Zd�Zd�ZRS(s/A string subclass that can only be hashed on a maximum amount
    of unique values.

    This is used for warnings so that we can send out parameterized warnings
    without the __warningregistry__ of the module,  or the non-overridable
    "once" registry within warnings.py, overloading memory,


    cCsT||d|}tt|�j||�}td|t|�|f�|_|S(Ns6 (this warning may be suppressed after %d occurrences)s%s_%d(R�R�R�R�t_hash(R*RtnumR�tinterpolatedR((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR�Os
#cCs|jS(N(R�(R((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyt__hash__WscCst|�t|�kS(N(R�(Rtother((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyt__eq__Zs(R R!R"R�R�R�(((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR�Ds			cCs6|r"ttj|d|��nt|tj�dS(sdIssue a warning.

    If msg is a string, :class:`.exc.SAWarning` is used as
    the category.

    RtN(t_warnings_warnRt	SAWarning(tmsgRt((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR^scCs/|rt|d|�}nt|tj�dS(s\Issue a warning with a parameterized string, limiting the number
    of registrations.

    i
N(R�R�RR�(R�R�((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytwarn_limitedkscCs�ytj|�}Wn#tk
r,d}nTd}nHXxD|dk	rtjd|jjdd��r|j}|d7}q<W|dk	r�t	j
||d|d�nt	j
|d|d�dS(Nis^(?:sqlalchemy\.|alembic\.)R RRit
stacklevel(Rt	_getframeRaRR9tmatcht	f_globalsR�tf_backtwarningsR(tmessagetcategoryR�tframe((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR�us
	
	cs"�g����fd�}|S(sNDecorate the given function to be a no-op after it is called exactly
    once.csV�}�rR�j�}y|||�SWqR�rH�jd|�n�qRXndS(Ni(R&tinsert(R~Rt	strong_fntonce_fn(R]toncetretry_on_exception(sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytgo�s((R]R�R�((R]R�R�sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyt	only_once�s	
s%sqlalchemy/([a-z_]+/){0,2}[a-z_]+\.pysunit(?:2|test2?/)cCs�d}t|�d}x-||krE|j||�rE|d7}qWx-||kru|j||�ru|d8}qIW|||d!S(stChop extraneous lines off beginning and end of a traceback.

    :param tb:
      a list of traceback lines as returned by ``traceback.format_stack()``

    :param exclude_prefix:
      a regular expression object matching lines to skip at beginning of
      ``tb``

    :param exclude_suffix:
      a regular expression object matching lines to skip at end of ``tb``
    ii(R�tsearch(ttbtexclude_prefixtexclude_suffixRFtend((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytchop_traceback�s
""cBs)d|}e�j�}||U|dS(Ns&def set(obj, value):    obj.%s = valueR%(R!tcopy(tattrnameRtRo((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyt
attrsetter�s
tEnsureKWArgTypecBs eZdZd�Zd�ZRS(sYApply translation of functions to accept \**kw arguments if they
    don't already.

    c
Cs�|j}|r�xx|D]m}tj||�}|r||}tj|�}|js�|j|�||<}	t|||	�q�qqWntt	|�j
|||�dS(N(tensure_kwargR9R�RRgR�t
_wrap_w_kwR�R�R�R(
R*tclsnameRYtclsdicttfn_regRRR]Rntwrapped((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR�s	

	cs�fd�}t|��S(Ncs
�|�S(N((R~R(R](sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytwrap�s(R(RR]R�((R]sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR��s(R R!R"RR�(((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR��s	
cCs�t|d�rt||�S|}|jj|_t|d�rO|j|_nt|jd�r|jjr|jj|_n|jr�|j|_n|SdS(s�Augment functools.update_wrapper() to work with objects with
    a ``__call__()`` method.

    :param fn:
      object with __call__ method

    R R!R"N(RIRR=R R!R�R"(twrapperR]t_f((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyt
wrap_callable�s
	cCs!d|kr|jd�Sd}gg}d}t|�}x�||kr||}|dkr�|dkr�||dkr�||ddkr�|djd�|d7}q�|dN}n9|dkr�|dkr�|jg�n|dj|�|d7}q=Wg|D]}dj|�^qS(s�Parse a dotted identifier with accommodation for quoted names.

    Includes support for SQL-style double quotes as a literal character.

    E.g.::

        >>> quoted_token_parser("name")
        ["name"]
        >>> quoted_token_parser("schema.name")
        ["schema", "name"]
        >>> quoted_token_parser('"Schema"."Name"')
        ['Schema', 'Name']
        >>> quoted_token_parser('"Schema"."Name""Foo"')
        ['Schema', 'Name""Foo']

    t"R�iii����RR(R�R�RJR8(RR
RAtidxtlvtcharR�((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytquoted_token_parser�s$
	
0

cs%tj�����fd�}|S(NcsS|jdk	r|jpd}|rFt|�fd��D��}n||_|S(NRRcsi|]}�|�qS(((R6tparam(Rc(sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pys
<dictcomp>0s	(R"Rtinject_param_text(R]R�(tparamsRc(sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyRv-s
"	(RR�(R�RcRv((R�RcsL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytadd_parameter_text*scCsi|jdd�}t|�dkr(|S|\}}|jd�sX|dtj|�Stj|�SdS(Ns
iR4(R�R�Rttextwraptdedent(Rct
split_textt	firstlinet	remaining((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyt_dedent_docstring7sc	Cs�t|pd�}|jd�}t|�dkrC|jd�ntj|�jd�}|drx|jdd�ngt|�D]\}}|j�s�|^q�}|jdd�|t	|t|�d�}|d|!|||}dj
|�S(NRRs
ii(R�R�R�RJR�R�R�R�R`tminR8(	tdoctextt
injecttexttpostlinestinjectlinesR�tlinetblankst
inject_pos((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR�Cs
1s(\s+):param (.+?):c
Cs�tj|j��}g}d}x[|r~|j�}tj|�}|dkr�|rn|jd�jd�}||kr�dt	|jd��d}|r�t
jd|d�}	|	r�dt	|	jd��}q�n|||}q�qnn~|r|jd|dg�d}nY|j�s@|j||dg�d}n.|j
d�rn|j||j�g�q$n|j|�q$Wdj|�S(	Nit*R4is(\s+)\Sis
s::(tcollectionstdequet
splitlinesRtpopleftt
_param_regR�R�tlstripR�R9R(trstripR RJR8(
R�t
inject_paramstdoclinesR�t	to_injectR�RR�tindenttm2((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyR�Xs6			cCs�t|�dkrd	St|�dk}|r;|dd!n|dd!|d}g|D],}t|�dkr}d|d n|^qW}|r�dj|�Sddj|dd!�|dfSd	S(
s�Trims a list of strings from the middle and return a string of up to
    four elements. Strings greater than 11 characters will be truncatediiii����is%s..s, s%s, ..., %sN(R�RR8(RptflagRbtres((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pytrepr_tuple_names�s(9
cCsQy8ddlm}ddlm}ddlm}tSWntk
rLtSXdS(Ni����(tcimmutabledict(tcprocessors(tcresultproxy(R�R�R�R�R�R�R$(R�R�R�((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pythas_compiled_ext�s
((((((dR"R�t	functoolsRRRdRSR2R9RR�R�R�RRRRRRR�R
R-R3R;RDRNR\R_RwRhRkRR�R�R�R�R�R$R�R�RjR�R�R�R�R	R
RRR,R/R>R?RHRIRQRbReRgRjRlRnRpRzR}R6tpropertyR�R�R�RfR�R R�R�R�R�R�t	text_typeR�RR�R�R�tcompilet_SQLA_REt_UNITTEST_RER�R<tNoneTypeR�R�R�R�R�R�R�R�R�R�R�(((sL/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.pyt<module>s�	1		
							#		W&	+	6p%n		H	3	9	V	<)						!			D	
	

	
				,	
			+