ok

Mini Shell

Direktori : /opt/cloudlinux/venv/lib64/python3.11/site-packages/guppy/heapy/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/guppy/heapy/__pycache__/Use.cpython-311.pyc

�

�܋f1\��H�ddlZGd�dejjj��ZdS)�Nc��eZdZdZdZdZdZdZd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd2d�Zd�Zd�Zd3d�Zd4d�Zd�Zd5d�Zd�Zd�Zd�Zd6d�Zd7d�Zd7d�Zd8d�Zd9d �Zd!Zd"Zd#Z d$Z!d%Z"d&Z#d'Z$d(Z%d)Z&d*Z'd+Z(d,Z)d-Z*d.Z+d/Z,d0Z-d1Z.dS):�_GLUECLAMP_)�_hiding_tag_)�reprefix�default_reprefix�gcobjs�relheap�relheapg�relheapu�__doc__)�Anything�Clodo�Id�Idset�Module�Nothing�Prod�Rcs�Root�Size�Type�Unity�Via�doc�findex�heap�heapu�idset�iso�load�monitor�pb�setref�test)�Viewr�
_load_stat�_check_tracemalloc�ctimer�dumphr�heapg�loadcr	r
rr�
setrelheap�setrelheapg�setrelheapu�tc_adapt�tc_repr�union�uniset_from_setcsatable�warnings�Statzhpy().c��|jS�N�r��selfs �F/opt/cloudlinux/venv/lib64/python3.11/site-packages/guppy/heapy/Use.py�_get_gcobjsz_GLUECLAMP_._get_gcobjs�
���|��c��|jSr6r7r8s r:�_get_relheapz_GLUECLAMP_._get_relheapr<r=c��|jSr6r7r8s r:�
_get_relheapgz_GLUECLAMP_._get_relheapgr<r=c��|jSr6r7r8s r:�
_get_relheapuz_GLUECLAMP_._get_relheapu"r<r=c���ddl}t|j�����D]9\}}t	||j��rt
|dd��|jurd|zcS�:|jS)Nr�_sharez%s.)	�__main__�list�__dict__�items�
isinstance�	__class__�getattrrEr)r9rF�k�vs    r:�
_get_reprefixz_GLUECLAMP_._get_reprefix%s~��
	������*�0�0�2�2�3�3�	!�	!�D�A�q��1�d�n�-�-�
!��A�x��.�.�$�+�=�=��q�y� � � ���$�$r=c�$�|jjjS)a[Root: RootStateType

This attribute is a symbolic root containing attributes from which all
reachable objects in the heap can be reached. It is the only value (a
singleton) of its kind; see [1] for a description of its attributes.

References
        [0] heapy_Use.html#heapykinds.Use.Root
        [1] heapy_RootState.html#heapykinds.RootStateType)r%�heapyc�	RootStater8s r:�	_get_Rootz_GLUECLAMP_._get_Root1s���y��)�)r=c�8�d|j�d|jdd��d�S)Nz&Top level interface to Heapy.
Use eg: zdoc for more info on ����.)rr8s r:�__repr__z_GLUECLAMP_.__repr__>s,���
�M�M�M�4�=��"��-�-�-�/�	/r=�c�Z�|}|jjjj�||��S)aL        #OBSOLETE
$HP.dir(opts: str+])-> GuppyDir
$HP.dir(opts: str+]).<attribute> -> GuppyDoc

A replacement for the builtin function dir(), providing a listing of
public attributes for Heapy objects. It also has an attribute for each
item in the listing, for example:

>>> $HP.dir().heap

returns a GuppyDoc object providing documentation for the heap
method. The method also takes a string argument specifying further
options. Currently the following are provided:

        'l'     Generate a listing of the synopsis lines.
        'L'     Generate a listing of the entire doc strings.)�_root�guppy�etc�Help�dir)r9�opts�objs   r:�Ddirz_GLUECLAMP_.DdirDs*��&���z��#�(�,�,�S�$�7�7�7r=c�j�|jjjj�|dd|jz���S)a�Overview documentation for top level Heapy object.
Provides a listing of the available attributes.
Accessing the attribute name on the doc objects gives further info, eg:

    >>> hp.doc.heap

gives doc for the heap method when hp is the top level Heapy object.

References may be embedded in the documentations. To access a
reference, opening up a web browser with the doc for it one can do eg:

    >>> hp.doc.heap[1]

The reference number 0 is special. If it is provided, it is the
reference to the html doc for the described object itself. So to see
in the web browser the doc for the heap method one can do:

    >>> hp.doc.heap[0]

References
    [0] heapy_Use.html#heapykinds.Use.docz3Top level interface to Heapy. Available attributes:z2Use eg: %sdoc.<attribute> for info on <attribute>.)�header�footer)rZr[r\r]r^rr8s r:�_get_docz_GLUECLAMP_._get_docZsF��.�z��#�(�,�,�T�57�56�8<�
�5F�-�G�G�	Gr=c��|jjdkr|j�d��|j���st
d���dS)N)��zoPython 3.7 and below tracemalloc may not record accurate producer trace. See https://bugs.python.org/issue35053zqTracemalloc is not tracing. No producer profile available. See https://docs.python.org/3/library/tracemalloc.html)�sys�version_infor3�warn�tracemalloc�
is_tracing�RuntimeErrorr8s r:r'z_GLUECLAMP_._check_tracemallocwsv���8� �6�)�)��M���I�
J�
J�
J���*�*�,�,�	J��I�J�J�
J�	J�	Jr=�c��|j�d��|j�|��}||jz}|S)z DEPRECATED zIMethod Use.heapg is depreciated, it doesn't work well. Use heapu instead.)r3rkr%r*r
)r9�rma�hs   r:r*z_GLUECLAMP_.heapg�sF���
���W�	Y�	Y�	Y��I�O�O�C� � ��	�T�]����r=rc��|j�|��}d}|s5|jr.t|jt	|����r||jz}d}|r�|j}|s5|jr.t|jt	|����r||jz}d}d|_|r0|xjd|�|jj��zz
c_|xjdz
c_|S)aheapu() -> Stat

Finds the objects in the heap that remain after garbage collection but
are _not_ reachable from the root.  This can be used to find objects
in extension modules that remain in memory even though they are
gc-collectable and not reachable.

Returns an object containing a statistical summary of the objects
found - not the objects themselves. This is to avoid making the
objects reachable.

See also: setref[1]

References
    [0] heapy_Use.html#heapykinds.Use.heapu
    [1] heapy_Use.html#heapykinds.Use.setrefrrozData from unreachable objectsz relative to: %sz.
)	r%rrrJ�type�stat�firstheaderr(�timemade)r9rq�absrurr�rels      r:rz_GLUECLAMP_.heapu�s���$
�I�O�O�C� � �����	�t�}�	��D�M�4��7�7�)K�)K�	�
����A��C��	#���A��
�4�=�
�Z��
�t�A�w�w�-O�-O�
��T�]�"����;�A�M��
D��
�
�!3�!%���D�M�,B�!C�!C�"D�D�
�
�
�M�M�U�"�M�M��r=c�`�|j���}||jz}||jz}|S)aheap() -> IdentitySet[1]

Traverse the heap from a root to find all reachable and visible
objects. The objects that belong to a heapy instance are normally not
included. Return an IdentitySet with the objects found, which is
presented as a table partitioned according to a default equivalence
relation (Clodo [3]).

See also: setref[2]

References
    [0] heapy_Use.html#heapykinds.Use.heap
    [1] heapy_UniSet.html#heapykinds.IdentitySet
    [2] heapy_Use.html#heapykinds.Use.setref
    [3] heapy_Use.html#heapykinds.Use.Clodo)r%rrr	)r9rrs  r:rz_GLUECLAMP_.heap�s2��"
�I�N�N����	�T�[���	�T�\����r=c�t��	�
�t�t��rt����	�	fd�}n�t�d��rt�d��s�fd�}n�t�d��r�|r�j}n�j}g�
|��}|st�d|z}	|r(�
�|��||krn|��}|�(t�n%#t$r�
�|��YnwxYw�
fd�}ntd���tt|������}|�d��std	�z���||�
d
��dzd����}	t||��}n$#t $rtd
��d|�d����wxYw||��S)a�load(alt:[fn: loadablefilenamestring+ or
          fn: loadableiterableofstrings+]
     [use_readline = boolean+]) -> Stat

Load heapy-related data from a serialized form. Currently it handles
data generated by Stat.dump.

Arguments
    fn: loadablefilenamestring+
        A string argument is treated as a file name.
    fn: loadableiterableofstrings+
        An open file or an iterator will be iterated over enough
        to read one package of data, and another call to load
        will read the next package.
    use_readline = boolean+
        If true, the method will use .readline() instead of
        iteration, which may be necessary in case the input
        comes from a pipe since otherwise the Python runtime
        would try to read ahead a big block before returning the
        first package of data.
Returns
    one package of statistical data.

References
    [0] heapy_Use.html#heapykinds.Use.loadc3��K�d}	��|������}|sdS����}|V��F)Nr)�seek�readline�tell)�pos�line�fs  �r:�	get_trowsz#_GLUECLAMP_.load.<locals>.get_trows�sU���������F�F�3�K�K�K��:�:�<�<�D������&�&�(�(�C��J�J�J�
r=�__iter__�__next__c����Sr6�)�fns�r:r�z#_GLUECLAMP_.load.<locals>.get_trows�s����	r=z.end: %sc����Sr6r�)�trowss�r:r�z#_GLUECLAMP_.load.<locals>.get_trowss����r=zBArgument should be a string, file or an iterable yielding strings.z.loader:z1Format error in %r: no initial .loader directive.�:roNzFormat error in z: no such loader: rV)rJ�str�open�hasattrr~r��
StopIteration�append�	TypeError�next�iter�
startswith�
ValueError�index�striprL�AttributeError)r9r��use_readliner��get_liner��endline�a�loaderr�r�s `       @@r:r z_GLUECLAMP_.load�s�����8�b�#���;	V��R���A�
�
�
�
�
�
��R��
$�
$�'	V�W�R��-D�-D�'	V�
�
�
�
�
�
�
�R��
$�
$�#	V��
'��;����;���E��8�:�:�D��
$�#�#� �4�'�G�	
&��(��L�L��&�&�&��w����#�8�:�:�D�	�(�(�'���!�
&�
&�
&����W�%�%�%�%�%�
&����
�
�
�
�
�
��T�V�V�
V�
��i�i�k�k�"�"�#�#���|�|�J�'�'�	J��C�b�H�J�J�
J��1�7�7�3�<�<��>�?�?�#�)�)�+�+��	J��T�6�*�*�F�F���	J�	J�	J��*�=?�R�R����H�J�J�
J�	J�����v�i� � � s�1C�C$�#C$�:F�!F,c#�K�t|t��rt|��}	|�|��V��)z< Generates all objects from an open file f or a file named f)rJr�r�r )r9r�s  r:�loadallz_GLUECLAMP_.loadall*sC�����a����	��Q���A�	��)�)�A�,�,����	r=c�p�t|dd��}	t|�|d������%)N�rro)r�)r��printr )r9r�r�s   r:r+z_GLUECLAMP_.loadc1s;����S�!����	0��$�)�)�A�A�)�.�.�/�/�/�	0r=c��t|d��}ddl}	|���}|j�|��|���t
t|��������q)N�wr)	r��gcrru�dump�flushr��len�get_objects)r9r�r�r��xs     r:r)z_GLUECLAMP_.dumph6sm����S�M�M���	�	�	�	)��	�	���A�
�F�K�K��N�N�N�
�G�G�I�I�I��#�b�n�n�&�&�'�'�(�(�(�		)r=Nc���|�,|�*|���|���dS|�|�|��|�|�|��dSdS)a�setref()

Set a reference point for heap usage measurement.  This applies to
both the heap[1] and heapu[2] methods. The heap() method will only
show the objects allocated after the time setref was called. The
heapu() method, since it deals with summary data and not actual
objects, will show the difference of sizes and counts compared to when
setref was called.

References
    [0] heapy_Use.html#heapykinds.Use.setref
    [1] heapy_Use.html#heapykinds.Use.heap
    [2] heapy_Use.html#heapykinds.Use.heapuN)r,r.)r9�	reachable�unreachables   r:r#z_GLUECLAMP_.setref?sw�����!4��O�O�������������$����	�*�*�*��&�� � ��-�-�-�-�-�'�&r=c�J�|�|j���}||_dSr6)r%rr	�r9�	references  r:r,z_GLUECLAMP_.setrelheapWs$�����	���(�(�I� ����r=c��|j�d��|� d|_|j���}||_dS)Nz:Method Use.setrelheapg is depreciated, use setref instead.)r3rkr
r%r*r�s  r:r-z_GLUECLAMP_.setrelheapg\sK���
���H�	J�	J�	J��� �D�M��	���)�)�I�!��
�
�
r=c��|�d|_|�d|���}|rt||j��s|j}||_dS)NT)rxru)rrrJr4ru)r9r�rus   r:r.z_GLUECLAMP_.setrelheapudsQ���� �D�M��
�
�t�$�
�7�7�I��	'�
�9�d�i�8�8�	'�!��I�!��
�
�
r=Fc�N�|jjj�|��dS)z�test([debug: bool+ = False])

Run the Heapy test suite.

Argument
    debug
        If True, the tests will be run in debug mode so the stack frame
        can be examined with pdb.pm() after the first exception.N)�_parentr$�test_all�	test_main)r9�debugs  r:r$z_GLUECLAMP_.testls&��	
���"�,�,�U�3�3�3�3�3r=)z_parent.Classifiers:Clodoz_parent.Classifiers:Idz_parent.Classifiers:Idsetz_parent.Classifiers:Modulez_parent.Classifiers:Prodz_parent.Classifiers:Rcsz_parent.Classifiers:Sizez_parent.Classifiers:Typez_parent.Classifiers:Unityz_parent.Classifiers:Viaz_parent.Classifiers:findexz_parent.Classifiers:sonokindz_parent.Classifiers:tc_adaptz_parent.Classifiers:tc_reprz_parent.Monitor:monitorz_parent.Part:_load_statz_parent.Part:Statz_parent.Prof:pbz_parent.UniSet:Anythingz_parent.UniSet:idsetz_parent.UniSet:isoz_parent.UniSet:Nothingz_parent.UniSet:unionz&_parent.UniSet:uniset_from_setcastablez_parent:Viewz_parent.View:_hiding_tag_z	_root:sysz_root:tracemallocz_root.time:ctimez_root:warningsz�Anything: Kind

A symbolic set that represents all possible Python objects.

References
    [0] heapy_Use.html#heapykinds.Use.AnythingadClodo:EquivalenceRelation
Clodo(alt:[tc: typeexceptdict+ or dictof =
        typeoremptytuple+]) -> Kind

Equivalence relation by class or dict owner. It distinguishes between
objects based on their type just like the Type relation, and in
addition distinguishes between dicts depending on what class they are
'owned' by, i.e. occur in __dict__ attribute of.

When called it returns the equivalence class defined by the argument,

EITHER:
    tc: A positional argument, a type but not a dict, to
        create the corresponding equivalence class.
OR:
    dictof: A named argument, to create an equivalence class
        consisting of all dicts that are owned by objects of the type
        specified in the argument; or dicts with no owner if
        an empty tuple is given. XXX express this simpler&better...


References
    [0] heapy_Use.html#heapykinds.Use.ClodoaYId:EquivalenceRelation
Id(address: objectaddress+) -> Kind)

This equivalence relation defines objects to be equivalent only if
they are identical, i.e. have the same address. When called it returns
the equivalence class defined by the argument:

    address: The memory address of an object.

References
    [0] heapy_Use.html#heapykinds.Use.Ida�Id:EquivalenceRelation
Idset(node: Anything+) -> IdentitySet

This equivalence relation defines objects to be equivalent only if
they are identical, i.e. have the same address. When called it returns
the equivalence class defined by the argument:

    node: Anything+
        Any object is a valid argument.

Note
    This is mainly for special purpose internal use. The Id
equivalence relation is more efficient when partitioning large
sets.a�Module:EquivalenceRelation
x.Module( draw:[name = modulename+ , at = moduleaddress+]) -> Kind

This equivalence relation defines objects to be equivalent if they are
the same module, or if none of them is a module.  Partitioning a set
of objects using this equivalence relation will therefore result in
one singleton set for each module and one set containing all other
objects.

Calling the Module equivalence relation creates a Kind containing the
module given in the keyword argument(s). Either the name, address or
both may be specified. If no argument is specified the equivalence
class is that of non-module objects.

References
    [0] heapy_Use.html#heapykinds.Use.Modulez^Nothing: IdentitySet

The empty set.

References
    [0] heapy_Use.html#heapykinds.Use.Nothinga�Prod: EquivalenceRelation
Prod() -> KindOfProdFamily[1]
Prod(path_prefix: string+) -> Kind
Prod(scope: Anything+) -> Kind
Prod(seq: [filename: string+, alt: positive+]) -> KindOfProdFamily[1]

In this equivalence relation, objects are classified by the producer,
the line in which the object was allocated.

In zero-argument form, the equivalence relation creates a Kind matching
objects whose producer is unknown.

In one-argument form, the equivalence relation constructor creates an
alternative equivalence relation and has two possible types of arguments:

    path_prefix: string+
        A path prefix filter on the file name
    scope: Anything+
        Anything that can be used by inspect.getsourcelines()

In the two-argument form, the equivalence relation creates a Kind matching
objects whose producer matches exactly the given arguments:

    filename: string+
        File name of the producer
    lineno: positive+
        Line number of producer

With None arguments, the default equivalence relation will never match, but
alternate equivalence relations may, as described in KindOfProdFamily[1].

References
    [0] heapy_Use.html#heapykinds.Use.Prod
    [1] heapy_UniSet.html#heapykinds.KindOfProdFamilyaRcs: EquivalenceRelation
Rcs ( 0..*: alt:[kind: Kind+ or sok: SetOfKind+]) -> KindOfRetClaSetFamily

(Referrer classification set.)

In this equivalence relation, objects are classified by classifying
their referrers, using the Clodo equivalence relation. These
classifications are collected in a set, representing the
classification of the object.

Calling Rcs creates an equivalence class from specified set of
referrer classifications. The arguments specify a set of Kind objects,
each of which representing an equivalence class of Clodo.

    kind: Kind+
        This adds a single Kind to the set of Kinds of referrers.
    sok: SetOfKind+
        This adds each Kind in the sok argument to the total set of
        Kinds of referrers.
References
    [0] heapy_Use.html#heapykinds.Use.Rcsa?Size: EquivalenceRelation
Size(size: notnegative+) -> KindOfSizeFamily[1])

In this equivalence relation, objects are classified by memory size,
so each equivalence class represents a particular size of object.

References
    [0] heapy_Use.html#heapykinds.Use.Size
    [1] heapy_UniSet.html#heapykinds.KindOfSizeFamilya�Type: EquivalenceRelation
Type(type: type+) -> KindOfTypeFamily[1]

In this equivalence relation, objects are classified by type so each
equivalence class represents objects of a particular type.  Calling it
creates a Kind representing the type specified in the argument:

    type: type+
        A Python type object or a representation of it.

References
    [0] heapy_Use.html#heapykinds.Use.Type
    [1] heapy_UniSet.html#heapykinds.KindOfTypeFamilya?Unity: EquivalenceRelation
Unity() -> Kind[1]

In this equivalence relation, all objects are considered equivalent.
There is only one equivalence class, that is, Anything[2].

References
    [0] heapy_Use.html#heapykinds.Use.Unity
    [1] heapy_UniSet.html#heapykinds.Kind
    [2] heapy_Use.html#heapykinds.Use.Anythinga�Via: EquivalenceRelation
Via( 0..*:rel: relationname+) -> KindOfInViaFamily[1]

In this equivalence relation, objects are classified by how they are
referred from their referrers, so each equivalence class represents
objects that have a particular set of relations to their referrers.
Calling it creates a Kind representing the set of referrers specified
by the argument:

    rel: relationname+
        Each argument specifies one referrer relation. The arguments
        should be strings and can be of any of the following forms.

[expression]
    Indexing of a dict, list, tuple (etc).  The expression must be a
    Python expression that can be evaluated in a local
    environment. The environment will contain the builtins and a name
    'hp' that is bound to the current Use instance.

.attribute
    Getting an attribute from a builtin type or a slot of a slotted
    type. (I.E. not an attribute that is in a dict of an object.)

.f_locals["name"]
     A local variable of a frame.

.f_locals ["name"]
    A variable in a CELL of a frame. Note the space between f_locals and
    [. This is to distinguish it from ordinary locals, and still use a
    syntax that could be used to access those variables directly from
    Python.

.keys()[integer]
    A key in a dictionary, at the indicated place in its keys().

References
    [0] heapy_Use.html#heapykinds.Use.Via
    [1] heapy_UniSet.html#heapykinds.KindOfInViaFamilya~
findex( 0..*:kind: Kind+) -> (
    Subkind of: EquivalenceRelation[1]
    callable: (index: notnegative+)
        Calling the returned equivalence relation creates an
        equivalence class.
        Argument
            index: notnegative+
                The position of the matching kind in the sequence of
                kinds. The first one has index 0. Specifying the
                length of the sequence means that the equivalence
                class returned is the one where none of the kinds in
                the sequence matched.

    )

Create an equivalence relation based on a sequence of kinds. The
name is a combination of find and index. The classification of
each objects is done as follows:

For each kind in the sequence, check whether the object is an
element of that kind. If it is, the classification is the index
of that kind in the sequence. If the end of the sequence is
reached, the classification is the length of the sequence.
Argument
    kind: Kind+
        Each argument specifies the kind in that position in the
        sequence.
Bugs
    Though the Kind objects representing the equivalence classes
    work with set operations such as intersection and union, the
    tests such as subset and equality do not generally give the
    expected result.
References
    [0] heapy_Use.html#heapykinds.Use.findex
    [1] heapy_UniSet.html#heapykinds.EquivalenceRelationaqidset(nodes: iterable+) -> IdentitySet[1]

Create a set of objects based on identity.

Argument
    nodes: iterable+
        The argument must be an iterable and may yield any kind
        of objects.
Note
    This method is the same as iso except for the argument.
References
    [0] heapy_Use.html#heapykinds.Use.idset
    [1] heapy_UniSet.html#heapykinds.IdentitySetauiso( 0..*:node: Any+) -> IdentitySet[1]

Create a set of objects based on identity.

Argument
    node: Any+
        Any kind of objects are valid arguments.
Note
    This method is the same as idset[2] except for the argument.
References
    [0] heapy_Use.html#heapykinds.Use.iso
    [1] heapy_UniSet.html#heapykinds.IdentitySet
    [2] heapy_Use.html#heapykinds.Use.idset�
)rX)ro)rorro)r)NNr6)Nro)F)/�__name__�
__module__�__qualname__�	_preload_�	_chgable_�_dir_�	_private_rr;r?rArCrOrSrWrarer'r*rrr r�r+r)r#r,r-r.r$�	_imports_�
_doc_Anything�
_doc_Clodo�_doc_Id�
_doc_Idset�_doc_Module�_doc_Nothing�	_doc_Prod�_doc_Rcs�	_doc_Size�	_doc_Type�
_doc_Unity�_doc_Via�_doc_findex�
_doc_idset�_doc_iso�_doc_sokindr�r=r:rrs.�������I�?�I�
�E��I� ��������������
%�
%�
%�*�*�*�/�/�/�8�8�8�8�,G�G�G�:J�J�J�����$�$�$�$�L���,c!�c!�c!�c!�J���0�0�0�
)�)�)�.�.�.�.�0!�!�!�!�
"�"�"�"�"�"�"�"�
4�
4�
4�
4��I�B2�M�/�J�0
,�G�
	�J�0�K�"1�L�"9�I�H-�H�,	9�I�9�I�	2�J�%:�H�N#<�K�J4�J�/�H��K�K�Kr=r)�guppy.etc.Gluer[r\�Glue�	Interfacerr�r=r:�<module>r�sV������n
�n
�n
�n
�n
�%�)�.�*�n
�n
�n
�n
�n
r=

Zerion Mini Shell 1.0