a
    i	                     @   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dZeddddZdS )PipReporterNreturnc                 C   s   t t| _dddd| _d S )Nzpip is looking at multiple versions of {package_name} to determine which version is compatible with other requirements. This could take a while.zThis 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   n/home/ec2-user/npost_license/.venv/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/reporter.py__init__   s
    
zPipReporter.__init__	candidater   c                 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)__name__
__module____qualname__r   r   r    r   r   r   r   r
      s   r
   c                   @   s   e Zd ZdZddddZeddddZeedd	d
dZeddddZ	e
eddddZeddddZeddddZdS )PipDebuggingReporterz9A reporter that does an info log for every event it sees.Nr   c                 C   s   t d d S )NzReporter.starting()r   r   r   r   r   r   starting1   s    zPipDebuggingReporter.starting)indexr   c                 C   s   t d| d S )NzReporter.starting_round(%r)r%   )r   r'   r   r   r   starting_round4   s    z#PipDebuggingReporter.starting_round)r'   stater   c                 C   s   t d| d S )Nz Reporter.ending_round(%r, state)r%   )r   r'   r)   r   r   r   ending_round7   s    z!PipDebuggingReporter.ending_round)r)   r   c                 C   s   t d| d S )NzReporter.ending(%r)r%   )r   r)   r   r   r   ending:   s    zPipDebuggingReporter.ending)requirementparentr   c                 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   s   t d| d S )NzReporter.backtracking(%r)r%   r   r   r   r   r   r    @   s    z!PipDebuggingReporter.backtrackingc                 C   s   t d| d S )NzReporter.pinning(%r)r%   r/   r   r   r   pinningC   s    zPipDebuggingReporter.pinning)r!   r"   r#   __doc__r&   r   r(   r   r*   r+   r	   r   r.   r    r0   r   r   r   r   r$   .   s   r$   N)collectionsr   loggingr   typingr   r   Z pip._vendor.resolvelib.reportersr   baser   r	   r!   r   r
   r$   r   r   r   r   <module>   s   "