File "configuration.pyc"

Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyc
File size: 14.88 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit


Rec@szdZddlZddlZddlZddlZddlmZddlmZm	Z	ddl
mZddlm
Z
mZddlmZmZddlmZerdd	lmZmZmZmZmZmZmZejZed
eZneje Z!dZ"dZ#ed
dddddddddZ$e
rQdndZ%dZ&de'fdYZ(dS(sConfiguration management setup

Some terminology:
- name
  As written in config files.
- value
  Value associated with a name
- key
  Name combined with it's section (section.name)
- variant
  A single word describing where the configuration key-value pair came from
iN(tconfigparser(tConfigurationErrort!ConfigurationFileCouldNotBeLoaded(tappdirs(tWINDOWSt
expanduser(t
ensure_dirtenum(tMYPY_CHECK_RUNNING(tAnytDicttIterabletListtNewTypetOptionaltTupletKindcCs8|jjdd}|jdr4|d}n|S(sFMake a name consistent regardless of source (environment or file)
    t_t-s--i(tlowertreplacet
startswith(tname((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyt_normalize_name*s
cCs:d|kr*dj|}t|n|jddS(Nt.sbKey does not contain dot separated section and key. Perhaps you wanted to use 'global.{}' instead?i(tformatRtsplit(Rt
error_message((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyt_disassemble_key4s
	tUSERtusertGLOBALtglobaltSITEtsitetENVtenvtENV_VARsenv-varspip.inispip.confcCsgtjdD]}tjj|t^q}tjjtjt}tjjtdt	rgdndt}tjjtj
dt}i|tj6|gtj
6||gtj6S(Ntpipt~s.pip(Rtsite_config_dirstostpathtjointCONFIG_BASENAMEtsystprefixRRtuser_config_dirtkindsRR!R(R*tglobal_config_filestsite_config_filetlegacy_config_filetnew_config_file((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pytget_configuration_filesLs.				

t
ConfigurationcBseZdZddZdZdZdZdZdZ	dZ
dZd	Ze
d
ZdZdZd
ZdZdZdZdZdZdZdZdZRS(sHandles management of configuration.

    Provides an interface to accessing and managing configuration files.

    This class converts provides an API that takes "section.key-name" style
    keys and stores the value associated with it as "key-name" under the
    section "section".

    This allows for a clean interface wherein the both the section and the
    key-name are preserved in an easy to manage form in the configuration files
    and the data stored is also nice.
    cCstt|jtjtjtjdg}||krhtdj	dj
tt|d n||_
||_tjtjtjtjtjg|_ddg|_d|jD|_d|jD|_g|_dS(Ns5Got invalid value for load_only - should be one of {}s, itversionthelpcSsi|]}g|qS(((t.0tvariant((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pys
<dictcomp>s	cSsi|]}i|qS(((R9R:((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pys
<dictcomp>s	(tsuperR6t__init__R0RRR!tNoneRRR+tmaptreprtisolatedt	load_onlyR#R%t_override_ordert_ignore_env_namest_parserst_configt_modified_parsers(tselfR@RAt_valid_load_only((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyR<qs%		'cCs$|j|js |jndS(sELoads configuration from configuration files and environment
        N(t_load_config_filesR@t_load_environment_vars(RG((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pytloads
	cCsF|jdk	stdy|jdSWntk
rAdSXdS(s@Returns the file with highest priority in configuration
        s)Need to be specified a file to be editingiN(RAR=tAssertionErrort_get_parser_to_modifyt
IndexError(RG((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pytget_file_to_edits	
cCs
|jjS(s`Returns key-value pairs like dict.items() representing the loaded
        configuration
        (t_dictionarytitems(RG((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyRQscCs<y|j|SWn&tk
r7tdj|nXdS(s,Get a value from the configuration.
        sNo such key - {}N(RPtKeyErrorRR(RGtkey((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyt	get_values
cCs|j|jst|j\}}|dk	r~t|\}}|j|sh|j|n|j|||n||j	|j|<|j
||dS(s-Modify a value in the configuration.
        N(t_ensure_have_load_onlyRARLRMR=Rthas_sectiontadd_sectiontsetREt_mark_as_modified(RGRStvaluetfnametparsertsectionR((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyt	set_values
cCs|j|jst||j|jkrGtdj|n|j\}}|dk	rt|\}}|j	|o|j
||stdn|j|s|j|n|j
||n|j|j|=dS(s#Unset a value in the configuration.sNo such key - {}s4Fatal Internal error [id=1]. Please report as a bug.N(RURARLRERRRMR=RRVt
remove_optionRQtremove_sectionRY(RGRSR[R\R]R((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pytunset_values
cCss|jxb|jD]W\}}tjd|ttjj|t|d}|j	|WdQXqWdS(s*Save the current in-memory state.
        s
Writing to %stwN(
RURFtloggertinfoRR)R*tdirnametopentwrite(RGR[R\tf((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pytsaves
cCs5|jdkrtdntjd|jdS(Ns'Needed a specific file to be modifying.s$Will be working with %s variant only(RAR=RRctdebug(RG((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyRUscCs2i}x%|jD]}|j|j|qW|S(s<A dictionary representing the loaded configuration.
        (RBtupdateRE(RGtretvalR:((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyRPscCst|j}|tjdd!tjgkrCtjddSx|jD]\}}xq|D]i}|j	dk	r||j	krtjd||qcn|j||}|j|j
||fqcWqPWdS(s5Loads configuration from configuration files
        iisZSkipping loading configuration files due to environment's PIP_CONFIG_FILE being os.devnullNs Skipping file '%s' (variant: %s)(tdicttiter_config_filesR0R#R)tdevnullRcRjRQRAR=t
_load_fileRDtappend(RGtconfig_filesR:tfilesR[R\((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyRI	s 

cCsltjd|||j|}xC|jD]5}|j|}|j|j|j||q/W|S(Ns'For variant '%s', will try loading '%s'(RcRjt_construct_parsertsectionsRQRERkt_normalized_keys(RGR:R[R\R]RQ((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyRp$s$cCstj}tjj|ry|j|Wqtk
ritddjt	j
td|qtjk
r}td|qXn|S(Ntreasonscontains invalid {} charactersR[terror(
RtRawConfigParserR)R*texiststreadtUnicodeDecodeErrorRRtlocaletgetpreferredencodingtFalsetError(RGR[R\Rx((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyRt/s
cCs-|jtjj|jd|jdS(s7Loads configuration from environment variables
        s:env:N(RER0R%RkRvtget_environ_vars(RG((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyRJFscCs?i}x2|D]*\}}|dt|}|||<q
W|S(sNormalizes items to construct a dictionary with normalized keys.

        This routine is where the names become keys and are made the same
        regardless of source - configuration files or environment.
        R(R(RGR]RQt
normalizedRtvalRS((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyRvNs
ccsjxctjjD]R\}}|jdoA|dj|jk}|r|dj|fVqqWdS(s@Returns a generator with all environmental vars with prefix PIP_tPIP_iN(R)tenvironRQRRRC(RGRSRtshould_be_yielded((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyR[s
ccstjjdd}|dk	r5tj|gfVntjgfVt}tj|tjfV|jo|otj	j
|}|rtj|tjfVntj|tjfVdS(sYields variant and configuration files associated with it.

        This should be treated like items of a dictionary.
        tPIP_CONFIG_FILEN(
R)RtgetR=R0R#R5RR@R*RzRR!(RGtconfig_fileRrtshould_load_user_config((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyRngs		
cCs|j|S(s#Get values present in a config file(RE(RGR:((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pytget_values_in_configscCs<|jst|j|j}|s4tdn|dS(Ns4Fatal Internal error [id=2]. Please report as a bug.i(RARLRDR(RGtparsers((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyRMscCs2||f}||jkr.|jj|ndS(N(RFRq(RGR[R\tfile_parser_tuple((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyRYscCsdj|jj|jS(Ns{}({!r})(Rt	__class__t__name__RP(RG((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyt__repr__sN(Rt
__module__t__doc__R=R<RKRORQRTR^RaRiRUtpropertyRPRIRpRtRJRvRRnRRMRYR(((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyR6cs,														
					()RR}tloggingR)R-tpip._vendor.six.movesRtpip._internal.exceptionsRRtpip._internal.utilsRtpip._internal.utils.compatRRtpip._internal.utils.miscRRtpip._internal.utils.typingRttypingR	R
RRR
RRRytstrRt	getLoggerRRcRRR0R,R5tobjectR6(((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/configuration.pyt<module>s44