� J�gB��T�ddlZddlZddlmZdgZGd�d��Zd�Zd�Zd�ZdS)�N)� signature� deprecatedc�2�eZdZdZd d�Zd�Zd�Zd�Zd�ZdS) ra�Decorator to mark a function or class as deprecated. Issue a warning when the function is called/the class is instantiated and adds a warning to the docstring. The optional extra argument will be appended to the deprecation message and the docstring. Note: to use this with the default value for extra, put in an empty of parentheses: Examples -------- >>> from sklearn.utils import deprecated >>> deprecated() <sklearn.utils.deprecation.deprecated object at ...> >>> @deprecated() ... def some_function(): pass Parameters ---------- extra : str, default='' To be added to the deprecation messages. �c��||_dS)N)�extra)�selfrs �i/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/sklearn/utils/deprecation.py�__init__zdeprecated.__init__&s ���� � � �c���t|t��r|�|��St|t��r|�|��S|�|��S)zPCall method Parameters ---------- obj : object )� isinstance�type�_decorate_class�property�_decorate_property� _decorate_fun)r �objs r �__call__zdeprecated.__call__)sf�� �c�4� � � +��'�'��,�,� ,� ��X� &� &� +��*�*�3�/�/� /��%�%�c�*�*� *r c����d|jz�|jr �d|jzz �|j�t|��}��fd�}||_d|_�|_||_|S)NzClass %s is deprecated�; %sc���tj�t����tjurt�|��S�|g|�Ri|��S�N)�category)�warnings�warn� FutureWarning�object�__new__)�cls�args�kwargs�msg�news ��r �wrappedz+deprecated._decorate_class.<locals>.wrappedFsW��� �M�#� � 6� 6� 6� 6��f�n�$�$��~�~�c�*�*�*��3�s�,�T�,�,�,�V�,�,� ,r r)�__name__rrr�deprecated_original� __signature__)r r �sigr%r#r$s @@r rzdeprecated._decorate_class>s�����&���5�� �:� '� �6�D�J�&� &�C��k����n�n�� -� -� -� -� -� -��� �$���&)��#����� r c����d�jz�|jr �d|jzz �tj�����fd���}�|_|S)zDecorate function funzFunction %s is deprecatedrc�J��tj�t����|i|��Sr)rrr)r!r"�funr#s ��r r%z)deprecated._decorate_fun.<locals>.wrapped]s-��� �M�#� � 6� 6� 6� 6��3��'��'�'� 'r )r&r� functools�wraps� __wrapped__)r r,r%r#s ` @r rzdeprecated._decorate_funVso����*�C�L�8�� �:� '� �6�D�J�&� &�C� ��� � � (� (� (� (� (� � � (� "����r c�|���|j�ttj�j����fd�����}|S)Nc�T��tj�t����j|i|��Sr)rrr�fget)r!r"r#�props ��r r%z.deprecated._decorate_property.<locals>.wrappedks1��� �M�#� � 6� 6� 6� 6��4�9�d�-�f�-�-� -r )rrr-r.r2)r r3r%r#s ` @r rzdeprecated._decorate_propertyhsQ�����j�� � ���� #� #� .� .� .� .� .� $� #� �� .��r N)r) r&� __module__� __qualname__�__doc__r rrrr�r r rr sn��������4����+�+�+�*���0���$ � � � � r c�r�t|dg��}|�g}dd�d�|D����v}|S)z>Helper to check if func is wrapped by our deprecated decorator� __closure__Nrrc�P�g|]#}t|jt���|j��$Sr7)r� cell_contents�str)�.0�cs r � <listcomp>z"_is_deprecated.<locals>.<listcomp>zs+��O�O�O�Q�j���#�.N�.N�O���O�O�Or )�getattr�join)�func�closures� is_deprecateds r �_is_deprecatedrEtsQ���t�]�B�/�/�H����� �B�G�G�O�O�(�O�O�O�%�%��M� �r c��|�|�td���|�|�td���|�tjdt��|S|S)zKHelper to deprecate the `Xt` argument in favor of `X` in inverse_transform.Nz%Cannot use both X and Xt. Use X only.z(Missing required positional argument: X.z;Xt was renamed X in version 1.5 and will be removed in 1.7.)� TypeErrorrrr)�X�Xts r �"_deprecate_Xt_in_inverse_transformrJ�s]���}����?�@�@�@��y�R�Z��B�C�C�C� �~�� � I� � � � �� � �Hr c�t�|dkr-tjdt��|�td���|S|�dS|S)zCHelper to deprecate force_all_finite in favor of ensure_all_finite.rzX'force_all_finite' was renamed to 'ensure_all_finite' in 1.6 and will be removed in 1.8.Nzb'force_all_finite' and 'ensure_all_finite' cannot be used together. Pass `ensure_all_finite` only.T)rrr� ValueError)�force_all_finite�ensure_all_finites r �_deprecate_force_all_finiterO�sa���<�'�'�� � � � � � � � (��1��� �  ��� ��t� �r ) r-r�inspectr�__all__rrErJrOr7r r �<module>rRs����������������� �.��f�f�f�f�f�f�f�f�R��� � � �(����r
Memory