Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
ó
ùðuYc@`s<ddlmZddlmZddlZddlZddlmZmZmZddlZddl	Z	ddl
Z
ddlmZddl
mZddlmZddlmZdd	lmZmZdd
lmZmZmZddlmZyddlmZWnek
r'dZnXe
je ƒZ!d
„Z"e"eeƒZ#de$fd„ƒYZ%de$fd„ƒYZ&de$fd„ƒYZ'de'e%e&e#fd„ƒYZ(de'e%e&eefd„ƒYZ)e	j*d„ƒZ+de$fd„ƒYZ,de$fd„ƒYZ-de$fd„ƒYZ.e	j*d„ƒZ/dS( i(tabsolute_import(tdivisionN(tsignaltSIGINTtdefault_int_handler(tWINDOWS(tformat_size(tget_indentation(tsix(tBartIncrementalBar(tWritelnMixintHIDE_CURSORtSHOW_CURSOR(tSpinner(tcoloramacC`s¨t|jddƒ}|s|St|dtjƒƒt|dtjƒƒg}|tt|dgƒƒ7}y tjƒj|ƒj|ƒWntk
rŸ|SX|SdS(Ntencodingt
empty_filltfilltphases(	tgetattrtfiletNoneRt	text_typetlisttjointencodetUnicodeEncodeError(t	preferredtfallbackRt
characters((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pyt_select_progress_classs 
tInterruptibleMixincB`s)eZdZd„Zd„Zd„ZRS(sÂ
    Helper to ensure that self.finish() gets called on keyboard interrupt.

    This allows downloads to be interrupted without leaving temporary state
    (like hidden cursors) behind.

    This class is similar to the progress library's existing SigIntMixin
    helper, but as of version 1.2, that helper has the following problems:

    1. It calls sys.exit().
    2. It discards the existing SIGINT handler completely.
    3. It leaves its own handler in place even after an uninterrupted finish,
       which will have unexpected delayed effects if the user triggers an
       unrelated keyboard interrupt some time after a progress-displaying
       download has already completed, for example.
    cO`sMtt|ƒj||Žtt|jƒ|_|jdkrIt|_ndS(s=
        Save the original SIGINT handler for later.
        N(	tsuperR t__init__RRt
handle_siginttoriginal_handlerRR(tselftargstkwargs((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pyR"NscC`s'tt|ƒjƒtt|jƒdS(s½
        Restore the original SIGINT handler after finishing.

        This should happen regardless of whether the progress display finishes
        normally, or gets interrupted.
        N(R!R tfinishRRR$(R%((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pyR(^scC`s|jƒ|j||ƒdS(s²
        Call self.finish() before delegating to the original SIGINT handler.

        This handler should only be in place while the progress display is
        active.
        N(R(R$(R%tsignumtframe((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pyR#hs
(t__name__t
__module__t__doc__R"R(R#(((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pyR <s		
tDownloadProgressMixincB`sJeZd„Zed„ƒZed„ƒZed„ƒZdd„ZRS(cO`s8tt|ƒj||Ždtƒd|j|_dS(Nt i(R!R.R"Rtmessage(R%R&R'((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pyR"uscC`s
t|jƒS(N(Rtindex(R%((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pyt
downloadedyscC`s(|jdkrdStd|jƒdS(Ngs...is/s(tavgR(R%((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pytdownload_speed}scC`s|jrd|jSdS(Nseta %st(tetateta_td(R%((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pyt
pretty_eta„s	icc`s1x |D]}|V|j|ƒqW|jƒdS(N(tnextR((R%tittntx((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pytiterŠs
(R+R,R"tpropertyR2R4R8R=(((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pyR.ss
	tWindowsMixincB`seZd„ZRS(c`s†trˆjrtˆ_nttˆƒj||Žtr‚tr‚tjˆjƒˆ_‡fd†ˆj_	‡fd†ˆj_
ndS(Nc`sˆjjjƒS(N(Rtwrappedtisatty((R%(s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pyt<lambda>§sc`sˆjjjƒS(N(RR@tflush((R%(s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pyRB«s(Rthide_cursortFalseR!R?R"RtAnsiToWin32RRARC(R%R&R'((R%s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pyR"“s(R+R,R"(((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pyR?‘stDownloadProgressBarcB`seZejZdZdZRS(s
%(percent)d%%s0%(downloaded)s %(download_speed)s %(pretty_eta)s(R+R,tsyststdoutRR0tsuffix(((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pyRG®s	tDownloadProgressSpinnercB`s)eZejZdZd„Zd„ZRS(s!%(downloaded)s %(download_speed)scC`s4t|dƒs'tj|jƒ|_nt|jƒS(Nt_phaser(thasattrt	itertoolstcycleRRLR9(R%((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pyt
next_phase¼scC`sm|j|}|jƒ}|j|}dj||r;dnd||rMdnd|gƒ}|j|ƒdS(NR5R/(R0RPRJRtwriteln(R%R0tphaseRJtline((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pytupdateÁs

(R+R,RHRIRRJRPRT(((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pyRK¶s		cc`sctrdVnQ|jƒs0tjƒtjkr8dVn'|jtƒz	dVWd|jtƒXdS(N(	RRAtloggertgetEffectiveLeveltloggingtINFOtwriteRR
(R((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pyt
hidden_cursorØs"
	tRateLimitercB`s#eZd„Zd„Zd„ZRS(cC`s||_d|_dS(Ni(t_min_update_interval_secondst_last_update(R%tmin_update_interval_seconds((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pyR"ìs	cC`s&tjƒ}||j}||jkS(N(ttimeR]R\(R%tnowtdelta((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pytreadyðs
cC`stjƒ|_dS(N(R_R](R%((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pytresetõs(R+R,R"RbRc(((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pyR[ës		tInteractiveSpinnercB`s5eZdddd„Zd„Zd„Zd„ZRS(s-\|/gÀ?cC`sƒ||_|dkr!tj}n||_t|ƒ|_t|_t	j
|ƒ|_|jjdt
ƒ|jdƒd|_dS(NR/s ... i(t_messageRRHRIt_fileR[t
_rate_limiterREt	_finishedRNROt_spin_cycleRYRt_width(R%R0Rt
spin_charsR^((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pyR"ús			"cC`sy|jst‚d|j}|jj|d|j|ƒ|jj|ƒt|ƒ|_|jjƒ|jjƒdS(NsR/(	RhtAssertionErrorRjRfRYtlenRCRgRc(R%tstatustbackup((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pyt_write	s

cC`s:|jr
dS|jjƒs dS|jt|jƒƒdS(N(RhRgRbRpR9Ri(R%((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pytspins
	cC`sD|jr
dS|j|ƒ|jjdƒ|jjƒt|_dS(Ns
(RhRpRfRYRCtTrue(R%tfinal_status((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pyR(s	

N(R+R,RR"RpRqR((((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pyRdùs

		tNonInteractiveSpinnercB`s/eZdd„Zd„Zd„Zd„ZRS(i<cC`s2||_t|_t|ƒ|_|jdƒdS(Ntstarted(ReRERhR[Rgt_update(R%R0R^((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pyR"*s		cC`s7|jst‚|jjƒtjd|j|ƒdS(Ns%s: %s(RhRlRgRcRUtinfoRe(R%Rn((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pyRv0s
cC`s1|jr
dS|jjƒs dS|jdƒdS(Nsstill running...(RhRgRbRv(R%((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pyRq5s
	cC`s.|jr
dS|jd|fƒt|_dS(Nsfinished with status '%s'(RhRvRr(R%Rs((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pyR(<s	(R+R,R"RvRqR((((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pyRt)s		cc`s³tjjƒr3tjƒtjkr3t|ƒ}nt|ƒ}yt	tjƒ
|VWdQXWnAt
k
r|jdƒ‚n.tk
r¡|jdƒ‚nX|jdƒdS(Ntcanceledterrortdone(
RHRIRARURVRWRXRdRtRZtKeyboardInterruptR(t	Exception(R0tspinner((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pytopen_spinnerCs$



(0t
__future__RRRNRHRRRR_t
contextlibRWt
pip.compatRt	pip.utilsRtpip.utils.loggingRtpip._vendorRtpip._vendor.progress.barR	R
tpip._vendor.progress.helpersRRR
tpip._vendor.progress.spinnerRRR|Rt	getLoggerR+RURt_BaseBartobjectR R.R?RGRKtcontextmanagerRZR[RdRtR~(((s)/tmp/pip-build-NDUwcL/pip/pip/utils/ui.pyt<module>sB

	7		!0