. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
| Server IP : 162.0.212.4 / Your IP :
216.73.216.221 [
Web Server : LiteSpeed System : Linux premium146.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : alshnoli ( 2431) PHP Version : 8.3.28 Disable Function : NONE Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/hc_python/lib/python3.12/site-packages/sqlalchemy/util/__pycache__/ |
Upload File : |
�
���g�
� � � d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z dd lm
Z
dd
lmZ ddlmZ dd
l
mZ ddlmZ ede�� Zg d�Z dd�Z d dd�Z dd�Zdd�Zy)zTopological sorting algorithms.� )�annotations)�Any)�
Collection)�DefaultDict)�Iterable)�Iterator)�Sequence)�Set)�Tuple)�TypeVar� )�util)�CircularDependencyError�_T)�bound)�sort�sort_as_subsets�find_cyclesc # � K � t j t � }| D ] \ }}|| j |� � t |� }t |� }|r~g }|D ]( }|j || � s�|j
|� �* |s t dt | |� t |� � �|j |� |D � cg c] } | |v s�| �� }} |�� |r�}y y c c} w �w)NzCircular dependency detected.)r �defaultdict�set�add�list�
isdisjoint�appendr r �
_gen_edges�difference_update)
�tuples�allitems�edges�parent�child�todo�todo_set�output�node�ts
�L/opt/hc_python/lib64/python3.12/site-packages/sqlalchemy/util/topological.pyr r s� � �� � '+�&6�&6�s�&;�E��
���
�e����� � � ��>�D��8�}�H�
����D��"�"�5��;�/��
�
�d�#� � �)�/��F�H�-��5�!��
� �"�"�6�*��1�4�a�1��=��4��1��� �� 2�s% �A+C�.A
C�8 C�C�C�Cc # �F K � t | |� D ] }|E d{ ��� � y7 ��w)a, sort the given list of items by dependency.
'tuples' is a list of tuples representing a partial ordering.
deterministic_order is no longer used, the order is now always
deterministic given the order of "allitems". the flag is there
for backwards compatibility with Alembic.
N)r )r r �deterministic_order�set_s r( r r : s# � �� � ���1����� 2��s �!��!c �� � t j t � }| D ] \ }}|| j |� � t |� }t � }|D ]� }|g}|j |� } |s�|d }
||
D ]d }||v r6||j |� d }| j
|� |j |� || v s�B|j |� | j |� n |j � }|r���� |S )N���)r r r r �
difference�indexr �updater �remove�pop)r r r r! r"