ó ÃÌ4]c@sçdZddlZddlZddlmZddlmZddlmZddlmZdd lm Z d d „Z d d „Z d 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(t constructortheadertmessage(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  c sOi‰x0ˆjƒD]"\}\}}t|ƒˆ|‡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(RRR RR(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÷RN(R5RR/RRRRt_sa_warn(RRIRRJR&R2R3((RRIsO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/util/deprecations.pyRås    (R/RARRRt langhelpersRRRRR R RRtTrueRR6R7R;R5RR(((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/util/deprecations.pyt s"     $ C%