� J�g; ��p�dZddlZddlmZddlZddlZddlZddlm Z d�Z Gd�de ��Z de fd �Z dS) z� Utilities to manage deprecation errors & warnings. The contents of this module are internal to fpdf2, and not part of the public API. They may change at any time without prior warning or any deprecation period, in non-backward-compatible ways. �N��wraps)� ModuleTypec�<��t����fd���}|S)z<Decorator converting `txt=` arguments into `text=` argumentsc����|�dd��}|�@d|vrtd���||d<tjdtt ������|g|�Ri|��S)N�txt�textz.Both txt= & text= arguments cannot be providedz7The parameter "txt" has been renamed to "text" in 2.7.6�� stacklevel)�pop� ValueError�warnings�warn�DeprecationWarning�get_stack_level)�self�args�kwargs� txt_value�fns ��`/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/fpdf/deprecation.py�wrapperz+support_deprecated_txt_arg.<locals>.wrappers�����J�J�u�d�+�+� � � ����� �!Q�R�R�R�&�F�6�N� �M�I�"�*�,�,� � � � � �r�$�(��(�(�(��(�(�(�r)rrs` r�support_deprecated_txt_argrs5��� �2�Y�Y� )� )� )� )��Y� )� �Nrc�.��eZdZd�Z�fd�Z�fd�Z�xZS)� WarnOnDeprecatedModuleAttributesc� �td���)NzrYou tried to instantied the fpdf module. You probably want to import the FPDF class instead: from fpdf import FPDF)� TypeError)rs r�__call__z)WarnOnDeprecatedModuleAttributes.__call__&s��� %� � � rc���|dvr*tjdtt�����dSt ���|��S�N)�FPDF_CACHE_DIR�FPDF_CACHE_MODEzefpdf.FPDF_CACHE_DIR & fpdf.FPDF_CACHE_MODE have been deprecated in favour of FPDF(font_cache_dir=...)r )rrrr�super�__getattribute__)r�name� __class__s �r� __getattr__z,WarnOnDeprecatedModuleAttributes.__getattr__-sZ��� �8� 8� 8� �M�0�#�*�,�,� � � � ��4��w�w�'�'��-�-�-rc���|dvr*tjdtt�����dSt ���||��dSr!)rrrrr$� __setattr__)rr&�valuer's �rr*z,WarnOnDeprecatedModuleAttributes.__setattr__;sb��� �8� 8� 8� �M�0�#�*�,�,� � � � � �F� �����D�%�(�(�(�(�(r)�__name__� __module__� __qualname__rr(r*� __classcell__)r's@rrr%s`������� � � � .� .� .� .� .� )� )� )� )� )� )� )� )� )rr�returnc�r�ddl}tj�|j��}tj�t j��}t j��}d}|�Nt j|��}|� |��s|� |��r |j }|dz }nn|�N|S)z>Get the first place in the call stack that is not inside fpdf2rN�) �fpdf�os�path�dirname�__file__� contextlib�inspect� currentframe�getfile� startswith�f_back)r3�pkg_dir�contextlib_dir�frame�n�fnames rrrJs����K�K�K��g�o�o�d�m�,�,�G��W�_�_�Z�%8�9�9�N� � � "� "�E� �A� � ����&�&�� � � �G� $� $� ��(8�(8��(H�(H� ��L�E� ��F�A�A� � � � �Hr)�__doc__r8� functoolsrr9�os.pathr4r�typesrrr�intr�rr�<module>rIs������������������������������������(")�")�")�")�")�z�")�")�")�J �� � � � � � r
Memory