o
    LK&h                     @   s   d dl mZ d dlZd dlmZmZ edddddd	d
edddidd
edddddd
dZej	de
 dd Zdd Zdd ZdS )    )cleandocN)SetuptoolsDeprecationWarningSetuptoolsWarning)z	Hello {x}z
	{target} {v:.1f}      World)xvtargetz
    Hello 5
    !!

            ********************************************************************************
            World 3.0
            ********************************************************************************

    !!
    )argskwargsexpected)SummaryLorem ipsumdue_date)i'        a  
    Summary
    !!

            ********************************************************************************
            Lorem ipsum

            By 9999-Nov-22, you need to update your project and remove deprecated calls
            or your builds will no longer be supported.
            ********************************************************************************

    !!
    i  r   r   some_page.html)r   see_docs  
    Summary
    !!

            ********************************************************************************
            Lorem ipsum

            This deprecation is overdue, please update your project and remove deprecated
            calls to avoid build errors in the future.

            See https://setuptools.pypa.io/en/latest/some_page.html for details.
            ********************************************************************************

    !!
    )defaultfutue_due_datepast_due_date_with_docsexample_namec                 C   s   t | d }t | d }t | d }| dd tt}tj|i | W d   n1 s0w   Y  t|t|ks?J dS )z]
    It should automatically handle indentation, interpolation and things like due date.
    r   r   r   SETUPTOOLS_ENFORCE_DEPRECATIONfalseN)	_EXAMPLESsetenvpytestwarnsr   emit_get_messager   )monkeypatchr   r   r   r   	warn_info r%   Q/var/www/html/venv/lib/python3.10/site-packages/setuptools/tests/test_warnings.pytest_formatting=   s   r'   c                 C   sl   G dd dt }| dd tt }|  W d    n1 s"w   Y  d}t|jt|ks4J d S )Nc                   @   s   e Zd ZdZdZdZdZdS )z1test_due_date_enforcement.<locals>._MyDeprecationr   r   r   r   N)__name__
__module____qualname___SUMMARY_DETAILS	_DUE_DATE	_SEE_DOCSr%   r%   r%   r&   _MyDeprecationM   s
    r/   r   truer   )r   r   r   raisesr!   strvaluer   )r#   r/   exc_infor   r%   r%   r&   test_due_date_enforcementL   s   
r5   c                 C   s   t dd | D S )Nc                 s   s    | ]	}|j jd  V  qdS )r   N)messager   ).0warnr%   r%   r&   	<genexpr>j   s    z_get_message.<locals>.<genexpr>)next)r$   r%   r%   r&   r"   i   s   r"   )inspectr   r   setuptools.warningsr   r   dictr   markparametrizekeysr'   r5   r"   r%   r%   r%   r&   <module>   s.    
6
