HEX
Server: nginx/1.24.0
System: Linux localhost 5.15.0-46-generic #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022 x86_64
User: www (1000)
PHP: 8.3.27
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: //proc/93580/root/lib/python3.10/importlib/__pycache__/_common.cpython-310.pyc
o

p̦i��@s�ddlZddlZddlZddlZddlZddlZddlZddlmZm	Z	m
Z
ddlmZm
Z
ddlmZeejefZdd�Zdd	�Zd
d�Zdd
�Zdd�Zdd�Zejdejd�dd��Zejdd��Ze�ej�ejdd���Z dS)�N)�Union�Any�Optional�)�ResourceReader�Traversable)�	wrap_speccCstt|��S)z3
    Get a Traversable resource from a package
    )�from_package�get_package)�package�r�(/usr/lib/python3.10/importlib/_common.py�filessrcCs.t|�}tj�|�\}}|rt|�d���|S)z�Normalize a path by ensuring it is a string.

    If the resulting string contains path separators, an exception is raised.
    z must be only a file name)�str�os�path�split�
ValueError)r�str_path�parent�	file_namerrr
�normalize_paths
rcCs*|j}t|jdd�}|durdS||j�S)z?
    Return the package's loader if it's a ResourceReader.
    �get_resource_readerN)�__spec__�getattr�loader�name�r�spec�readerrrr
r&s


rcCst|tj�r|St�|�S)N)�
isinstance�types�
ModuleType�	importlib�
import_module)�candrrr
�resolve7sr&cCs(t|�}t|�jdurt|�d���|S)z�Take a package name or module object and return the module.

    Raise an exception if the resolved module is not a package.
    Nz is not a package)r&r�submodule_search_locations�	TypeError)r�resolvedrrr
r
<sr
cCst|�}|j�|j�}|��S)z=
    Return a Traversable object for the given package.

    )rrrrrrrrr
r	Hsr	�)�
_os_removeccs��tj|d�\}}z&t�||��t�|�~t�|�VWz||�WdSty/YdSwz||�Wwty?Yww)N��suffix)�tempfile�mkstempr�write�close�pathlib�Path�FileNotFoundError)rr-r+�fd�raw_pathrrr
�	_tempfileRs"�
���r7cCst|j|jd�S)zu
    Given a Traversable object, return that object as a
    path on the local file system in a context manager.
    r,)r7�
read_bytesr�rrrr
�as_filegsr:ccs�|VdS)z7
    Degenerate behavior for pathlib.Path objects.
    Nrr9rrr
�_ps�
r;)r*)!rr2r.�	functools�
contextlibr!r#�typingrrr�abcrr�	_adaptersrr"r�Packagerrrr&r
r	�contextmanager�remover7�singledispatchr:�registerr3r;rrrr
�<module>s4

�