� I�g�����dZddlZddlZddlZddlmZddlmZGd�d��ZGd�de��Z ddl Z dd �Z n#e $r  dd�Z YnwxYwejdkr dZddlmZd�ZdSddlmZdS)z, Backports of fixes for joblib dependencies �N)�basename)�utilc�>�eZdZdZd d�Zd�Zd�Zd�Zd�Zd�Z d �Z dS) �Version��Backport from deprecated distutils We maintain this backport to avoid introducing a new dependency on `packaging`. We might rexplore this choice in the future if all major Python projects introduce a dependency on packaging anyway. Nc�8�|r|�|��dSdS�N��parse��self�vstrings �`/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/joblib/backports.py�__init__zVersion.__init__�,�� � � �J�J�w� � � � � � � �c�@�|jj�dt|���d�S)Nz ('z'))� __class__�__name__�str�r s r�__repr__zVersion.__repr__s"��"�n�5�5�5�s�4�y�y�y�y�A�Arc�N�|�|��}|tur|S|dkS�Nr��_cmp�NotImplemented�r �other�cs r�__eq__zVersion.__eq__�,�� �I�I�e� � �� �� � ��H��A�v� rc�N�|�|��}|tur|S|dkSrrrs r�__lt__zVersion.__lt__#�,�� �I�I�e� � �� �� � ��H��1�u� rc�N�|�|��}|tur|S|dkSrrrs r�__le__zVersion.__le__)r"rc�N�|�|��}|tur|S|dkSrrrs r�__gt__zVersion.__gt__/r%rc�N�|�|��}|tur|S|dkSrrrs r�__ge__zVersion.__ge__5r"rr ) r� __module__� __qualname__�__doc__rrr!r$r'r)r+�rrrr s��������� � � � �B�B�B���� ��� ��� ��� ����rrc�^�eZdZdZejdej��Zd d�Zd�Z d�Z d�Z d�Z dS) � LooseVersionrz(\d+ | [a-z]+ | \.)Nc�8�|r|�|��dSdSr r r s rrzLooseVersion.__init__Hrrc���||_d�|j�|��D��}t|��D](\}} t |��||<�#t $rY�%wxYw||_dS)Nc�"�g|] }|r|dk� |�� S)�.r/)�.0�xs r� <listcomp>z&LooseVersion.parse.<locals>.<listcomp>Qs0��)�)�)�A��)� �C�x�x��'�x�xr)r� component_re�split� enumerate�int� ValueError�version)r r� components�i�objs rr zLooseVersion.parseLs����� �)�)��!2�!8�!8��!A�!A�)�)�)� �� �+�+� � �F�A�s� � #�C��� �1� � ��� � � ��� ����"�� � � s�A� A!� A!c��|jSr )rrs r�__str__zLooseVersion.__str__[s ���|�rc�&�dt|��zS)NzLooseVersion ('%s'))rrs rrzLooseVersion.__repr__^s��$�s�4�y�y�0�0rc���t|t��rt|��}nt|t��stS|j|jkrdS|j|jkrdS|j|jkrdSdS)Nr������)� isinstancerr1rr>)r rs rrzLooseVersion._cmpas�� �e�S� !� !� "� ��'�'�E�E��E�<�0�0� "�!� !� �<�5�=� (� (��1� �<�%�-� '� '��2� �<�%�-� '� '��1� (� 'rr ) rr,r-r.�re�compile�VERBOSEr9rr rCrrr/rrr1r1<s����������2�:�4�b�j�A�A�L� � � � � "� "� "����1�1�1� � � � � rr1�uint8�r+�CFc�6�tjd�|t|��t j������t j||||||���}tt j ��dkr||_ |rddl m }||��|S)abCustom memmap constructor compatible with numpy.memmap. This function: - is a backport the numpy memmap offset fix (See https://github.com/numpy/numpy/pull/8443 for more details. The numpy fix is available starting numpy 1.13) - adds ``unlink_on_gc_collect``, which specifies explicitly whether the process re-constructing the memmap owns a reference to the underlying file. If set to True, it adds a finalizer to the newly-created memmap that sends a maybe_unlink request for the memmaped file to resource_tracker. z?[MEMMAP READ] creating a memmap (shape {}, filename {}, pid {}))�dtype�mode�offset�shape�orderz1.13rG)�add_maybe_unlink_finalizer) r�debug�formatr�os�getpid�np�memmapr1� __version__rR�_memmapping_reducerrU) �filenamerPrQrRrSrT�unlink_on_gc_collect�mmrUs r� make_memmaprars��� � � ��f�U�H�X�$6�$6�� � � �D�D� � � � �Y�x�u�4��"�%�1�1�1�� ��� '� '�&� 0� 0��B�I� � +� G� G� G� G� G� G� &� &�r� *� *� *�� rc� �td���)NzL'joblib.backports.make_memmap' should not be used if numpy is not installed.)�NotImplementedError)r^rPrQrRrSrTr_s rrara�s��!� )�*�*� *r�nt)�� )�replacec���d}d}d}||krh t||��dS#t$rB}t|dd��tvrt j|��||z }|dz}n�Yd}~nd}~wwxYw||k�h�)z�Renames ``src`` into ``dst`` overwriting ``dst`` if it exists. On Windows os.replace can yield permission errors if executed by two different processes. rGrg����MbP?�winerrorN�)rg� Exception�getattr�access_denied_errors�time�sleep)�src�dst�max_sleep_time�total_sleep_time� sleep_time�excs r�concurrency_safe_renamerv�s��� ����� ���/�/� ���S�!�!�!����� � � ��3� �D�1�1�5I�I�I��J�z�*�*�*�$� �2�$��!�O�J�J���J�J�J�J�����  ���� ��/�/� s� � A,�8A'�'A,)rLrMrNrNF)r.rXrIrn�os.pathr�multiprocessingrrr1�numpyrZra� ImportError�namermrgrvr/rr�<module>r|sm���� � � � � � � � � � � � ������� � � � � � �-�-�-�-�-�-�-�-�`0�0�0�0�0�7�0�0�0�f#*�����?@�@E�������6�*�*�*�?@�@E�*�*�*�*�*�*�*�����7�d�?�?�"�������������.6�5�5�5�5�5�5�5s� A� A�A
Memory