%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/227033/root/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/util/
Upload File :
Create Path :
Current File : //proc/227033/root/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/util/deprecations.pyc

�
��4]c@s�dZddlZddlZddlmZddlmZddlmZddlmZdd	lm	Z	d
d�Z
d
d�Zd
d�Zded�Zd�Zded�Zd�Zd�Zdd�Zdd�ZdS(sSHelpers related to deprecation of functions, methods, classes, other
functionality.i����Ni(tcompat(t	decorator(tinject_docstring_text(tinject_param_texti(texcicCstj|tjd|�dS(Nt
stacklevel(twarningstwarnRtSADeprecationWarning(tmsgR((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/util/deprecations.pytwarn_deprecatedscCstj|tjd|�dS(NR(RRRtSAPendingDeprecationWarning(R	R((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/util/deprecations.pytwarn_pending_deprecationst__init__cs/d|�pdf����fd�}|S(Ns.. deprecated:: %s %stcs&t|�tj�td����S(Ntfunc(t_decorate_cls_with_warningRRtdict(tcls(tconstructortheadertmessage(sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/util/deprecations.pytdecorate s((tversionRRR((RRRsO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/util/deprecations.pytdeprecated_clss	csP|rd|�pdf�nd��dkr:d�n��fd�}|S(s�Decorates a function and issues a deprecation warning on use.

    :param version:
      Issue version in the warning.

    :param message:
      If provided, issue message in the warning.  A sensible default
      is used if not provided.

    :param add_deprecation_to_docstring:
      Default True.  If False, the wrapped function's __doc__ is left
      as-is.  If True, the 'message' is prepended to the docs if
      provided, or sensible default if message is omitted.

    s.. deprecated:: %s %sRs$Call to deprecated function %(func)scs&t|tj�td|j���S(NR(t_decorate_with_warningRRRt__name__(tfn(RR(sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/util/deprecations.pyREs
N(tNone(RRtadd_deprecation_to_docstringR((RRsO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/util/deprecations.pyt
deprecated,s	csOi�x0�j�D]"\}\}}t|��|<qW��fd�}|S(s"Decorates a function to warn on use of certain parameters.

    e.g. ::

        @deprecated_params(
            weak_identity_map=(
                "0.7",
                "the :paramref:`.Session.weak_identity_map parameter "
                "is deprecated."
            )

        )

    cstj|�}|jdk	r�tt|jt|j�t|j�|j���t��j	���t��j
���nd�t���t����fd��}|jdk	r�|jp�d}|r�t
|d��j�D��}n||�}||_|S(Ncs�xB�D]:}||�|krtj�|tjdd�qqWx:�D]2}||krLtj�|tjdd�qLqLW|||�S(NRi(RRRR(Rtargstkwargstm(tcheck_defaultstcheck_kwtdefaultstmessages(sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/util/deprecations.pytwarnedss

RcSs5i|]+\}\}}d||p'df|�qS(s.. deprecated:: %s %sR((t.0tparamRR((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/util/deprecations.pys
<dictcomp>�s	((Rtinspect_getfullargspecR$RRtzipRtlentsettintersectiont
differenceRt__doc__Rtitems(RtspecR&tdoct	decorated(R%tspecs(R"R#R$sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/util/deprecations.pyRds( 	(R0t_sanitize_restructured_text(R4R(RRR((R%R4sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/util/deprecations.pytdeprecated_paramsPs
+csP|rd|�pdf�nd��dkr:d�n��fd�}|S(sEDecorates a function and issues a pending deprecation warning on use.

    :param version:
      An approximate future version at which point the pending deprecation
      will become deprecated.  Not used in messaging.

    :param message:
      If provided, issue message in the warning.  A sensible default
      is used if not provided.

    :param add_deprecation_to_docstring:
      Default True.  If False, the wrapped function's __doc__ is left
      as-is.  If True, the 'message' is prepended to the docs if
      provided, or sensible default if message is omitted.
    s.. deprecated:: %s (pending) %sRs$Call to deprecated function %(func)scs&t|tj�td|j���S(NR(RRRRR(R(RR(sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/util/deprecations.pyR�s
N(R(RRRR((RRsO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/util/deprecations.pytpending_deprecation�s	cCs"|dkr|St|�|SdS(N(RR
(tparameter_valuet
default_valuetwarning_text((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/util/deprecations.pytdeprecated_option_value�s
cCsd�}tjd||�S(NcSs5|jdd�\}}|dkr1|d7}n|S(NiiRtmeths()(RR<(tgroup(R!ttype_tname((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/util/deprecations.pytrepl�s
s\:(\w+)\:`~?\.?(.+?)`(tretsub(ttextR@((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/util/deprecations.pyR5�s	cCs�|jdk	r|jpd}|dk	r�|td|�;}t||d�}t|�tkr�t|j�}||d<t|j|j|�}||}q�||_t||�}nt	||t
|||d��|S(NRRiR/(R/RRRttypet__dict__Rt	__bases__tgetattrtsetattrR(RRtwtypeRtdocstring_headerR2tclsdicttconstructor_fn((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/util/deprecations.pyR�s 

	cs�t���t��fd��}|jdk	r<|jp?d}|dk	ry|td|j�;}t||d�}n||�}||_��fd�|_|S(s=Wrap a function with a warnings.warn and augmented docstring.cs#tj��dd�|||�S(NRi(RR(RRR (RRI(sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/util/deprecations.pyR&�sRRicstj��dd�S(NRi(RR((RRI(sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/util/deprecations.pyt<lambda>�RN(R5RR/RRRRt_sa_warn(RRIRRJR&R2R3((RRIsO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/util/deprecations.pyR�s	(R/RARRRtlanghelpersRRRRR
RRRtTrueRR6R7R;R5RR(((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/util/deprecations.pyt<module>	s"$	C%		

Zerion Mini Shell 1.0