选择文件�文件大�最�修改时间�作
[📄] 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
a fÍCi�ã@sødZddladdlZddladdlZddlZtjdkZerLddlZ ddl Z nddl Z erbddgZ ndgZ e dZ ee ƒZd e ¡Z dd„e DƒZd Zd ZeeZd d „Zd d„Zdd„Zdd„ZerÎdd„Zndd„Zdd„Zdd„Zdd„Zdd„Zdd„Ze�rd d!„Znd"d!„Zd€d$d%„Z e!e j"ƒZ#d& $d'd(¡d)Z%e& 'e%d(¡Z(d*Z)d+Z*d,gZ+d-gZ,e,Z-Z.d�dd.œd/d0„Z/d1d2„Z0d3d4„Z1d5d6„Z2d7d8„Z3d9d:„Z4d;d<„Z5d=d>„Z6d?d@„Z7dAdB„Z8d‚dCdD„Z9dƒdEdF„Z:d„dHdI„Z;dJdK„Zd…de>dLœdMdN„Z?GdOdP„dPƒZ@GdQdR„dRƒZAGdSdT„dTeAƒZBGdUdV„dVƒZCGdWdX„dXeCeBƒZDGdYdZ„dZeCeAƒZEgZFGd[d\„d\eCeAƒZGGd]d^„d^ƒZHGd_d`„d`ƒZIGdadb„dbƒZJGdcdd„ddƒZKd†dedf„ZLdgdh„ZMdidj„ZNdkdl„ZOdmdndodpdqdrdsdtdudvdwdxdydzd{d|d}œZPd~d„ZQdS)‡a^Core implementation of path-based import. This module is NOT meant to be directly imported! It has been designed such that it can be bootstrapped into Python as the implementation of import. As such it requires the injection of specific modules and attributes in order to work. One should use importlib as the public-facing version of this module. éNÚwin32ú\ú/ÚcCsh|]}d|›�’qS©ú:©©Ú.0Úsrrú5/usr/lib64/python3.9/importlib/_bootstrap_external.pyÚ /ór )Úwin)ÚcygwinÚdarwincs<tj t¡r0tj t¡rd‰nd‰‡fdd„}ndd„}|S)NÚ PYTHONCASEOKs PYTHONCASEOKcstjj oˆtjvS)z^True if filenames must be checked case-insensitively and ignore environment flags are not set.)ÚsysÚflagsÚignore_environmentÚ_osÚenvironr©Úkeyrr Ú _relax_case@sz%_make_relax_case.._relax_casecSsdS)z5True if filenames must be checked case-insensitively.Frrrrr rDs)rÚplatformÚ startswithÚ_CASE_INSENSITIVE_PLATFORMSÚ#_CASE_INSENSITIVE_PLATFORMS_STR_KEY)rrrr Ú_make_relax_case9s  rcCst|ƒd@ dd¡S)z*Convert a 32-bit integer to little-endian.ìÿÿéÚlittle)ÚintÚto_bytes)Úxrrr Ú _pack_uint32Jsr&cCs t |d¡S)z/Convert 4 bytes in little-endian to an integer.r"©r#Ú from_bytes©Údatarrr Ú_unpack_uint32Osr+cCs t |d¡S)z/Convert 2 bytes in little-endian to an integer.r"r'r)rrr Ú_unpack_uint16Tsr,cGsä|sdSt|ƒdkr|dSd}g}ttj|ƒD]z\}}| t¡sL| t¡rf| t¡pX|}t |g}q0| d¡r˜|  ¡|  ¡krŒ|}|g}qª|  |¡q0|pž|}|  |¡q0dd„|Dƒ}t|ƒdkrÖ|dsÖ|t S|t   |¡S)úReplacement for os.path.join().rérrcSsg|]}|r| t¡‘qSr©ÚrstripÚpath_separators©r Úprrr Ú rrú_path_join..) ÚlenÚmaprÚ_path_splitrootrÚpath_sep_tupleÚendswithr0r1Úpath_sepÚcasefoldÚappendÚjoin)Ú path_partsÚrootÚpathZnew_rootÚtailrrr Ú _path_join[s*     rCcGst dd„|Dƒ¡S)r-cSsg|]}|r| t¡‘qSrr/)r Úpartrrr r4{sÿr5)r;r>)r?rrr rCys ÿcsBt‡fdd„tDƒƒ}|dkr&dˆfSˆd|…ˆ|dd…fS)z Replacement for os.path.split().c3s|]}ˆ |¡VqdS©N)Úrfindr2©rArr Ú �rz_path_split..rrNr.)Úmaxr1)rAÚirrGr Ú _path_splitsrKcCs t |¡S)z~Stat the path. Made a separate function to make it easier to override in experiments (e.g. cache stat results). )rÚstatrGrrr Ú _path_stat‡srMcCs0z t|ƒ}Wnty YdS0|jd@|kS)z1Test whether the path is the specified mode type.Fið)rMÚOSErrorÚst_mode)rAÚmodeÚ stat_inforrr Ú_path_is_mode_type‘s   rRcCs t|dƒS)zReplacement for os.path.isfile.i€)rRrGrrr Ú _path_isfilešsrScCs|s t ¡}t|dƒS)zReplacement for os.path.isdir.i@)rÚgetcwdrRrGrrr Ú _path_isdirŸsrUcCs>|sdSt |¡d dd¡}t|ƒdko<| d¡p<| d¡S)úReplacement for os.path.isabs.Frrrr.z\\)rr8Úreplacer6rr:)rAr@rrr Ú _path_isabs§srXcCs | t¡S)rV)rr1rGrrr rX¯sé¶c Cs²d |t|ƒ¡}t |tjtjBtjB|d@¡}zFt |d¡�}|  |¡Wdƒn1s^0Yt  ||¡Wn6t y¬zt  |¡Wnt y¤Yn0‚Yn0dS)z¢Best-effort function to write data to a path atomically. Be prepared to handle a FileExistsError if concurrent writing of the temporary file is attempted.ú{}.{}rYÚwbN) ÚformatÚidrÚopenÚO_EXCLÚO_CREATÚO_WRONLYÚ_ioÚFileIOÚwriterWrNÚunlink)rAr*rPÚpath_tmpÚfdÚfilerrr Ú _write_atomic´sÿ(  riia ér"s Ú __pycache__zopt-z.pyz.pyc)Ú optimizationc CsX|dur4t dt¡|dur(d}t|ƒ‚|r0dnd}t |¡}t|ƒ\}}| d¡\}}}tj j } | durrt dƒ‚d  |r~|n||| g¡} |dur¬tj jdkr¤d}ntj j}t|ƒ}|dkrà| ¡sÒtd  |¡ƒ‚d  | t|¡} | td} tjdu�rLt|ƒ�stt ¡|ƒ}|dd k�r8|dtv�r8|d d…}ttj| t¡| ƒSt|t| ƒS) aþGiven the path to a .py file, return the path to its .pyc file. The .py file does not need to exist; this simply returns the path to the .pyc file calculated as if the .py file were imported. The 'optimization' parameter controls the presumed optimization level of the bytecode file. If 'optimization' is not None, the string representation of the argument is taken and verified to be alphanumeric (else ValueError is raised). The debug_override parameter is deprecated. If debug_override is not None, a True value is the same as setting 'optimization' to the empty string while a False value is equivalent to setting 'optimization' to '1'. If sys.implementation.cache_tag is None then NotImplementedError is raised. NzFthe debug_override parameter is deprecated; use 'optimization' insteadz2debug_override or optimization must be set to Nonerr.Ú.ú$sys.implementation.cache_tag is Nonerz{!r} is not alphanumericz{}.{}{}rrj)Ú _warningsÚwarnÚDeprecationWarningÚ TypeErrorrÚfspathrKÚ rpartitionrÚimplementationÚ cache_tagÚNotImplementedErrorr>rÚoptimizeÚstrÚisalnumÚ ValueErrorr\Ú_OPTÚBYTECODE_SUFFIXESÚpycache_prefixrXrCrTr1ÚlstripÚ_PYCACHE) rAÚdebug_overriderlÚmessageÚheadrBÚbaseÚsepÚrestÚtagÚalmost_filenameÚfilenamerrr Úcache_from_sourceisHÿ       ýrŠc Cs.tjjdurtdƒ‚t |¡}t|ƒ\}}d}tjdurftj t ¡}|  |t ¡rf|t |ƒd…}d}|s�t|ƒ\}}|t kr�tt ›d|›�ƒ‚| d¡}|dvr²td|›�ƒ‚n\|d k�r| dd ¡d }|  t¡sätd t›�ƒ‚|t tƒd…}| ¡�std |›d�ƒ‚| d¡d} t|| tdƒS)anGiven the path to a .pyc. file, return the path to its .py file. The .pyc file does not need to exist; this simply returns the path to the .py file calculated to correspond to the .pyc file. If path does not conform to PEP 3147/488 format, ValueError will be raised. If sys.implementation.cache_tag is None then NotImplementedError is raised. NrnFTz not bottom-level directory in rm>rjézexpected only 2 or 3 dots in r‹rjéþÿÿÿz5optimization portion of filename does not start with zoptimization level z is not an alphanumeric valuer)rrurvrwrrsrKr~r0r1rr;r6r€r{ÚcountÚrsplitr|rzÚ partitionrCÚSOURCE_SUFFIXES) rArƒÚpycache_filenameÚfound_in_pycache_prefixÚ stripped_pathÚpycacheÚ dot_countrlÚ opt_levelÚ base_filenamerrr Úsource_from_cache°s<      ÿ   ÿ r˜c Cs|t|ƒdkrdS| d¡\}}}|r8| ¡dd…dkr<|Sz t|ƒ}Wn"ttfyj|dd…}Yn0t|ƒrx|S|S)z¼Convert a bytecode file path to a source path (if possible). This function exists purely for backwards-compatibility for PyImport_ExecCodeModuleWithFilenames() in the C API. rNrméýÿÿÿéÿÿÿÿÚpy)r6rtÚlowerr˜rwr{rS)Ú bytecode_pathr†Ú_Ú extensionÚ source_pathrrr Ú_get_sourcefileØs  r¡cCsH| ttƒ¡r.z t|ƒWSty*YqD0n| ttƒ¡r@|SdSdSrE)r:Útupler�rŠrwr})r‰rrr Ú _get_cachedës  r£cCs2zt|ƒj}Wnty$d}Yn0|dO}|S)z3Calculate the mode permissions for a bytecode file.rYé€)rMrOrN)rArPrrr Ú _calc_mode÷s   r¥csBd‡fdd„ }z tj}Wnty2dd„}Yn0||ˆƒ|S)züDecorator to verify that the module being requested matches the one the loader can handle. The first argument (self) must define _name which the second argument is compared against. If the comparison fails then ImportError is raised. NcsH|dur|j}n |j|kr0td|j|f|d�‚ˆ||g|¢Ri|¤ŽS)Nzloader for %s cannot handle %s©Úname)r§Ú ImportError)Úselfr§ÚargsÚkwargs©Úmethodrr Ú_check_name_wrapper s ÿÿz(_check_name.._check_name_wrappercSs8dD] }t||ƒrt||t||ƒƒq|j |j¡dS)N)Ú __module__Ú__name__Ú __qualname__Ú__doc__)ÚhasattrÚsetattrÚgetattrÚ__dict__Úupdate)ÚnewÚoldrWrrr Ú_wraps z_check_name.._wrap)N)Ú _bootstraprºÚ NameError)r­r®rºrr¬r Ú _check_names   r½cCs<| |¡\}}|dur8t|ƒr8d}t | |d¡t¡|S)z›Try to find a loader for the specified module by delegating to self.find_loader(). This method is deprecated in favor of finder.find_spec(). Nz,Not importing directory {}: missing __init__r)Ú find_loaderr6rorpr\Ú ImportWarning)r©ÚfullnameÚloaderÚportionsÚmsgrrr Ú_find_module_shims rÄcCs¦|dd…}|tkr@d|›d|›�}t d|¡t|fi|¤Ž‚t|ƒdkrjd|›�}t d|¡t|ƒ‚t|dd…ƒ}|d @r¢d |›d |›�}t|fi|¤Ž‚|S) aTPerform basic validity checking of a pyc header and return the flags field, which determines how the pyc should be further validated against the source. *data* is the contents of the pyc file. (Only the first 16 bytes are required, though.) *name* is the name of the module being imported. It is used for logging. *exc_details* is a dictionary passed to ImportError if it raised for improved debugging. ImportError is raised when the magic number is incorrect or when the flags field is invalid. EOFError is raised when the data is found to be truncated. Nr!zbad magic number in z: ú{}éz(reached EOF while reading pyc header of ééüÿÿÿzinvalid flags z in )Ú MAGIC_NUMBERr»Ú_verbose_messager¨r6ÚEOFErrorr+)r*r§Ú exc_detailsÚmagicr‚rrrr Ú _classify_pyc0s     rÎcCsxt|dd…ƒ|d@kr>d|›�}t d|¡t|fi|¤Ž‚|durtt|dd…ƒ|d@krttd|›�fi|¤Ž‚dS)aValidate a pyc against the source last-modified time. *data* is the contents of the pyc file. (Only the first 16 bytes are required.) *source_mtime* is the last modified timestamp of the source file. *source_size* is None or the size of the source file in bytes. *name* is the name of the module being imported. It is used for logging. *exc_details* is a dictionary passed to ImportError if it raised for improved debugging. An ImportError is raised if the bytecode is stale. rÇé r zbytecode is stale for rÅNrÆ)r+r»rÊr¨)r*Ú source_mtimeÚ source_sizer§rÌr‚rrr Ú_validate_timestamp_pycQs  ÿrÒcCs*|dd…|kr&td|›�fi|¤Ž‚dS)aóValidate a hash-based pyc by checking the real source hash against the one in the pyc header. *data* is the contents of the pyc file. (Only the first 16 bytes are required.) *source_hash* is the importlib.util.source_hash() of the source file. *name* is the name of the module being imported. It is used for logging. *exc_details* is a dictionary passed to ImportError if it raised for improved debugging. An ImportError is raised if the bytecode is stale. rÇrÆz.hash in bytecode doesn't match hash of source N)r¨)r*Ú source_hashr§rÌrrr Ú_validate_hash_pycms ÿþrÔcCsPt |¡}t|tƒr8t d|¡|dur4t ||¡|Std  |¡||d�‚dS)z#Compile bytecode as found in a pyc.zcode object from {!r}NzNon-code object in {!r}©r§rA) ÚmarshalÚloadsÚ isinstanceÚ _code_typer»rÊÚ_impÚ_fix_co_filenamer¨r\)r*r§r�r Úcoderrr Ú_compile_bytecode…s     ÿrÝcCsFttƒ}| tdƒ¡| t|ƒ¡| t|ƒ¡| t |¡¡|S)z+Produce the data for a timestamp-based pyc.r©Ú bytearrayrÉÚextendr&rÖÚdumps)rÜÚmtimerÑr*rrr Ú_code_to_timestamp_pyc’s rãTcCs@ttƒ}d|d>B}| t|ƒ¡| |¡| t |¡¡|S)z&Produce the data for a hash-based pyc.r.rÞ)rÜrÓÚcheckedr*rrrr Ú_code_to_hash_pycœs   råcCs>ddl}t |¡j}| |¡}t dd¡}| | |d¡¡S)zyDecode bytes representing source code and return the string. Universal newline support is used in the decoding. rNT)ÚtokenizerbÚBytesIOÚreadlineÚdetect_encodingÚIncrementalNewlineDecoderÚdecode)Ú source_bytesræÚsource_bytes_readlineÚencodingÚnewline_decoderrrr Ú decode_source§s    rð©rÁÚsubmodule_search_locationsc Cs |dur:d}t|dƒrDz| |¡}WqDty6YqD0n t |¡}tj|||d�}d|_|dur˜tƒD]*\}}|  t |ƒ¡rh|||ƒ}||_ q˜qhdS|t urØt|dƒrÞz|  |¡}WntyÊYqÞ0|rÞg|_n||_|jgk�r|�rt|ƒd}|j |¡|S)a=Return a module spec based on a file location. To indicate that the module is a package, set submodule_search_locations to a list of directory paths. An empty list is sufficient, though its not otherwise useful to the import system. The loader must take a spec as its only __init__() arg. Nz Ú get_filename©ÚoriginTÚ is_packager)r³rór¨rrsr»Ú ModuleSpecÚ _set_fileattrÚ_get_supported_file_loadersr:r¢rÁÚ _POPULATEröròrKr=) r§ÚlocationrÁròÚspecÚ loader_classÚsuffixesröÚdirnamerrr Úspec_from_file_location¸s>          rc@sPeZdZdZdZdZdZedd„ƒZedd„ƒZ edd d „ƒZ edd d „ƒZ d S)ÚWindowsRegistryFinderz>Meta path finder for modules declared in the Windows registry.z;Software\Python\PythonCore\{sys_version}\Modules\{fullname}zASoftware\Python\PythonCore\{sys_version}\Modules\{fullname}\DebugFcCs6zt tj|¡WSty0t tj|¡YS0dSrE)ÚwinregÚOpenKeyÚHKEY_CURRENT_USERrNÚHKEY_LOCAL_MACHINE)Úclsrrrr Ú_open_registrys z$WindowsRegistryFinder._open_registrycCs„|jr|j}n|j}|j|dtjdd…d�}z:| |¡�}t |d¡}Wdƒn1s^0YWnt y~YdS0|S)Nz%d.%drj)rÀÚ sys_versionr) Ú DEBUG_BUILDÚREGISTRY_KEY_DEBUGÚ REGISTRY_KEYr\rÚ version_inforrÚ QueryValuerN)rrÀÚ registry_keyrÚhkeyÚfilepathrrr Ú_search_registrysÿ . z&WindowsRegistryFinder._search_registryNcCsx| |¡}|durdSz t|ƒWnty6YdS0tƒD]4\}}| t|ƒ¡r>tj||||ƒ|d�}|Sq>dS)Nrô)rrMrNrùr:r¢r»Úspec_from_loader)rrÀrAÚtargetrrÁrþrürrr Ú find_specs   þzWindowsRegistryFinder.find_speccCs"| ||¡}|dur|jSdSdS)zlFind module named in the registry. This method is deprecated. Use exec_module() instead. N©rrÁ©rrÀrArürrr Ú find_module.s z!WindowsRegistryFinder.find_module)NN)N) r°r¯r±r²r r r Ú classmethodrrrrrrrr rüsÿÿ   rc@s0eZdZdZdd„Zdd„Zdd„Zdd „Zd S) Ú _LoaderBasicszSBase class of common code needed by both SourceLoader and SourcelessFileLoader.cCs@t| |¡ƒd}| dd¡d}| d¡d}|dko>|dkS)z�Concrete implementation of InspectLoader.is_package by checking if the path returned by get_filename has a filename of '__init__.py'.r.rmrrjÚ__init__)rKrórŽrt)r©rÀr‰Ú filename_baseÚ tail_namerrr röAsz_LoaderBasics.is_packagecCsdS©z*Use default semantics for module creation.Nr©r©rürrr Ú create_moduleIsz_LoaderBasics.create_modulecCs8| |j¡}|dur$td |j¡ƒ‚t t||j¡dS)zExecute the module.Nz4cannot load module {!r} when get_code() returns None)Úget_coder°r¨r\r»Ú_call_with_frames_removedÚexecr¶)r©ÚmodulerÜrrr Ú exec_moduleLs  ÿz_LoaderBasics.exec_modulecCs t ||¡S)zThis module is deprecated.)r»Ú_load_module_shim©r©rÀrrr Ú load_moduleTsz_LoaderBasics.load_moduleN)r°r¯r±r²rörr$r'rrrr r<s rc@sJeZdZdd„Zdd„Zdd„Zdd„Zd d „Zd d œd d„Zdd„Z dS)Ú SourceLoadercCst‚dS)z¥Optional method that returns the modification time (an int) for the specified path (a str). Raises OSError when the path cannot be handled. N)rN©r©rArrr Ú path_mtime[szSourceLoader.path_mtimecCsd| |¡iS)ažOptional method returning a metadata dict for the specified path (a str). Possible keys: - 'mtime' (mandatory) is the numeric timestamp of last source code modification; - 'size' (optional) is the size in bytes of the source code. Implementing this method allows the loader to read bytecode files. Raises OSError when the path cannot be handled. râ)r*r)rrr Ú path_statscs zSourceLoader.path_statscCs | ||¡S)zäOptional method which writes data (bytes) to a file path (a str). Implementing this method allows for the writing of bytecode files. The source path is needed in order to correctly transfer permissions )Úset_data)r©r Ú cache_pathr*rrr Ú_cache_bytecodeqszSourceLoader._cache_bytecodecCsdS)z–Optional method which writes data (bytes) to a file path (a str). Implementing this method allows for the writing of bytecode files. Nr)r©rAr*rrr r,{szSourceLoader.set_datac CsT| |¡}z| |¡}Wn2tyJ}ztd|d�|‚WYd}~n d}~00t|ƒS)z4Concrete implementation of InspectLoader.get_source.z'source not available through get_data()r¦N)róÚget_datarNr¨rð)r©rÀrArìÚexcrrr Ú get_source‚s ÿÿzSourceLoader.get_sourcerš)Ú _optimizecCstjt||dd|d�S)z‚Return the code object compiled from source. The 'data' argument can be any object type that compile() supports. r"T)Ú dont_inheritrx)r»r!Úcompile)r©r*rAr2rrr Úsource_to_codeŒs ÿzSourceLoader.source_to_codec Cs| |¡}d}d}d}d}d}z t|ƒ}WntyBd}Y�n*0z| |¡} WntyfY�n0t| dƒ}z| |¡} Wnty”YnØ0||dœ} z”t| || ƒ} t| ƒdd…} | d@dk}|�r| d @dk}t j d k�r2|søt j d k�r2| |¡}t   t |¡}t | ||| ƒnt| || d || ƒWnttf�yLYn 0t d ||¡t| |||d�S|du�r€| |¡}| ||¡}t d|¡tj�s|du�r|du�r|�rÞ|du�rÐt   t |¡}t|||ƒ} nt||t|ƒƒ} z| ||| ¡Wnt�yYn0|S)z¾Concrete implementation of InspectLoader.get_code. Reading of bytecode requires path_stats to be implemented. To write bytecode, set_data must also be implemented. NFTrârÕrÆr.rrjÚneverÚalwaysÚsizez {} matches {})r§r�r zcode object from {})rórŠrwr+rNr#r/rÎÚ memoryviewrÚÚcheck_hash_based_pycsrÓÚ_RAW_MAGIC_NUMBERrÔrÒr¨rËr»rÊrÝr5rÚdont_write_bytecoderårãr6r.)r©rÀr rÐrìrÓÚ hash_basedÚ check_sourcer�Ústr*rÌrÚ bytes_dataÚ code_objectrrr r ”sœ       þ    ÿþ þÿûÿþ    ÿ ÿÿzSourceLoader.get_codeN) r°r¯r±r*r+r.r,r1r5r rrrr r(Ys  r(cs|eZdZdZdd„Zdd„Zdd„Ze‡fdd „ƒZed d „ƒZ d d „Z edd„ƒZ dd„Z dd„Z dd„Zdd„Z‡ZS)Ú FileLoaderzgBase file loader class which implements the loader protocol methods that require file system usage.cCs||_||_dS)zKCache the module name and the path to the file found by the finder.NrÕ)r©rÀrArrr rïszFileLoader.__init__cCs|j|jko|j|jkSrE©Ú __class__r¶©r©Úotherrrr Ú__eq__õs  ÿzFileLoader.__eq__cCst|jƒt|jƒASrE©Úhashr§rA©r©rrr Ú__hash__ùszFileLoader.__hash__cstt|ƒ |¡S)zdLoad a module from a file. This method is deprecated. Use exec_module() instead. )ÚsuperrBr'r&©rDrr r'üs zFileLoader.load_modulecCs|jS©z:Return the path to the source file as found by the finder.rGr&rrr rószFileLoader.get_filenamecCs~t|ttfƒrFt t|ƒ¡�}| ¡WdƒS1s:0Yn4t |d¡�}| ¡WdƒS1sp0YdS)z'Return the data from path as raw bytes.NÚr)rØr(ÚExtensionFileLoaderrbÚ open_coderyÚreadrc)r©rArhrrr r/ s (zFileLoader.get_datacCs| |¡r|SdSrE)rö©r©r#rrr Úget_resource_readers zFileLoader.get_resource_readercCs tt|jƒd|ƒ}t |d¡S)NrrO)rCrKrArbrc©r©ÚresourcerArrr Ú open_resourceszFileLoader.open_resourcecCs&| |¡st‚tt|jƒd|ƒ}|S©Nr)Ú is_resourceÚFileNotFoundErrorrCrKrArUrrr Ú resource_path"s zFileLoader.resource_pathcCs(t|vr dStt|jƒd|ƒ}t|ƒS)NFr)r;rCrKrArS©r©r§rArrr rY(szFileLoader.is_resourcecCstt t|jƒd¡ƒSrX)ÚiterrÚlistdirrKrArJrrr Úcontents.szFileLoader.contents)r°r¯r±r²rrGrKr½r'rór/rTrWr[rYr_Ú __classcell__rrrMr rBês    rBc@s.eZdZdZdd„Zdd„Zddœdd „Zd S) ÚSourceFileLoaderz>Concrete implementation of SourceLoader using the file system.cCst|ƒ}|j|jdœS)z!Return the metadata for the path.)râr8)rMÚst_mtimeÚst_size)r©rAr?rrr r+6szSourceFileLoader.path_statscCst|ƒ}|j|||d�S)N©Ú_mode)r¥r,)r©r r�r*rPrrr r.;sz SourceFileLoader._cache_bytecoderYrdc Csüt|ƒ\}}g}|r4t|ƒs4t|ƒ\}}| |¡qt|ƒD]h}t||ƒ}zt |¡Wq<tynYq||_t|ƒs4ztt ¡|ƒ}Wnty2Yn0||_dSrE)r§rXrCrrTrNrAr\rrr r„s zExtensionFileLoader.__init__cCs|j|jko|j|jkSrErCrErrr rG�s  ÿzExtensionFileLoader.__eq__cCst|jƒt|jƒASrErHrJrrr rK‘szExtensionFileLoader.__hash__cCs$t tj|¡}t d|j|j¡|S)z&Create an unitialized extension modulez&extension module {!r} loaded from {!r})r»r!rÚÚcreate_dynamicrÊr§rA)r©rür#rrr r”sÿÿz!ExtensionFileLoader.create_modulecCs$t tj|¡t d|j|j¡dS)zInitialize an extension modulez(extension module {!r} executed from {!r}N)r»r!rÚÚ exec_dynamicrÊr§rArSrrr r$œsÿzExtensionFileLoader.exec_modulecs$t|jƒd‰t‡fdd„tDƒƒS)z1Return True if the extension module is a package.r.c3s|]}ˆd|kVqdS)rNr©r Úsuffix©Ú file_namerr rH¥sÿz1ExtensionFileLoader.is_package..)rKrAÚanyÚEXTENSION_SUFFIXESr&rror rö¢s ÿzExtensionFileLoader.is_packagecCsdS)z?Return None as an extension module cannot create a code object.Nrr&rrr r ¨szExtensionFileLoader.get_codecCsdS)z5Return None as extension modules have no source code.Nrr&rrr r1¬szExtensionFileLoader.get_sourcecCs|jSrNrGr&rrr ró°sz ExtensionFileLoader.get_filenameN)r°r¯r±r²rrGrKrr$rör r1r½rórrrr rP|s rPc@sleZdZdZdZdd„Zdd„Zdd„Zd d „Zd d „Z d d„Z dd„Z dd„Z dd„Z dd„Zdd„ZdS)Ú_NamespacePatha&Represents a namespace package's path. It uses the module name to find its parent module, and from there it looks up the parent's __path__. When this changes, the module's own path is recomputed, using path_finder. For top-level modules, the parent module's path is sys.path.rcCs,||_||_t| ¡ƒ|_|j|_||_dSrE)Ú_nameÚ_pathr¢Ú_get_parent_pathÚ_last_parent_pathÚ_epochÚ _last_epochÚ _path_finder©r©r§rAÚ path_finderrrr rÁs z_NamespacePath.__init__cCs&|j d¡\}}}|dkrdS|dfS)z>Returns a tuple of (parent-module-name, parent-path-attr-name)rmr)rrAÚ__path__)rtrt)r©riÚdotÚmerrr Ú_find_parent_path_namesÈsz&_NamespacePath._find_parent_path_namescCs| ¡\}}ttj||ƒSrE)r€rµrÚmodules)r©Úparent_module_nameÚpath_attr_namerrr rvÒs z_NamespacePath._get_parent_pathcCsdt| ¡ƒ}||jks"|j|jkr^| |j|¡}|durP|jdurP|jrP|j|_ ||_|j|_|j SrE) r¢rvrwrxryrzrtrÁròru)r©Ú parent_pathrürrr Ú _recalculateÖs z_NamespacePath._recalculatecCs t| ¡ƒSrE)r]r…rJrrr Ú__iter__äsz_NamespacePath.__iter__cCs | ¡|SrE©r…)r©Úindexrrr Ú __getitem__çsz_NamespacePath.__getitem__cCs||j|<dSrE)ru)r©rˆrArrr Ú __setitem__êsz_NamespacePath.__setitem__cCs t| ¡ƒSrE)r6r…rJrrr Ú__len__ísz_NamespacePath.__len__cCs d |j¡S)Nz_NamespacePath({!r}))r\rurJrrr Ú__repr__ðsz_NamespacePath.__repr__cCs || ¡vSrEr‡©r©Úitemrrr Ú __contains__ósz_NamespacePath.__contains__cCs|j |¡dSrE)rur=r�rrr r=ösz_NamespacePath.appendN)r°r¯r±r²rxrr€rvr…r†r‰rŠr‹rŒr�r=rrrr rs¶s rsc@sPeZdZdd„Zedd„ƒZdd„Zdd„Zd d „Zd d „Z d d„Z dd„Z dS)Ú_NamespaceLoadercCst|||ƒ|_dSrE)rsrur{rrr rüsz_NamespaceLoader.__init__cCs d |j¡S)zsReturn repr for the module. The method is deprecated. The import machinery does the job itself. z)r\r°)rr#rrr Ú module_reprÿsz_NamespaceLoader.module_reprcCsdS)NTrr&rrr rösz_NamespaceLoader.is_packagecCsdS)Nrrr&rrr r1 sz_NamespaceLoader.get_sourcecCstddddd�S)Nrzr"T)r3)r4r&rrr r sz_NamespaceLoader.get_codecCsdSrrrrrr rsz_NamespaceLoader.create_modulecCsdSrErrSrrr r$sz_NamespaceLoader.exec_modulecCst d|j¡t ||¡S)zbLoad a namespace module. This method is deprecated. Use exec_module() instead. z&namespace module loaded with path {!r})r»rÊrur%r&rrr r'sÿz_NamespaceLoader.load_moduleN) r°r¯r±rrr‘rör1r rr$r'rrrr r�ûs r�c@sveZdZdZedd„ƒZedd„ƒZedd„ƒZedd „ƒZedd d „ƒZ edd d„ƒZ eddd„ƒZ edd„ƒZ d S)Ú PathFinderz>Meta path finder for sys.path and package __path__ attributes.cCsNttj ¡ƒD],\}}|dur(tj|=qt|dƒr| ¡qtjd7_dS)z}Call the invalidate_caches() method on all path entry finders stored in sys.path_importer_caches (where implemented).NÚinvalidate_cachesr.)ÚlistrÚpath_importer_cacheÚitemsr³r“rsrx)rr§Úfinderrrr r“)s    zPathFinder.invalidate_cachesc CsRtjdurtjst dt¡tjD]*}z||ƒWStyJYq"Yq"0q"dS)z.Search sys.path_hooks for a finder for 'path'.Nzsys.path_hooks is empty)rÚ path_hooksrorpr¿r¨)rrAÚhookrrr Ú _path_hooks6s    zPathFinder._path_hookscCsd|dkr*z t ¡}Wnty(YdS0ztj|}Wn&ty^| |¡}|tj|<Yn0|S)zÒGet the finder for the path entry from sys.path_importer_cache. If the path entry is not in the cache, find the appropriate finder and cache it. If no finder is available, store None. rN)rrTrZrr•ÚKeyErrorrš)rrAr—rrr Ú_path_importer_cacheCs    zPathFinder._path_importer_cachecCsRt|dƒr| |¡\}}n| |¡}g}|dur.rmršN) ràÚ_loadersrArXrCrrTÚ _path_mtimeÚsetÚ _path_cacheÚ_relaxed_path_cache)r©rAÚloader_detailsÚloadersrþrr¦r rÄs   zFileFinder.__init__cCs d|_dS)zInvalidate the directory mtime.ršN)r¨rJrrr r“ÔszFileFinder.invalidate_cachescCs*| |¡}|durdgfS|j|jp&gfS)zÅTry to find a loader for the specified module, or the namespace package portions. Returns (loader, list-of-portions). This method is deprecated. Use find_spec() instead. N)rrÁrò)r©rÀrürrr r¾Ús zFileFinder.find_loadercCs|||ƒ}t||||d�S)Nrñ)r)r©rýrÀrAÚsmslrrÁrrr r¡æs ÿzFileFinder._get_specNc Cs~d}| d¡d}zt|jp"t ¡ƒj}Wnty@d}Yn0||jkrZ| ¡||_t ƒrp|j }|  ¡}n |j }|}||vrØt |j|ƒ}|jD]:\} } d| } t || ƒ} t| ƒr”| | || |g|¡Sq”t|ƒ}|jD]p\} } zt |j|| ƒ} Wnt�yYdS0tjd| dd�|| |vrÞt| ƒrÞ| | || d|¡SqÞ|�rzt d |¡t |d¡} |g| _| SdS) zoTry to find a spec for the specified module. Returns the matching spec, or None if not found. FrmrjršrNz trying {})Ú verbosityzpossible namespace for {})rtrMrArrTrbrNr¨Ú _fill_cacherr«rœrªrCr§rSr¡rUr{r»rÊr÷rò)r©rÀrÚ is_namespaceÚ tail_modulerâÚcacheÚ cache_moduleÚ base_pathrnrýÚ init_filenameÚ full_pathrürrr rësN         ÿ   zFileFinder.find_specc Cs¼|j}zt |pt ¡¡}Wntttfy8g}Yn0tj  d¡sRt |ƒ|_ nJt ƒ}|D]8}|  d¡\}}}|r†d  || ¡¡}n|}| |¡q\||_ tj  t¡r¸dd„|Dƒ|_dS)zDFill the cache of potential modules and packages for this directory.rrmrZcSsh|] }| ¡’qSr)rœ)r Úfnrrr r ;rz)FileFinder._fill_cache..N)rArr^rTrZÚPermissionErrorÚNotADirectoryErrorrrrr©rªr�r\rœÚaddrr«) r©rAr_Úlower_suffix_contentsrŽr§r~rnÚnew_namerrr r°s"     zFileFinder._fill_cachecs‡‡fdd„}|S)aA class method which returns a closure to use on sys.path_hook which will return an instance using the specified loaders and the path called on the closure. If the path called on the closure is not a directory, ImportError is raised. cs$t|ƒstd|d�‚ˆ|gˆ¢RŽS)z-Path hook for importlib.machinery.FileFinder.zonly directories are supportedrG)rUr¨rG©rr¬rr Úpath_hook_for_FileFinderGs z6FileFinder.path_hook..path_hook_for_FileFinderr)rr¬r¿rr¾r Ú path_hook=s zFileFinder.path_hookcCs d |j¡S)NzFileFinder({!r}))r\rArJrrr rŒOszFileFinder.__repr__)N)r°r¯r±r²rr“rÄrr¾r¡rr°rrÀrŒrrrr r¥»s  3 r¥cCs�| d¡}| d¡}|sB|r$|j}n||kr8t||ƒ}n t||ƒ}|sTt|||d�}z$||d<||d<||d<||d<WntyŠYn0dS)NÚ __loader__Ú__spec__r¦Ú__file__Ú __cached__)ÚgetrÁrjrarÚ Exception)Únsr§ÚpathnameÚ cpathnamerÁrürrr Ú_fix_up_moduleUs"      rÊcCs*ttt ¡ƒf}ttf}ttf}|||gS)z_Returns a list of file-based module loaders. Each item is a tuple (loader, suffixes). )rPÚ_alternative_architecturesrÚÚextension_suffixesrar�rjr})Ú extensionsÚsourceÚbytecoderrr rùlsrùc Csn|atjatjatjt}ddgfdddgff}|D]V\}}|d}|tjvr^tj|}q”q4zt |¡}Wq”Wq4tyˆYq4Yq40q4tdƒ‚t|d|ƒt|d|ƒt|d d  |¡ƒt|d d d „|Dƒƒgd¢}|dkrî|  d¡|D]2}|tjv�rt |¡} n tj|} t||| ƒqòt|dt ƒƒt   t t ¡ƒ¡|dk�rjt  d¡dt v�rjdt_dS)zÍSetup the path-based importers for importlib by importing needed built-in modules and injecting them into the global namespace. Other components are extracted from the core bootstrap module. ÚposixrÚntrrzimportlib requires posix or ntrr;r1rÚ_pathseps_with_coloncSsh|]}d|›�’qSrrr rrr r šrz_setup..)rbrorÖrrz.pywz_d.pydTN)r»rrÚr�r°Ú_builtin_from_namer¨r´r>r=rrrràrËrÌr�rr ) Ú_bootstrap_moduleÚ self_moduleÚ os_detailsÚ builtin_osr1r;Ú os_moduleÚ builtin_namesÚ builtin_nameÚbuiltin_modulerrr Ú_setupwsD                 rÜcCs2t|ƒtƒ}tj tj|Žg¡tj t ¡dS)z)Install the path-based import components.N) rÜrùrr˜ràr¥rÀÚ meta_pathr=r’)rÔÚsupported_loadersrrr Ú_install°srßú-arm-linux-gnueabihf.ú-armeb-linux-gnueabihf.ú-mips64-linux-gnuabi64.ú-mips64el-linux-gnuabi64.ú-powerpc-linux-gnu.ú-powerpc-linux-gnuspe.ú-powerpc64-linux-gnu.ú-powerpc64le-linux-gnu.ú-arm-linux-gnueabi.ú-armeb-linux-gnueabi.ú-mips64-linux-gnu.ú-mips64el-linux-gnu.ú-ppc-linux-gnu.ú-ppc-linux-gnuspe.ú-ppc64-linux-gnu.ú-ppc64le-linux-gnu.)rèrérêrërìrírîrïràrárârãrärårærçcCsF|D]<}t ¡D].\}}||vr| | ||¡¡|Sqq|S)z®Add a suffix with an alternative architecture name to the list of suffixes so an extension built with the default (upstream) setting is loadable with our Pythons )Ú _ARCH_MAPr–r=rW)rþrnÚoriginalÚ alternativerrr rËÍs rË)rY)N)NNN)rr)T)N)N)Rr²rÚrbrrorÖrÚ _MS_WINDOWSrÑrrrÐr1r;r¢r9r>rÒrÚ%_CASE_INSENSITIVE_PLATFORMS_BYTES_KEYrrr&r+r,rCrKrMrRrSrUrXriÚtypeÚ__code__rÙr$rÉr#r(r;r€r|r�r}ÚDEBUG_BYTECODE_SUFFIXESÚOPTIMIZED_BYTECODE_SUFFIXESrŠr˜r¡r£r¥r½rÄrÎrÒrÔrÝrãrårðÚobjectrúrrrr(rBrarjrrrPrsr�r’r¥rÊrùrÜrßrðrËrrrr ÚsÌ    ÿ       G(  ! ÿ D@H-:E*  9 ï