
    th                        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	e	eeef         Z G d
 de	eeef         Zy)    )annotations)defaultdict)	getLogger)Any)BaseReporter   )	CandidateRequirementc                      e Zd ZddZddZy)PipReporterc                B    t        t              | _        dddd| _        y )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selfs    QD:\jyotish\venv\Lib\site-packages\pip/_internal/resolution/resolvelib/reporter.py__init__zPipReporter.__init__   s)    >I#>N$9
9
K*
&    c                   | j                   |j                  xx   dz  cc<   | j                   |j                     }|| j                  vry | j                  |   }t        j	                  d|j                  |j                               d}|j                  D ]Y  }|j                  |j                  }}|dz  }|r ||j                   d|j                   dz  }n|dz  }||j                         z  }[ t        j                  |       y )	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   	criterion	candidatecountmessagemsgreq_inforeqr!   s	            r   rejecting_candidatezPipReporter.rejecting_candidate%   s    $$Y^^494,,Y^^<666007JINN KL@!--H"..C8OC&++a'7|DD,,3''))C . 	Sr   NreturnNoner%   r   r&   r	   r.   r/   )__name__
__module____qualname__r   r,    r   r   r   r      s    
,r   r   c                  T    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
y	)PipDebuggingReporterz9A reporter that does an info log for every event it sees.c                .    t         j                  d       y )NzReporter.starting()r   r   r   s    r   startingzPipDebuggingReporter.starting?   s    )*r   c                0    t         j                  d|       y )NzReporter.starting_round(%r)r8   )r   indexs     r   starting_roundz#PipDebuggingReporter.starting_roundB   s    159r   c                ^    t         j                  d|       t         j                  d||       y )Nz Reporter.ending_round(%r, state)zReporter.ending_round(%r, %r))r   r   r$   )r   r;   states      r   ending_roundz!PipDebuggingReporter.ending_roundE   s"    6>4eUCr   c                0    t         j                  d|       y )NzReporter.ending(%r)r8   )r   r>   s     r   endingzPipDebuggingReporter.endingI   s    )51r   c                2    t         j                  d||       y )Nz#Reporter.adding_requirement(%r, %r)r8   )r   r    r!   s      r   adding_requirementz'PipDebuggingReporter.adding_requirementL   s     	9;Or   c                2    t         j                  d||       y )Nz$Reporter.rejecting_candidate(%r, %r)r8   )r   r%   r&   s      r   r,   z(PipDebuggingReporter.rejecting_candidateQ   s    :IyQr   c                0    t         j                  d|       y )NzReporter.pinning(%r)r8   )r   r&   s     r   pinningzPipDebuggingReporter.pinningT   s    *I6r   Nr-   )r;   r   r.   r/   )r;   r   r>   r   r.   r/   )r>   r   r.   r/   )r    r
   r!   zCandidate | Noner.   r/   r0   )r&   r	   r.   r/   )r1   r2   r3   __doc__r9   r<   r?   rA   rC   r,   rF   r4   r   r   r6   r6   <   sF    C+:D2P&P0@P	P
R7r   r6   N)
__future__r   collectionsr   loggingr   typingr    pip._vendor.resolvelib.reportersr   baser	   r
   r1   r   strr   r6   r4   r   r   <module>rO      sR    " #   9 (	8	+,{Is:; +\7<Y(CD 7r   