Edit File: importer.cpython-36.opt-1.pyc
3 ��<_�������������������@���s����d�dl�mZ�d�dlZd�dlZd�dlZd�dlmZ�d�dlZddlm Z m Z �ddlmZ�ddlm Z �ddlmZ�e j��Zi�Zed d ���Zdd��ZG�d d��de�ZdS�)�����)�absolute_importN)�contextmanager����)� Repository�RepositoryError)�PyGIWarning)�get_introspection_module)�load_overridesc�������������c���s^���t�j|��}dV��|rdS�|�dkr$dS�tj|��dk r6dS�t�j|��}tjd|�|d��t|d��dS�) aO��A context manager which tries to give helpful warnings about missing gi.require_version() which could potentially break code if only an older version than expected is installed or a new version gets introduced. :: with _check_require_version("Gtk", stacklevel): load_namespace_and_overrides() N�GLib�GObject�Gioz�%(namespace)s was imported without specifying a version first. Use gi.require_version('%(namespace)s', '%(version)s') before import to ensure that the right version gets loaded.)� namespace�version)� stacklevel)r ���r���r���)� repository� is_registered�giZget_required_versionZget_version�warnings�warnr���)r ���r���Z was_loadedr�����r���� /usr/lib64/python3.6/importer.py�_check_require_version+���s���� r���c�������������C���sZ���t�jdd��}|dkr"|�rdS�dS�|dkr6|�r2dS�dS�|d krJ|�rFdS�dS�|�rRdS�dS�dS�) a2��Returns the stacklevel value for warnings.warn() for when the warning gets emitted by an imported module, but the warning should point at the code doing the import. Pass import_hook=True if the warning gets generated by an import hook (warn() gets called in load_module(), see PEP302) N����������������� ���)r���r���)r���r���)r���r���)�sys�version_info)�import_hook� py_versionr���r���r����get_import_stacklevelR���s���� r!���c���������������@���s&���e�Zd�Zdd��Zddd�Zdd��ZdS�) �DynamicImporterc�������������C���s ���||�_�d�S�)N)�path)�selfr#���r���r���r����__init__l���s����zDynamicImporter.__init__Nc�������������C���sV���|j�|�j�sd�S�|jdd�\}}||�jkr.d�S�tj|�sBtj|�rF|�S�td|���d�S�)N�.r���z6cannot import name %s, introspection typelib not found)� startswithr#����rsplitr���r���Zenumerate_versions�ImportError)r$����fullnamer#���r ���r���r���r����find_moduleo���s���� zDynamicImporter.find_modulec������� ������C���s����|t�jkrt�j|�S�|jdd�\}}tdd�}t||d��r�yt|�}W�n*�tk rr�}�zt|��W�Y�d�d�}~X�nX�x*tj |�D�]}t jd|jd�d����q�W�t |�}W�d�Q�R�X�d |�|_|�|_|t�j|<�|S�) Nr&���r���T)r���)r���zgi.repository.�-r���z<%s>)r����modulesr(���r!���r���r���r���r)���r���Zget_immediate_dependencies� importlib� import_module�splitr ����__file__� __loader__) r$���r*���r#���r ���r���Zintrospection_module�eZdepZdynamic_moduler���r���r����load_module����s ���� zDynamicImporter.load_module)N)�__name__� __module__�__qualname__r%���r+���r4���r���r���r���r���r"���h���s��� r"���)Z __future__r���r���r���r.���� contextlibr���r���Z_gir���r���r����moduler���Z overridesr ���Zget_defaultr���r-���r���r!����objectr"���r���r���r���r����<module>���s���'