o
    Ëý°jÞ	  ã                   @   sp   d dl mZ d dlmZ d dlmZmZ d dlmZ ddl	m
Z
mZ eeƒZG dd„ deƒZG d	d
„ d
eƒZdS )é    )Údefaultdict)Ú	getLogger)ÚAnyÚDefaultDict)ÚBaseReporteré   )Ú	CandidateÚRequirementc                   @   s(   e Zd Zddd„Zdeddfdd„ZdS )	ÚPipReporterÚreturnNc                 C   s   t tƒ| _ddddœ| _d S )Nz�pip is looking at multiple versions of {package_name} to determine which version is compatible with other requirements. This could take a while.zëThis is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C.)r   é   é   )r   ÚintÚbacktracks_by_packageÚ_messages_at_backtrack©Úself© r   úŸ/root/aizidognhua/tmp/workspace/projects/ec89d86c-575f-41c9-af57-ac45cbdbf775/venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/reporter.pyÚ__init__   s
   
ôzPipReporter.__init__Ú	candidatec                 C   sR   | j |j  d7  < | j |j }|| jvrd S | j| }t d|j|jd�¡ d S )Nr   zINFO: %s)Úpackage_name)r   Únamer   ÚloggerÚinfoÚformat)r   r   ÚcountÚmessager   r   r   Úbacktracking#   s   

zPipReporter.backtracking©r   N)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r   r   r
      s    
r
   c                   @   sŽ   e Zd ZdZddd„Zdeddfdd„Zded	eddfd
d„Zd	eddfdd„Z	de
deddfdd„Zdeddfdd„Zdeddfdd„ZdS )ÚPipDebuggingReporterz9A reporter that does an info log for every event it sees.r   Nc                 C   s   t  d¡ d S )NzReporter.starting()©r   r   r   r   r   r   Ústarting1   s   zPipDebuggingReporter.startingÚindexc                 C   ó   t  d|¡ d S )NzReporter.starting_round(%r)r$   )r   r&   r   r   r   Ústarting_round4   ó   z#PipDebuggingReporter.starting_roundÚstatec                 C   r'   )Nz Reporter.ending_round(%r, state)r$   )r   r&   r*   r   r   r   Úending_round7   r)   z!PipDebuggingReporter.ending_roundc                 C   r'   )NzReporter.ending(%r)r$   )r   r*   r   r   r   Úending:   r)   zPipDebuggingReporter.endingÚrequirementÚparentc                 C   s   t  d||¡ d S )Nz#Reporter.adding_requirement(%r, %r)r$   )r   r-   r.   r   r   r   Úadding_requirement=   s   z'PipDebuggingReporter.adding_requirementr   c                 C   r'   )NzReporter.backtracking(%r)r$   ©r   r   r   r   r   r   @   r)   z!PipDebuggingReporter.backtrackingc                 C   r'   )NzReporter.pinning(%r)r$   r0   r   r   r   ÚpinningC   r)   zPipDebuggingReporter.pinningr   )r    r!   r"   Ú__doc__r%   r   r(   r   r+   r,   r	   r   r/   r   r1   r   r   r   r   r#   .   s    
r#   N)Úcollectionsr   Úloggingr   Útypingr   r   Ú pip._vendor.resolvelib.reportersr   Úbaser   r	   r    r   r
   r#   r   r   r   r   Ú<module>   s    "