관리-도구
편집 파일: contextlib2.cpython-37.pyc
B ��ReB � @ s� d Z ddlZddlZddlZddlmZ ddlmZ ddddd d ddd g Zedg7 Zej dd� dkrnej Zne�de fddi�Zdd� Zdd� ZG dd� de�ZG dd � d e �ZG dd� de�Zdd� ZG dd� de �ZG dd� de �ZG d d� de�ZG d!d� de�ZG d"d � d e �Zej d d#kZe�r@d$d%� Zd&d'� Znd(d%� Zd)d'� Zydd*lmZ W n ek �rz eZ Y n X d+d,� Z G d-d � d e �Z!G d.d� de!�Z"G d/d� de�Z#dS )0zAcontextlib2 - backports and enhancements to the contextlib module� N)�deque)�wraps�contextmanager�closing�nullcontext�AbstractContextManager�ContextDecorator� ExitStack�redirect_stdout�redirect_stderr�suppress�ContextStack� )� � �ABC� __slots__� c C s4 | |krd S |� | � x| jD ]}t||� qW |S )N)�append� __bases__�_classic_mro)�C�result�Br r ��/builddir/build/BUILDROOT/alt-python37-pip-20.2.4-6.el8.x86_64/opt/alt/python37/lib/python3.7/site-packages/pip/_vendor/contextlib2.pyr s r c G sp y | j }W n" tk r, tt| g ��}Y nX x<|D ]4}x.|D ]"}||jkr>|j| d kr^tS P q>W tS q4W dS )NT)�__mro__�AttributeError�tupler �__dict__�NotImplemented)r �methods�mro�methodr r r r �_check_methods$ s r# c @ s2 e Zd ZdZdd� Zejdd� �Zedd� �Z dS ) r z,An abstract base class for context managers.c C s | S )z0Return `self` upon entering the runtime context.r )�selfr r r � __enter__8 s z AbstractContextManager.__enter__c C s dS )z9Raise any exception triggered within the runtime context.Nr )r$ �exc_type� exc_value� tracebackr r r �__exit__<