%PDF- %PDF-
| Direktori : /usr/lib/python3/dist-packages/aptdaemon/__pycache__/ |
| Current File : //usr/lib/python3/dist-packages/aptdaemon/__pycache__/utils.cpython-312.pyc |
�
��kd( � � � d Z dZdZddlZddlZddlZddlZddlZddlZddl m
Z
ej dk\ rdZndZd � Z
ej d
� � Z G d� de� Zd
� Zy)z|Module with little helper functions and classes:
deprecated - decorator to emit a warning if a depreacted function is used
z%Sebastian Heinlein <devel@glatzor.de>)�
deprecated�IsoCodes� N)�ElementTree�3�gettext�ugettextc �B � � t j � � � fd�� }|S )z�This is a decorator which can be used to mark functions
as deprecated. It will result in a warning being emitted
when the function is used.
Taken from http://wiki.python.org/moin/PythonDecoratorLibrary
#GeneratingDeprecationWarnings
c �� �� t j dd�j iz t �j j
�j j dz �� �| i |��S )Nz)Call to deprecated function %(funcname)s.�funcname� )�category�filename�lineno)�warnings�
warn_explicit�__name__�DeprecationWarning�__code__�co_filename�co_firstlineno)�args�kwargs�funcs ��1/usr/lib/python3/dist-packages/aptdaemon/utils.py�new_funczdeprecated.<locals>.new_func1 s] �� ����7��D�M�M�;�
� (��]�]�.�.��=�=�/�/�!�3�
� �T�$�V�$�$� )� functools�wraps)r r s ` r r r ) s'