o
    h                     @  s   d dl mZ d dlmZ d dlmZ d dlmZ d dlm	Z	 ddl
mZmZ eeZG dd	 d	e	eeef ZG d
d de	eeef ZdS )    )annotations)defaultdict)	getLogger)Any)BaseReporter   )	CandidateRequirementc                   @  s    e Zd ZdddZdd	d
ZdS )PipReporterreturnNonec                 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.zpip is still 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reject_count_by_package_messages_at_reject_countself r   _/var/www/html/venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/reporter.py__init__   s
   
zPipReporter.__init__	criterionr   	candidater   c           	      C  s   | j |j  d7  < | j |j }|| jvrd S | j| }td|j|jd d}|jD ]&}|j|j}}|d7 }|rH||j d|j	 d7 }n|d7 }||
 7 }q,t| 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msgreq_inforeqr!   r   r   r   rejecting_candidate%   s   


zPipReporter.rejecting_candidateNr   r   r   r   r   r   r   r   )__name__
__module____qualname__r   r*   r   r   r   r   r
      s    
r
   c                   @  sV   e Zd ZdZdddZddd	Zd ddZd!ddZd"ddZd#ddZ	d$ddZ
dS )%PipDebuggingReporterz9A reporter that does an info log for every event it sees.r   r   c                 C  s   t d d S )NzReporter.starting()r   r   r   r   r   r   starting?   s   zPipDebuggingReporter.startingindexr   c                 C     t d| d S )NzReporter.starting_round(%r)r1   )r   r3   r   r   r   starting_roundB      z#PipDebuggingReporter.starting_roundstater   c                 C  s   t d| t d|| d S )Nz Reporter.ending_round(%r, state)zReporter.ending_round(%r, %r))r   r   r$   )r   r3   r7   r   r   r   ending_roundE   s   z!PipDebuggingReporter.ending_roundc                 C  r4   )NzReporter.ending(%r)r1   )r   r7   r   r   r   endingI   r6   zPipDebuggingReporter.endingr    r	   r!   Candidate | Nonec                 C     t d|| d S )Nz#Reporter.adding_requirement(%r, %r)r1   )r   r    r!   r   r   r   adding_requirementL   s   z'PipDebuggingReporter.adding_requirementr   r   r   c                 C  r;   )Nz$Reporter.rejecting_candidate(%r, %r)r1   )r   r   r   r   r   r   r*   Q   s   z(PipDebuggingReporter.rejecting_candidatec                 C  r4   )NzReporter.pinning(%r)r1   )r   r   r   r   r   pinningT   r6   zPipDebuggingReporter.pinningNr+   )r3   r   r   r   )r3   r   r7   r   r   r   )r7   r   r   r   )r    r	   r!   r:   r   r   r,   )r   r   r   r   )r-   r.   r/   __doc__r2   r5   r8   r9   r<   r*   r=   r   r   r   r   r0   <   s    





r0   N)
__future__r   collectionsr   loggingr   typingr    pip._vendor.resolvelib.reportersr   baser   r	   r-   r   strr
   r0   r   r   r   r   <module>   s    .