U
    Ðvag  ã                   @   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eddœdd„ZdS )ÚPipReporterN©Úreturnc                 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–pip is still 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Úreject_count_by_packageÚ_messages_at_reject_count©Úself© r   ú`/var/www/html/myvenv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/reporter.pyÚ__init__   s
    
ôzPipReporter.__init__©Ú	criterionÚ	candidater   c           	      C   s´   | j |j  d7  < | j |j }|| jkr.d S | j| }t d|j|jd�¡ d}|jD ]L}|j|j }}|d7 }|r�||j› d|j	› d�7 }n|d7 }|| 
¡ 7 }qXt |¡ d S )	Nr   zINFO: %s)Úpackage_namez0Will try a different candidate, due to conflict:z
    ú z depends on zThe user requested )r   Únamer   ÚloggerÚinfoÚformatÚinformationÚrequirementÚparentÚversionÚformat_for_errorÚdebug)	r   r   r   ÚcountÚmessageÚmsgZreq_infoÚreqr"   r   r   r   Úrejecting_candidate#   s    


zPipReporter.rejecting_candidate)Ú__name__Ú
__module__Ú__qualname__r   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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   Ústarting=   s    zPipDebuggingReporter.starting)Úindexr   c                 C   s   t  d|¡ d S )NzReporter.starting_round(%r)r/   )r   r1   r   r   r   Ústarting_round@   s    z#PipDebuggingReporter.starting_round)r1   Ústater   c                 C   s   t  d|¡ d S )Nz Reporter.ending_round(%r, state)r/   )r   r1   r3   r   r   r   Úending_roundC   s    z!PipDebuggingReporter.ending_round)r3   r   c                 C   s   t  d|¡ d S )NzReporter.ending(%r)r/   )r   r3   r   r   r   ÚendingF   s    zPipDebuggingReporter.ending)r!   r"   r   c                 C   s   t  d||¡ d S )Nz#Reporter.adding_requirement(%r, %r)r/   )r   r!   r"   r   r   r   Úadding_requirementI   s    z'PipDebuggingReporter.adding_requirementr   c                 C   s   t  d||¡ d S )Nz$Reporter.rejecting_candidate(%r, %r)r/   )r   r   r   r   r   r   r*   L   s    z(PipDebuggingReporter.rejecting_candidate)r   r   c                 C   s   t  d|¡ d S )NzReporter.pinning(%r)r/   )r   r   r   r   r   ÚpinningO   s    zPipDebuggingReporter.pinning)r+   r,   r-   Ú__doc__r0   r   r2   r   r4   r5   r	   r   r6   r*   r7   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   .