403Webshell
Server IP : 50.21.180.56  /  Your IP : 216.73.216.139
Web Server : Apache
System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User : ws67922704 ( 67922704)
PHP Version : 8.5.13
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /kunden/proc/self/root/usr/lib/python3/dist-packages/breezy/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /kunden/proc/self/root/usr/lib/python3/dist-packages/breezy/__pycache__/lazy_import.cpython-313.pyc
�

p��g�C���SrSSKJrJr "SS\5r"SS\5r"SS\5r"S	S
5rSr\	r
"SS
\5r"SS5rSSjr
g)aiFunctionality to create lazy evaluation objects.

This includes waiting to import a module until it is actually used.

Most commonly, the 'lazy_import' function is used to import other modules
in an on-demand fashion. Typically use looks like::

    from .lazy_import import lazy_import
    lazy_import(globals(), '''
    from breezy import (
        errors,
        osutils,
        branch,
        )
    import breezy.branch
    ''')

Then 'errors, osutils, branch' and 'breezy' will exist as lazy-loaded
objects which will be replaced with a real object on first use.

In general, it is best to only load modules in this way. This is because
it isn't safe to pass these variables to other functions before they
have been replaced. This is especially true for constants, sometimes
true for classes or functions (when used as a factory, or you want
to inherit from them).
�)�BzrError�InternalBzrErrorc��\rSrSrSrSrSrg)�ImportNameCollision�/zJTried to import an object to the same name as an existing object. %(name)sc�<�[R"U5 Xlg�N)r�__init__�name)�selfrs  �4/usr/lib/python3/dist-packages/breezy/lazy_import.pyr
�ImportNameCollision.__init__2s�����$���	�)rN��__name__�
__module__�__qualname__�__firstlineno__�_fmtr
�__static_attributes__�rr
rr/s��W�D�rrc�"�\rSrSrSrSSjrSrg)�IllegalUseOfScopeReplacer�7zDScopeReplacer object %(name)r was used incorrectly: %(msg)s%(extra)sNc��[R"U5 XlX lU(aS[	U5-UlgSUlg)Nz: �)rr
r�msg�str�extra)rrrrs    r
r
�"IllegalUseOfScopeReplacer.__init__:s4�����$���	������E�
�*�D�J��D�Jr)rrrr	rrrr
rr7s��Q�D�rrc��\rSrSrSrSrSrg)�InvalidImportLine�Dz-Not a valid import statement: %(msg)
%(text)sc�H�[R"U5 XlX lgr	)rr
�textr)rr%rs   r
r
�InvalidImportLine.__init__Gs�����$���	��r)rr%Nrrrr
r"r"Ds��;�D�rr"c�>�\rSrSrSrSrSrSrSrSr	Sr
S	rS
rg)�
ScopeReplacer�Mz�A lazy object that will replace itself in the appropriate scope.

This object sits, ready to create the real object the first time it is
needed.
)�_factory�_name�	_real_obj�_scopeTc���[RUSU5 [RUSU5 [RUSU5 [RUSS5 XU'g)a7Create a temporary object in the specified scope.
Once used, a real object will be placed in the scope.

:param scope: The scope the object should appear in
:param factory: A callable that will create the real object.
    It will be passed (self, scope, name)
:param name: The variable name in the given scope.
r-r*r+r,N)�object�__setattr__)r�scope�factoryrs    r
r
�ScopeReplacer.__init__\sS��	���4��5�1����4��W�5����4��$�/����4��d�3��d�rc��[RUS5n[RUS5nUcy[RUS5n[RUS5nU"XU5nXPLa
[USS9e[RUS5nUc[RUSU5 XTU'U$[R
(d
[USS9eU$)z7Return the real object for which this is a placeholder.r+r,r*r-zCObject tried to replace itself, check it's not using its own scope.)rz?Object already replaced, did you assign it to another variable?)r/�__getattribute__rr0r(�
_should_proxy)rr�real_objr2r1�objs      r
�_resolve�ScopeReplacer._resolveks����&�&�t�W�5���*�*�4��=�����-�-�d�J�?�G��+�+�D�(�;�E��$�t�,�C��{�/��N����.�.�t�[�A�H����"�"�4��c�:�!�d���
��*�*�+��U��
��rc�N�[RUS5"5n[X!5$�Nr9)r/r5�getattr)r�attrr8s   r
r5�ScopeReplacer.__getattribute__�s"���%�%�d�J�7�9���s�!�!rc�P�[RUS5"5n[X1U5$r<)r/r5�setattr)rr>�valuer8s    r
r0�ScopeReplacer.__setattr__�s$���%�%�d�J�7�9���s�%�(�(rc�H�[RUS5"5nU"U0UD6$r<)r/r5)r�args�kwargsr8s    r
�__call__�ScopeReplacer.__call__�s'���%�%�d�J�7�9���D�#�F�#�#rrN)
rrrr�__doc__�	__slots__r6r
r9r5r0rGrrrr
r(r(Ms/���=�I��M�
� �D"�)�$rr(c��S[lg)a8Disallow lazily imported modules to be used as proxies.

Calling this function might cause problems with concurrent imports
in multithreaded environments, but will help detecting wasteful
indirection, so it should be called when executing unit tests.

Only lazy imports that happen after this call are affected.
FN)r(r6rrr
�disallow_proxyingrL�s��#(�M�rc�,�\rSrSrSrSrSSjrSrSrg)	�ImportReplacer�z�This is designed to replace only a portion of an import list.

It will replace itself with a module, and then make children
entries also ImportReplacer objects.

At present, this only supports 'import foo.bar.baz' syntax.
)�_import_replacer_children�_member�_module_pathNc�*�Uc0nUbU(a[S5e[RUSU5 [RUSU5 [RUSU5 [RUS5n[RXX&RS9 g)a�Upon request import 'module_path' as the name 'module_name'.
When imported, prepare children to also be imported.

:param scope: The scope that objects should be imported into.
    Typically this is globals()
:param name: The variable name. Often this is the same as the
    module_path. 'breezy'
:param module_path: A list for the fully specified module path
    ['breezy', 'foo', 'bar']
:param member: The member inside the module to import, often this is
    None, indicating the module is being imported.
:param children: Children entries to be imported later.
    This should be a map of children specifications.
    ::

        {'foo':(['breezy', 'foo'], None,
            {'bar':(['breezy', 'foo', 'bar'], None {})})
        }

Examples::

    import foo => name='foo' module_path='foo',
                  member=None, children={}
    import foo.bar => name='foo' module_path='foo', member=None,
                      children={'bar':(['foo', 'bar'], None, {}}
    from foo import bar => name='bar' module_path='foo', member='bar'
                           children={}
    from foo import bar, baz would get translated into 2 import
    requests. On for 'name=bar' and one for 'name=baz'
Nz(Cannot supply both a member and childrenrPrQrR�	__class__)r1rr2)�
ValueErrorr/r0r5r(r
�_import)rr1r�module_path�member�children�clss       r
r
�ImportReplacer.__init__�s���>���H���H��G�H�H����4�!<�h�G����4��F�3����4���=��%�%�d�K�8�����t�t�[�[��Qrc	��[RUS5n[RUS5n[RUS5nSRU5nUb[X!X/SS9n[	Xd5$[X!U/SS9nUSSHn[	Xg5nM UR5H3unup�n[RUS5nU"URUU	U
US	9 M5 U$)
NrPrQrR�.�)�levelrrT�rrWrXrY)r/r5�join�_builtin_importr=�items�__dict__)
rr1rrYrXrW�module�path�
child_name�
child_path�child_member�
grandchildrenrZs
             r
rV�ImportReplacer._import�s����*�*�4�1L�M���(�(��y�9���-�-�d�N�C���x�x��$����$�T�%���K�F��6�*�*�$�T�%��1�E�F�#�A�B��� ��.��(�FN�^�^�EU�A�J�A��=��)�)�$��<�C������&�#�&�
�	FV��
rr)NN)	rrrrrIrJr
rVrrrr
rNrN�s���I�I�+R�ZrrNc�N�\rSrSrSrSS/rSSjrSrSrS	r	S
r
SrSrS
r
g)�ImportProcessoriz8Convert text that users input into lazy import requests.�_lazy_import_class�importsNc�<�0UlUc[UlgXlgr	)rorNrn)r�lazy_import_classs  r
r
�ImportProcessor.__init__s������$�&4�D�#�&7�#rc�H�URU5 URU5 g)z�Convert the given text into a bunch of lazy import objects.

This takes a text string, which should be similar to normal python
import markup.
N)�
_build_map�_convert_imports)rr1r%s   r
�lazy_import�ImportProcessor.lazy_imports��	
��������e�$rc	��URR5H up#URXUSUSUSS9 M" g)Nr^r�r`)rorcrn)rr1r�infos    r
ru� ImportProcessor._convert_importssF���,�,�,�,�.�J�D��#�#��d�1�g�d�1�g�PT�UV�PW�
$�
�/rc���URU5H_nURS5(aURU5 M,URS5(aURU5 MU[	US5e g)z@Take a string describing imports, and build up the internal map.�import �from z'doesn't start with 'import ' or 'from 'N)�_canonicalize_import_text�
startswith�_convert_import_str�_convert_from_strr")rr%�lines   r
rt�ImportProcessor._build_map&s_���2�2�4�8�D����y�)�)��(�(��.�����)�)��&�&�t�,�'��.W�X�X�
9rc�T�URS5(d[SRU55eU[S5SnUR	S5GHTnUR5nU(dMUR	S5n[U5S:XaxUSR5nUSR5R	S	5nX@R;a[U5eUS(d[U5eUS04URU'M�UR	S	5nUSnU(d[U5eX@R;aU/S04nX`RU'OURUnU/nUSnUSSH3n	URU	5 X�;a	X�SnM"USSS04n
X�U	'U
SnM5 GMW g)
z�This converts a import string into an import map.

This only understands 'import foo, foo.bar, foo.bar.baz as bing'

:param import_str: The import string to process
r}zbad import string {!r}N�,� as ryrr^r])
r�rU�format�len�split�stripror�ImportError�append)r�
import_strrf�as_hunksrrW�
module_def�cur_path�cur�child�nexts           r
r��#ImportProcessor._convert_import_str0s����$�$�Y�/�/��5�<�<�Z�H�I�I���I�� 0�1�
��$�$�S�)�D��:�:�<�D����z�z�&�)�H��8�}��!� ��{�(�(�*��&�q�k�/�/�1�7�7��<���<�<�'�-�d�3�3�"�1�~�%�d�+�+�&1�4��%<����T�"�#�j�j��o��"�1�~���%�d�+�+��|�|�+�#'�&�$��!3�J�)3�L�L��&�!%���d�!3�J� �6�� ��m��(���_�E��O�O�E�*��|�!�j��m�� (���T�2�6��%)�E�
�"�1�g��-�A*rc�>�URS5(d[SRU55eU[S5SnUR	S5up#UR	S5nUS(d[U5eUR	S5H�nUR
5nU(dMUR	S5n[U5S	:Xa'US
R
5nUSR
5nOU=pxXpR;a[U5eXH04URU'M� g)zpThis converts a 'from foo import bar' string into an import map.

:param from_str: The import string to process
r~zbad from/import {!r}Nz import r]r^r�r�ryr)	r�rUr�r�r�r�r�ror)	r�from_str�from_module�import_list�from_module_pathrfr�rres	         r
r��!ImportProcessor._convert_from_strds��
�"�"�7�+�+��3�:�:�8�D�E�E��C��L�N�+��#+�>�>�*�#=� ��&�,�,�S�1����"��k�*�*��%�%�c�*�D��:�:�<�D����z�z�&�)�H��8�}��!� ��{�(�(�*��!�!��*�*�,�� $�$���|�|�#�)�$�/�/�"2�B�!?�D�L�L���+rc��/nSnURS5H�nUR5nURS5nUS:waUSUR5nU(dMFUb>URS5(aUR	US-USS-5 SnM}USU--
nM�SU;aSU;aURSS5nM�UR	URSS5RSS55 M� Ub[
US	5eU$)
z�Take a list of imports, and split it into regularized form.

This is meant to take regular import text, and convert it to
the forms that the rest of the converters prefer.
N�
�#����)� �(rzUnmatched parenthesis)r�r��find�endswithr��replacer")rr%�outr�r��locs      r
r�)ImportProcessor._canonicalize_import_text�s��������J�J�t�$�D��:�:�<�D��)�)�C�.�C��b�y��D�S�z�'�'�)�������=�=��%�%��J�J�s�S�y�4���9�4�5��C��3��:�%�C��$�;�3�d�?��,�,�s�B�/�C��J�J�t�|�|�C��4�<�<�S�"�E�F�%%�&�?�#�C�)@�A�A��
r)rnror	)rrrrrIrJr
rvrurtr�r�rrrrr
rmrms8��B�&�y�1�I�8�%��Y�2&�h@�BrrmNc�6�[US9nURX5$)a�Create lazy imports for all of the imports in text.

This is typically used as something like::

    from breezy.lazy_import import lazy_import
    lazy_import(globals(), '''
    from breezy import (
        foo,
        bar,
        baz,
        )
    import breezy.branch
    import breezy.transport
    ''')

Then 'foo, bar, baz' and 'breezy' will exist as lazy-loaded
objects which will be replaced with a real object on first use.

In general, it is best to only load modules in this way. This is
because other objects (functions/classes/variables) are frequently
used without accessing a member, which means we cannot tell they
have been used.
)rq)rmrv)r1r%rq�procs    r
rvrv�s ��2�->�?�D����E�(�(rr	)rI�errorsrrrrr"r(rL�
__import__rbrNrmrvrrr
�<module>r�sp��"�6/��*��
� 0�
��(��J$�J$�Z	(���X�]�X�v_�_�D)r

Youez - 2016 - github.com/yon3zu
LinuXploit