Viewing File: /opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/deprecation.pyc

ó
“tĈ_c@@sÇdZddlmZddlZddlZddlmZddlmZ	ddl
mZer}ddlm
Z
mZndZd	efd
„ƒYZdaddd„Zd„Zdd
„ZdS(sN
A module that implements tooling to enable easy warnings about deprecations.
i(tabsolute_importN(tparse(t__version__(tMYPY_CHECK_RUNNING(tAnytOptionals
DEPRECATION: tPipDeprecationWarningcB@seZRS((t__name__t
__module__(((sP/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/deprecation.pyRscC@s‚|dk	r7tdk	r~t||||||ƒq~nGt|tƒretjdƒ}|j|ƒnt||||||ƒdS(Nspip._internal.deprecations(tNonet_original_showwarningt
issubclassRtloggingt	getLoggertwarning(tmessagetcategorytfilenametlinenotfiletlinetlogger((sP/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/deprecation.pyt_showwarning!scC@s;tjdtdtƒtdkr7tjatt_ndS(Ntdefaulttappend(twarningstsimplefilterRtTrueR
R	tshowwarningR(((sP/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/deprecation.pytinstall_warning_logger2s	cC@s—|tdf|df|df|dfg}djd„|Dƒƒ}|d
k	rzttƒt|ƒkrzt|ƒ‚ntj|dtdd	ƒd
S(sĊHelper to deprecate existing functionality.

    reason:
        Textual reason shown to the user about why this functionality has
        been deprecated.
    replacement:
        Textual suggestion shown to the user about what alternative
        functionality they can use.
    gone_in:
        The version of pip does this functionality should get removed in.
        Raises errors if pip's current version is greater than or equal to
        this.
    issue:
        Issue number on the tracker that would serve as a useful place for
        users to find related discussion and provide feedback.

    Always pass replacement, gone_in and issue as keyword arguments for clarity
    at the call site.
    s{}s2pip {} will remove support for this functionality.sA possible replacement is {}.sPYou can find discussion regarding this at https://github.com/pypa/pip/issues/{}.t cs@s0|]&\}}|dk	r|j|ƒVqdS(N(R	tformat(t.0tvalttemplate((sP/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/deprecation.pys	<genexpr>asRt
stackleveliN(tDEPRECATION_MSG_PREFIXtjoinR	Rtcurrent_versionRRtwarn(treasontreplacementtgone_intissuet	sentencesR((sP/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/deprecation.pyt
deprecated>s
		$(t__doc__t
__future__RRRtpip._vendor.packaging.versionRtpipRR&tpip._internal.utils.typingRttypingRRR$tWarningRR	R
RRR-(((sP/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/deprecation.pyt<module>s	
Back to Directory File Manager