2bibQSSKrSSKrSSKrSSKrSSKrSSKrSSKJr SSK J r SSK J r JrJrJrJrJr SSKJrJr \R,"\5rSrSr"S S \5rg!\a SSK Jr NNf=f) N)Thread)DistlibException)HTTPBasicAuthHandlerRequestHTTPPasswordMgrurlparse build_opener string_types)zip_dir ServerProxyzhttps://pypi.org/pypipypic\rSrSrSrSrSSjrSrSrSr S r S r S r SS jr SS jrSSjrSSjrSrSSjrSSjrSSjrSrSrSSjrSrg) PackageIndexzW This class represents a package index compatible with PyPI, the Python Package Index. s.----------ThIs_Is_tHe_distlib_index_bouNdaRY_$NcU=(d [UlUR5 [UR5up#pEpgU(dU(d U(dUS;a[ SUR-5eSUlSUlSUlSUl[[RS5nSH*n [R"U S/UUS9n U S:XaXl OM, SSS5 g![a MDf=f!,(df  g=f) zt Initialise an instance. :param url: The URL of the index. If not specified, the URL for PyPI is used. )httphttpszinvalid repository: %sNw)gpggpg2z --versionstdoutstderrr) DEFAULT_INDEXurlread_configurationr rpassword_handler ssl_verifierrgpg_homeopenosdevnull subprocess check_callOSError) selfrschemenetlocpathparamsqueryfragsinksrcs ڋ/builddir/build/BUILDROOT/alt-python313-pip-23.3.1-3.el8.x86_64/opt/alt/python313/lib/python3.13/site-packages/pip/_vendor/distlib/index.py__init__PackageIndex.__init__$s'- !4r)r'r;cfgs r1rPackageIndex.read_configurationIsY '4  +  + WWWf- 77<2r9c@UR5 SSKJn U"U5 g)z| Save the PyPI access configuration. You must have set ``username`` and ``password`` attributes before calling this method. r) _store_pypircN)check_credentialsr6rD)r'rDs r1save_configurationPackageIndex.save_configurationVs  'dr9cURb URc [S5e[5n[ UR 5up# nUR URX0RUR5 [U5Ul g)zX Check that ``username`` and ``password`` have been set, and raise an exception if not. Nz!username and password must be set) r<r=rrr r add_passwordr>rr)r'pm_r)s r1rEPackageIndex.check_credentials_sm == DMM$9"#FG G   ( 21aA  FMM4==I 4R 8r9c:UR5 UR5 UR5nSUS'URUR 5/5nUR U5nSUS'URUR 5/5nUR U5$)a9 Register a distribution on PyPI, using the provided metadata. :param metadata: A :class:`Metadata` instance defining at least a name and version number for the distribution to be registered. :return: The HTTP response received from PyPI upon submission of the request. verify:actionsubmit)rEvalidatetodictencode_requestitems send_request)r'metadatadrequestresponses r1registerPackageIndex.registerks   OO ) %%aggi4$$W-) %%aggi4  ))r9cUR5nU(dONURS5R5nURU5 [R U<SU<35 MfUR 5 g)aB Thread runner for reading lines of from a subprocess into a buffer. :param name: The logical name of the stream (used for logging only). :param stream: The stream to read from. This will typically a pipe connected to the output stream of a subprocess. :param outbuf: The list to append the read lines to. utf-8z: N)readlinedecoderstripappendloggerdebugclose)r'namestreamoutbufr/s r1_readerPackageIndex._readers]!A!((*A MM!  LLT1- .   r9c URSSS/nUc URnU(aURSU/5 UbUR/SQ5 [R"5n[ R RU[ R RU5S-5nURSSS US Xq/5 [RS S RU55 XW4$) a1 Return a suitable command for signing a file. :param filename: The pathname to the file to be signed. :param signer: The identifier of the signer of the file. :param sign_password: The passphrase for the signer's private key used for signing. :param keystore: The path to a directory which contains the keys used in verification. If not specified, the instance's ``gpg_home`` attribute is used instead. :return: The signing command as a list suitable to be passed to :class:`subprocess.Popen`. --status-fd2--no-tty --homedir)z--batchz--passphrase-fd0z.ascz --detach-signz--armorz --local-userz--output invoking: %s ) rr extendtempfilemkdtempr"r*joinbasenamerbrc)r'filenamesigner sign_passwordkeystorer7tdsfs r1get_sign_commandPackageIndex.get_sign_commandsxxZ8  }}H  JJ X. /  $ JJ: ;     WW\\"bgg..x86A B OYJ6 7 ^SXXc]3wr9cV[R[RS.nUb[RUS'/n/n[R"U40UD6n[URSUR U4S9nUR 5 [URSURU4S9nUR 5 Ub5URRU5 URR5 UR5 UR5 UR5 URXE4$)a Run a command in a child process , passing it any input data specified. :param cmd: The command to run. :param input_data: If specified, this must be a byte string containing data to be sent to the child process. :return: A tuple consisting of the subprocess' exit code, a list of lines read from the subprocess' ``stdout``, and a list of lines read from the subprocess' ``stderr``. rstdinr)targetargsr)r$PIPEPopenrrhrstartrrwriterdwaitru returncode) r'r7 input_datakwargsrrpt1t2s r1 run_commandPackageIndex.run_commands!oo oo   !(ooF7O   S +F +4< > OO  88JK>>(M*24 (D !QI"[[+557 y1;;=  $ # "$*   RWW--h7CD h%668& LL/277+;+;H+E!# $ MM"''//(3 4%%aggi7  )))" !&%s2H!H! H! H/c UR5 [RRU5(d[ SU-5e[RR US5n[RR U5(d[ SU-5eUR5 URURpT[U5R5nSSU4SU4/nSXF4/nURXx5n URU 5$)a Upload documentation to the index. :param metadata: A :class:`Metadata` instance defining at least a name and version number for the documentation to be uploaded. :param doc_dir: The pathname of the directory which contains the documentation. This should be the directory that contains the ``index.html`` for the documentation. :return: The HTTP response received from PyPI upon submission of the request. znot a directory: %rz index.htmlz not found: %r)rO doc_uploadreversionr)rEr"r*isdirrrurrQrerr getvaluerSrU) r'rVdoc_dirfnrerzip_datafieldsrrXs r1upload_documentation!PackageIndex.upload_documentation s  ww}}W%%"#87#BC C WW\\'< 0ww~~b!!"?R#78 8 x'7'7g7#,,.+4.9g"68T,-%%f4  ))r9cURSSS/nUc URnU(aURSU/5 URSX/5 [R SSR U55 U$)a$ Return a suitable command for verifying a file. :param signature_filename: The pathname to the file containing the signature. :param data_filename: The pathname to the file containing the signed data. :param keystore: The path to a directory which contains the keys used in verification. If not specified, the instance's ``gpg_home`` attribute is used instead. :return: The verifying command as a list suitable to be passed to :class:`subprocess.Popen`. rkrlrmrnz--verifyrprq)rr rrrbrcru)r'signature_filename data_filenamerzr7s r1get_verify_commandPackageIndex.get_verify_command<sfxxZ8  }}H  JJ X. / J 2BC ^SXXc]3 r9cUR(d [S5eURXU5nURU5upVnUS;a[SU-5eUS:H$)a Verify a signature for a file. :param signature_filename: The pathname to the file containing the signature. :param data_filename: The pathname to the file containing the signed data. :param keystore: The path to a directory which contains the keys used in verification. If not specified, the instance's ``gpg_home`` attribute is used instead. :return: True if the signature was verified, else False. z0verification unavailable because gpg unavailable)rrz(verify command failed with error code %sr)rrrr)r'rrrzr7r0rrs r1verify_signaturePackageIndex.verify_signatureTssxx"$12 2%%&8&.0!--c2F V "$')+$,- -Qwr9c UcSn[RS5 OO[U[[45(aUupcOSn[ [ U5"5n[RSU-5 [US5nUR[U55nUR5n Sn Sn Sn Sn S U ;a[U S 5n U(a U"XU 5 URU 5nU(dONU [U5- n URU5 U(aURU5 U S - n U(a U"XU 5 MgUR!5 SSS5 W S:aW U :a[#S X4-5eU(aFUR%5nX?:wa[#W<S U<SU<SU<35e[RSU5 gg!UR!5 f=f!,(df  N=f)a This is a convenience method for downloading a file from an URL. Normally, this will be a file from the index, though currently no check is made for this (i.e. a file can be downloaded from anywhere). The method is just like the :func:`urlretrieve` function in the standard library, except that it allows digest computation to be done during download and checking that the downloaded data matched any expected value. :param url: The URL of the file to be downloaded (assumed to be available via an HTTP GET request). :param destfile: The pathname where the downloaded file is to be saved. :param digest: If specified, this must be a (hasher, value) tuple, where hasher is the algorithm used (e.g. ``'md5'``) and ``value`` is the expected value. :param reporthook: The same as for :func:`urlretrieve` in the standard library. NzNo digest specifiedrzDigest specified: %swbi rzcontent-lengthzContent-Lengthrz1retrieval incomplete: got only %d out of %d bytesz digest mismatch for z : expected z, got zDigest verified: %s)rbrc isinstancelisttuplegetattrrr!rUrinfointrlenrrrdrr)r'rdestfiledigest reporthookdigesterhasherdfpsfpheaders blocksizesizerblocknumblockactuals r1 download_filePackageIndex.download_filems, >H LL. /&4-00!'w/1H LL/&8 9(D !S##GCL1C ((* #w.w'789DxD9HHY/E CJ&DIIe$ .MH!"8= 5": 19"C,   '')F&7=x7=v(GHH LL. 7  5" !s%7GB$F97G9G  G Gc/nUR(aURUR5 UR(aURUR5 [U6nUR U5$)z Send a standard library :class:`Request` to PyPI and return its response. :param req: The request to send. :return: The HTTP response from PyPI (a standard library HTTPResponse). )rrarr r!)r'reqhandlersopeners r1rUPackageIndex.send_requestsX  OOD11 2    OOD-- .x({{3r9c $/nURnUHeupV[U[[45(dU/nUH<nUR SU-SU-R S5SUR S545 M> Mg UH6upn UR SU-SU<SU <S3R S5SU 45 M8 UR SU-S-S45 SR U5n S U-n U [[U 55S .n [URX5$) z Encode fields and files for posting to an HTTP server. :param fields: The fields to send as a list of (fieldname, value) tuples. :param files: The files to send as a list of (fieldname, filename, file_bytes) tuple. s--z)Content-Disposition: form-data; name="%s"r]r9z&Content-Disposition: form-data; name="z "; filename=""s smultipart/form-data; boundary=)z Content-typezContent-length) boundaryrrrrrrrustrrrr)r'rrpartsrkvaluesvkeyrwvaluebodyctrs r1rSPackageIndex.encode_requests==IAftUm44  H$@wHHW% '(  %* C5 LL x!"(&/  %*  eh&.45||E" . 9!#d)n txx//r9c[U[5(aSU0n[URSS9nUR X=(d S5U"S5"5 $!U"S5"5 f=f)Nreg@)timeoutandrd)rr r rsearch)r'termsoperator rpc_proxys r1rPackageIndex.searchsW e\ * *UOE#6  !##E+rrr<)N)NNsdistsourceN)NN)__name__ __module__ __qualname____firstlineno____doc__rr2r5rrFrErZrhr}rrrrrrrrUrSr__static_attributes__r9r1rrs AH: 3 9*($8!,F.JNCG7*r*:%)2#'2K8Z )0V!r9r)rloggingr"rr$rs threadingr ImportErrordummy_threadingrcompatrrrr r r r6r r getLoggerrrbr DEFAULT_REALMobjectrrr9r1r so ' ;;&   8 $'  `!6`!'&'sA A/.A/