
    ]Mh                     z    d Z ddlZddlZeefZddZ G d d          Zedk    rddl	Z	 e	j
                     dS dS )	zThis module contains miscellaneous helpers.

It is not considered part of the public ufoLib API. It does, however,
define the :py:obj:`.deprecated` decorator that is used elsewhere in
the module.
    N c                       fd}|S )a@  Decorator factory to mark functions as deprecated with given message.

    >>> @deprecated("Enough!")
    ... def some_function():
    ...    "I just print 'hello world'."
    ...    print("hello world")
    >>> some_function()
    hello world
    >>> some_function.__doc__ == "I just print 'hello world'."
    True
    c                 J     t          j                    fd            }|S )Nc                  `    t          j        j         d t          d            | i |S )Nz function is a deprecated.    )category
stacklevel)warningswarn__name__DeprecationWarning)argskwargsfuncmsgs     V/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/fontTools/ufoLib/utils.pywrapperz9deprecated.<locals>.deprecated_decorator.<locals>.wrapper   sL    M=BBSBB+   
 4((((    )	functoolswraps)r   r   r   s   ` r   deprecated_decoratorz(deprecated.<locals>.deprecated_decorator   s>    				) 	) 	) 	) 	) 
		) r    )r   r   s   ` r   
deprecatedr      s$    
 
 
 
 
  r   c                        e Zd Zed             Zed             Ze fd            Zd Zed             Z	ed             Z
 xZS )_VersionTupleEnumMixinc                     | j         d         S Nr   valueselfs    r   majorz_VersionTupleEnumMixin.major-       z!}r   c                     | j         d         S )N   r   r    s    r   minorz_VersionTupleEnumMixin.minor1   r#   r   c                     t          |t                    r | |df          S ||                                 S t                                          |          S r   )
isinstanceintdefaultsuper	_missing_)clsr   	__class__s     r   r,   z _VersionTupleEnumMixin._missing_5   sT     eS!! 	#3qz??"=;;== ww  '''r   c                 $    | j          d| j         S )N.)r"   r&   r    s    r   __str__z_VersionTupleEnumMixin.__str__?   s    *++tz+++r   c                 N    t          | j                                                  S N)max__members__valuesr-   s    r   r*   z_VersionTupleEnumMixin.defaultB   s      3?))++,,,r   c                 N    t          | j                                                  S r3   )	frozensetr5   r6   r7   s    r   supported_versionsz)_VersionTupleEnumMixin.supported_versionsG   s    //11222r   )r   
__module____qualname__propertyr"   r&   classmethodr,   r1   r*   r:   __classcell__)r.   s   @r   r   r   ,   s          X   X ( ( ( ( [(, , , - - [- 3 3 [3 3 3 3 3r   r   __main__)r   )__doc__r
   r   r)   floatnumberTypesr   r   r   doctesttestmodr   r   r   <module>rF      s          El       :3 3 3 3 3 3 3 3@ zNNNGO r   