File: //opt/alt/python311/lib64/python3.11/__pycache__/contextlib.cpython-311.opt-1.pyc
hk | d Z ddlZddlZddlZddlZddlmZ ddlmZ ddl m
Z
mZ g dZ G d dej
Z G d d
ej
Z G d de Z G d
de Z G d d Z G d deee Z G d deee Zd Zd Z G d de Z G d de Z G d de Z G d de Z G d d e Z G d! d"e Z G d# d$ Z G d% d&ee Z G d' d(ee Z G d) d*ee Z! G d+ d,e Z"dS )-z4Utilities for with-statement contexts. See PEP 343. N)dequewraps)
MethodTypeGenericAlias)asynccontextmanagercontextmanagerclosingnullcontextAbstractContextManagerAbstractAsyncContextManagerAsyncExitStackContextDecorator ExitStackredirect_stdoutredirect_stderrsuppressaclosingchdirc d e Zd ZdZ ee Zd Zej d Z
ed ZdS )r z,An abstract base class for context managers.c | S z0Return `self` upon entering the runtime context. selfs 1/opt/alt/python311/lib64/python3.11/contextlib.py __enter__z AbstractContextManager.__enter__ s c dS z9Raise any exception triggered within the runtime context.Nr r exc_type exc_value tracebacks r __exit__zAbstractContextManager.__exit__ s tr c N | t u rt j |dd S t S )Nr r% )r _collections_abc_check_methodsNotImplementedclsCs r __subclasshook__z'AbstractContextManager.__subclasshook__ s) (((#21k:NNNr N)__name__
__module____qualname____doc__classmethodr __class_getitem__r abcabstractmethodr% r- r r r r r ss 66#L11 [ r r c d e Zd ZdZ ee Zd Zej d Z
ed ZdS )r
z9An abstract base class for asynchronous context managers.c
K | S r r r s r
__aenter__z&AbstractAsyncContextManager.__aenter__- s r c
K dS r r r! s r __aexit__z%AbstractAsyncContextManager.__aexit__1 s
tr c N | t u rt j |dd S t S )Nr8 r: )r
r' r( r) r* s r r- z,AbstractAsyncContextManager.__subclasshook__6 s3 ---#21l3>@ @
@r N)r. r/ r0 r1 r2 r r3 r8 r4 r5 r: r- r r r r
r
' ss CC#L11 [ r r
c e Zd ZdZd Zd ZdS )r zJA base class or mixin that enables context managers to work as decorators.c | S )a6 Return a recreated instance of self.
Allows an otherwise one-shot context manager like
_GeneratorContextManager to support use as
a decorator via implicit recreation.
This is a private interface just for _GeneratorContextManager.
See issue #11647 for details.
r r s r _recreate_cmzContextDecorator._recreate_cmA s r c @ t fd }|S )Nc p 5 | i |cd d d S # 1 swxY w Y d S Nr>