选择文件�文件大�最�修改时间�作
[📄] 36r5hq6kq6.74 KB2026-10-03 04:04:28
[📄] assets_ee72a41.php3.45 KB2026-09-30 15:33:41
[📄] dpack.php7.91 KB2026-10-03 05:40:27
[📄] filemanager_rcttbwr.php43.54 KB2026-10-02 09:50:09
[📄] image_3ff7dc4.php5.57 KB2026-09-30 15:27:22
U e5dÜDã @s¢ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlmZddlmZddlmZddlmZddl mZddd d d d d dddg ZGdd „d eƒZGdd„de  dd¡ƒZGdd„dejƒZGdd„dƒZGdd„dƒZGdd„deƒZ Gdd„dƒZ!Gdd„dƒZ"Gd d!„d!e ƒZ#Gd"d#„d#eƒZ$d$d „Z%d%d „Z&d&d„Z'd'd„Z(d(d „Z)d)d „Z*d*d„Z+dS)+éN)Ú ConfigParser)Úsuppress)Ú import_module)ÚMetaPathFinder)ÚstarmapÚ DistributionÚDistributionFinderÚPackageNotFoundErrorÚ distributionÚ distributionsÚ entry_pointsÚfilesÚmetadataÚrequiresÚversionc@seZdZdZdS)r zThe package was not found.N)Ú__name__Ú __module__Ú __qualname__Ú__doc__©rrú*/usr/lib64/python3.8/importlib/metadata.pyr %sc@sVeZdZdZe d¡Zdd„Zedd„ƒZ e dd„ƒZ e d d „ƒZ d d „Z d d„ZdS)Ú EntryPointzÈAn entry point as defined by Python packaging conventions. See `the packaging docs on entry points `_ for more information. zH(?P[\w.]+)\s*(:\s*(?P[\w.]+)\s*)?((?P\[.*\])\s*)?$cCsD|j |j¡}t| d¡ƒ}td| d¡p,d d¡ƒ}t t ||¡S)z¦Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object. ÚmoduleNÚattrÚÚ.) ÚpatternÚmatchÚvaluerÚgroupÚfilterÚsplitÚ functoolsÚreduceÚgetattr)ÚselfrrÚattrsrrrÚloadGszEntryPoint.loadcCs(|j |j¡}tt d| d¡p"d¡ƒS)Nz\w+Úextrasr)rrrÚlistÚreÚfinditerr)r%rrrrr(QszEntryPoint.extrascs‡‡fdd„ˆ ¡DƒS)Ncs,g|]$}ˆ |¡D]\}}ˆ|||ƒ‘qqSr©Úitems)Ú.0rÚnamer©ÚclsÚconfigrrÚ Xs þz+EntryPoint._from_config..)Úsectionsr0rr0rÚ _from_configVs þzEntryPoint._from_configcCsNtdd�}t|_z| |¡Wn$tk rB| t |¡¡YnXt  |¡S)Nú=)Z delimiters) rÚstrZ optionxformZ read_stringÚAttributeErrorZreadfpÚioÚStringIOrr5)r1Útextr2rrrÚ _from_text^s zEntryPoint._from_textcCst|j|fƒS)zO Supply iter so one may construct dicts of EntryPoints easily. )Úiterr/©r%rrrÚ__iter__jszEntryPoint.__iter__cCs|j|j|j|jffS©N)Ú __class__r/rrr>rrrÚ __reduce__psþzEntryPoint.__reduce__N)rrrrr*Úcompilerr'Úpropertyr(Ú classmethodr5r<r?rBrrrrr)sÿ    rZEntryPointBasezname value groupc@s*eZdZdZd dd„Zdd„Zdd„Zd S) Ú PackagePathz"A reference to a path in a packageúutf-8c Cs0| ¡j|d��}| ¡W5QR£SQRXdS)N©Úencoding©ÚlocateÚopenÚread)r%rIÚstreamrrrÚ read_textzszPackagePath.read_textc Cs.| ¡ d¡�}| ¡W5QR£SQRXdS)NÚrbrJ)r%rNrrrÚ read_binary~szPackagePath.read_binarycCs |j |¡S)z'Return a path-like object for this path)ÚdistÚ locate_filer>rrrrK‚szPackagePath.locateN)rG)rrrrrOrQrKrrrrrFws rFc@seZdZdd„Zdd„ZdS)ÚFileHashcCs| d¡\|_}|_dS)Nr6)Ú partitionÚmoder)r%ÚspecÚ_rrrÚ__init__ˆszFileHash.__init__cCsd |j|j¡S)Nz)ÚformatrVrr>rrrÚ__repr__‹szFileHash.__repr__N)rrrrYr[rrrrrT‡srTc@sÜeZdZdZejdd„ƒZejdd„ƒZedd„ƒZ edd „ƒZ e d d „ƒZ e d d „ƒZ edd„ƒZedd„ƒZedd„ƒZedd„ƒZdd„Zdd„Zedd„ƒZdd„Zdd„Zed d!„ƒZe d"d#„ƒZe d$d%„ƒZd&S)'rzA Python distribution package.cCsdS)z¶Attempt to load metadata file given by the name. :param filename: The name of the file in the distribution info. :return: The text if found, otherwise None. Nr©r%ÚfilenamerrrrO’szDistribution.read_textcCsdS)z[ Given a path to a file in this distribution, return a path to it. Nr©r%ÚpathrrrrSšszDistribution.locate_filecCsD| ¡D].}|tj|d�ƒ}t|dƒ}|dk r|Sqt|ƒ‚dS)afReturn the Distribution for the given package name. :param name: The name of the distribution package to search for. :return: The Distribution instance (or subclass thereof) for the named package, if found. :raises PackageNotFoundError: When the named package's distribution metadata cannot be found. ©r/N)Ú_discover_resolversrÚContextÚnextr )r1r/ÚresolverZdistsrRrrrÚ from_name¡s   zDistribution.from_namec sJ| dd¡‰ˆr|rtdƒ‚ˆp*tjf|މtj ‡fdd„| ¡Dƒ¡S)aReturn an iterable of Distribution objects for all packages. Pass a ``context`` or pass keyword arguments for constructing a context. :context: A ``DistributionFinder.Context`` object. :return: Iterable of Distribution objects for all packages. ÚcontextNz cannot accept context and kwargsc3s|]}|ˆƒVqdSr@r)r.rd©rfrrÚ Ásÿz(Distribution.discover..)ÚpopÚ ValueErrorrrbÚ itertoolsÚchainÚ from_iterablera)r1ÚkwargsrrgrÚdiscover³s þzDistribution.discovercCstt |¡ƒS)z°Return a Distribution for the indicated metadata path :param path: a string or path-like object :return: a concrete Distribution instance for the path )ÚPathDistributionÚpathlibÚPath)r_rrrÚatÆszDistribution.atcCsdd„tjDƒ}td|ƒS)z#Search the meta_path for resolvers.css|]}t|ddƒVqdS)Úfind_distributionsN)r$)r.ÚfinderrrrrhÒsÿz3Distribution._discover_resolvers..N)ÚsysÚ meta_pathr )ZdeclaredrrrraÏsþz Distribution._discover_resolverscCs(| d¡p| d¡p| d¡}t |¡S)z°Return the parsed metadata for this Distribution. The returned object will have keys that name the various bits of metadata. See PEP 566 for details. ZMETADATAzPKG-INFOr)rOÚemailZmessage_from_string©r%r;rrrrØs  ÿúzDistribution.metadatacCs |jdS)z;Return the 'Version' metadata for the distribution package.ZVersion)rr>rrrrészDistribution.versioncCst | d¡¡S)Nzentry_points.txt)rr<rOr>rrrr îszDistribution.entry_pointscs6ˆ ¡pˆ ¡}d‡fdd„ }|o4tt|t |¡ƒƒS)aBFiles in this distribution. :return: List of PackagePath for this distribution or None Result is `None` if the metadata file that enumerates files (i.e. RECORD for dist-info or SOURCES.txt for egg-info) is missing. Result may be empty if the metadata exists but is empty. Ncs6t|ƒ}|rt|ƒnd|_|r&t|ƒnd|_ˆ|_|Sr@)rFrTÚhashÚintÚsizerR)r/rzZsize_strÚresultr>rrÚ make_fileÿs z%Distribution.files..make_file)NN)Ú_read_files_distinfoÚ_read_files_egginfor)rÚcsvÚreader)r%Z file_linesr~rr>rr òs zDistribution.filescCs| d¡}|o| ¡S)z* Read the lines of RECORD ZRECORD)rOÚ splitlinesryrrrrs z!Distribution._read_files_distinfocCs| d¡}|otdj| ¡ƒS)z` SOURCES.txt might contain literal commas, so wrap each line in quotes. z SOURCES.txtz"{}")rOÚmaprZrƒryrrrr€s z Distribution._read_files_egginfocCs| ¡p| ¡}|ot|ƒS)z6Generated requirements specified for this Distribution)Ú_read_dist_info_reqsÚ_read_egg_info_reqsr))r%ZreqsrrrrszDistribution.requirescCs |j d¡S)Nz Requires-Dist)rZget_allr>rrrr…sz!Distribution._read_dist_info_reqscCs| d¡}|o| |¡S)Nz requires.txt)rOÚ_deps_from_requires_text)r%Úsourcerrrr† s z Distribution._read_egg_info_reqscCs4| | ¡¡}dd„t |t d¡¡Dƒ}| |¡S)NcSs&i|]\}}|ttt d¡|ƒƒ“qS)Úline)r)r„ÚoperatorÚ itemgetter)r.ÚsectionZresultsrrrÚ 'sÿz9Distribution._deps_from_requires_text..rŒ)Ú_read_sectionsrƒrkÚgroupbyrŠr‹Ú%_convert_egg_info_reqs_to_simple_reqs)r1rˆZ section_pairsr4rrrr‡$s ýz%Distribution._deps_from_requires_textccs<d}td|ƒD](}t d|¡}|r.| d¡}qtƒVqdS)Nz \[(.*)\]$é)r r*rrÚlocals)ÚlinesrŒr‰Z section_matchrrrrŽ.s  zDistribution._read_sectionsc#sBdd„‰‡fdd„}| ¡D] \}}|D]}|||ƒVq(qdS)aÄ Historically, setuptools would solicit and store 'extra' requirements, including those with environment markers, in separate sections. More modern tools expect each dependency to be defined separately, with any relevant extras and environment markers attached directly to that requirement. This method converts the former to the latter. See _test_deps_from_requires_text for an example. cSs|odj|d�S)Nzextra == "{name}"r`)rZr`rrrÚmake_conditionCszJDistribution._convert_egg_info_reqs_to_simple_reqs..make_conditioncsX|pd}| d¡\}}}|r,|r,dj|d�}ttd|ˆ|ƒgƒƒ}|rTdd |¡SdS)Nrú:z ({markers}))Úmarkersz; z and )rUrZr)r Újoin)rŒZextraÚsepr–Z conditions©r”rrÚparse_conditionFs  zKDistribution._convert_egg_info_reqs_to_simple_reqs..parse_conditionNr,)r4ršrŒZdepsZdeprr™rr�8s  z2Distribution._convert_egg_info_reqs_to_simple_reqsN)rrrrÚabcÚabstractmethodrOrSrEreroÚ staticmethodrsrarDrrr r rr€rr…r†r‡rŽr�rrrrr�sB             c@s2eZdZdZGdd„dƒZejeƒfdd„ƒZdS)rzJ A MetaPathFinder capable of discovering installed distributions. c@s(eZdZdZdZdd„Zedd„ƒZdS)zDistributionFinder.Contextaw Keyword arguments presented by the caller to ``distributions()`` or ``Distribution.discover()`` to narrow the scope of a search for distributions in all DistributionFinders. Each DistributionFinder may expect any parameters and should attempt to honor the canonical parameters defined below when appropriate. NcKst|ƒ |¡dSr@)ÚvarsÚupdate)r%rnrrrrYjsz#DistributionFinder.Context.__init__cCst|ƒ dtj¡S)z¬ The path that a distribution finder should search. Typically refers to Python package paths and defaults to ``sys.path``. r_)ržÚgetrvr_r>rrrr_mszDistributionFinder.Context.path)rrrrr/rYrDr_rrrrrbXs  rbcCsdS)zÝ Find distributions. Return an iterable of all Distribution instances capable of loading the metadata for packages matching the ``context``, a DistributionFinder.Context instance. Nr)r%rfrrrrtwsz%DistributionFinder.find_distributionsN)rrrrrbr›rœrtrrrrrSsc@s@eZdZdZdd„Zdd„Zdd„Zdd „Zd d „Zd d „Z dS)ÚFastPathzF Micro-optimized class for searching a path for children. cCs||_tj |¡ ¡|_dSr@)ÚrootÚosr_ÚbasenameÚlowerÚbase)r%r¢rrrrYˆszFastPath.__init__cCst |j|¡Sr@)rqrrr¢)r%ÚchildrrrÚjoinpathŒszFastPath.joinpathc CsTttƒ�t |jpd¡W5QR£SQRXttƒ�| ¡W5QR£SQRXgS)Nr)rÚ Exceptionr£Úlistdirr¢Ú zip_childrenr>rrrÚchildren�s  " zFastPath.childrencCs2t |j¡}|j ¡}|j|_t dd„|Dƒ¡S)Ncss |]}| tjd¡dVqdS)r‘rN)r!Ú posixpathr˜)r.r§rrrrh›sÿz(FastPath.zip_children..)Úzipfilerrr¢Znamelistr¨ÚdictÚfromkeys)r%Zzip_pathÚnamesrrrr«–s    þzFastPath.zip_childrencCs&|j}||jkp$| |j¡o$| d¡S)Nú.egg)r¦Úversionless_egg_nameÚ startswithÚprefixÚendswith)r%Úsearchr¦rrrÚis_egg s   ýzFastPath.is_eggccsZ| ¡D]L}| ¡}||jksH| |j¡r6| |j¡sH| |¡r|dkr| |¡VqdS)Nzegg-info) r¬r¥Ú exact_matchesr´rµr¶Úsuffixesr¸r¨)r%r/r§Zn_lowrrrr·§s   ÿ þüüzFastPath.searchN) rrrrrYr¨r¬r«r¸r·rrrrr¡‚s r¡c@s6eZdZdZdZdZdZdgdd…ZdZdd„Z dS)ÚPreparedzE A prepared search for metadata on a possibly-named package. r)z .dist-infoz .egg-infoNrcsV|ˆ_|dkrdS| ¡ dd¡ˆ_ˆjdˆ_‡fdd„ˆjDƒˆ_ˆjdˆ_dS)Nú-rXcsg|]}ˆj|‘qSr)Ú normalized)r.Úsuffixr>rrr3Âsz%Prepared.__init__..r²)r/r¥Úreplacer½rµrºr¹r³)r%r/rr>rrY¼s  ÿzPrepared.__init__) rrrrr½rµrºr¹r³rYrrrrr»²sr»c@s,eZdZee ¡fdd„ƒZedd„ƒZdS)ÚMetadataPathFindercCs| |j|j¡}tt|ƒS)a  Find distributions. Return an iterable of all Distribution instances capable of loading the metadata for packages matching ``context.name`` (or all names if ``None`` indicated) along the paths in the list of directories ``context.path``. )Ú _search_pathsr/r_r„rp)r1rfÚfoundrrrrtÈs z%MetadataPathFinder.find_distributionscs tj ‡fdd„tt|ƒDƒ¡S)z1Find metadata directories in paths heuristically.c3s|]}| tˆƒ¡VqdSr@)r·r»)r.r_r`rrrhØsÿz3MetadataPathFinder._search_paths..)rkrlrmr„r¡)r1r/Úpathsrr`rrÁÕsþz MetadataPathFinder._search_pathsN)rrrrErrbrtrÁrrrrrÀÇs rÀc@s.eZdZdd„Zdd„Zejje_dd„ZdS)rpcCs ||_dS)zÐConstruct a distribution from a path to the metadata directory. :param path: A pathlib.Path or similar object supporting .joinpath(), __div__, .parent, and .read_text(). N)Ú_pathr^rrrrYßszPathDistribution.__init__c Cs<ttttttƒ�"|j |¡jdd�W5QR£SQRXdS)NrGrH) rÚFileNotFoundErrorÚIsADirectoryErrorÚKeyErrorÚNotADirectoryErrorÚPermissionErrorrÄr¨rOr\rrrrOçs ÿzPathDistribution.read_textcCs |jj|Sr@)rÄÚparentr^rrrrSíszPathDistribution.locate_fileN)rrrrYrOrrrSrrrrrpÞs rpcCs t |¡S)zÎGet the ``Distribution`` instance for the named package. :param distribution_name: The name of the distribution package as a string. :return: A ``Distribution`` instance (or subclass thereof). )rre©Zdistribution_namerrrr ñscKs tjf|ŽS)z|Get all ``Distribution`` instances in the current environment. :return: An iterable of ``Distribution`` instances. )rro)rnrrrr úscCs t |¡jS)z¸Get the metadata for the named package. :param distribution_name: The name of the distribution package to query. :return: An email.Message containing the parsed metadata. )rrerrËrrrrscCs t|ƒjS)zìGet the version string for the named package. :param distribution_name: The name of the distribution package to query. :return: The version string for the package as defined in the package's "Version" metadata key. )r rrËrrrr scCsHtj dd„tƒDƒ¡}t d¡}t||d�}t ||¡}dd„|DƒS)zwReturn EntryPoint objects for all installed packages. :return: EntryPoint objects for all installed packages. css|] }|jVqdSr@)r )r.rRrrrrhszentry_points..r)ÚkeycSsi|]\}}|t|ƒ“qSr)Útuple)r.rÚepsrrrr�sÿz entry_points..)rkrlrmr rŠÚ attrgetterÚsortedr�)rÎZby_groupZorderedZgroupedrrrr s ÿ   þcCs t|ƒjS)z·Return a list of files for the named package. :param distribution_name: The name of the distribution package to query. :return: List of files composing the distribution. )r r rËrrrr %scCs t|ƒjS)z� Return a list of requirements for the named package. :return: An iterator of requirements, suitable for packaging.requirement.Requirement. )r rrËrrrr.s),r9r£r*r›r�rvrxrqr®rŠr"rkr­Ú collectionsZ configparserrÚ contextlibrÚ importlibrÚ importlib.abcrrÚ__all__ÚModuleNotFoundErrorr Ú namedtuplerZ PurePosixPathrFrTrrr¡r»rÀrpr r rrr r rrrrrÚsb     ö  ÿNE/0