a
    e0h)                     @   s   d dl mZ d dlmZ d dlmZ d dlmZ erTd dlm	Z	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)BaseReporter)MYPY_CHECK_RUNNING)AnyDefaultDict   )	CandidateRequirementc                   @   s   e Zd Zdd Zdd ZdS )PipReporterc                 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.a"  This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking)r         )r   intbacktracks_by_package_messages_at_backtrackself r   Z/var/www/auris/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/reporter.py__init__   s
    
zPipReporter.__init__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   	candidatecountmessager   r   r   backtracking+   s    

zPipReporter.backtrackingN)__name__
__module____qualname__r   r   r   r   r   r   r      s   r   c                   @   sH   e Zd ZdZdd Zdd Zdd Zdd	 Zd
d Zdd Z	dd Z
dS )PipDebuggingReporterz9A reporter that does an info log for every event it sees.c                 C   s   t d d S )NzReporter.starting()r   r   r   r   r   r   starting:   s    zPipDebuggingReporter.startingc                 C   s   t d| d S )NzReporter.starting_round(%r)r#   )r   indexr   r   r   starting_round>   s    z#PipDebuggingReporter.starting_roundc                 C   s   t d| d S )Nz Reporter.ending_round(%r, state)r#   )r   r%   stater   r   r   ending_roundB   s    z!PipDebuggingReporter.ending_roundc                 C   s   t d| d S )NzReporter.ending(%r)r#   )r   r'   r   r   r   endingF   s    zPipDebuggingReporter.endingc                 C   s   t d|| d S )Nz#Reporter.adding_requirement(%r, %r)r#   )r   requirementparentr   r   r   adding_requirementJ   s    z'PipDebuggingReporter.adding_requirementc                 C   s   t d| d S )NzReporter.backtracking(%r)r#   r   r   r   r   r   r   N   s    z!PipDebuggingReporter.backtrackingc                 C   s   t d| d S )NzReporter.pinning(%r)r#   r-   r   r   r   pinningR   s    zPipDebuggingReporter.pinningN)r   r    r!   __doc__r$   r&   r(   r)   r,   r   r.   r   r   r   r   r"   7   s   r"   N)collectionsr   loggingr    pip._vendor.resolvelib.reportersr   pip._internal.utils.typingr   typingr   r   baser	   r
   r   r   r   r"   r   r   r   r   <module>   s   &