
    KiE                        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 ddlmZ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dS )    )annotations)defaultdict)Mapping)	getLogger)Any)BaseReporter   )	Candidate
ConstraintRequirementc                       e Zd ZdddZddZdS )PipReporterNconstraintsMapping[str, Constraint] | NonereturnNonec                `    t          t                    | _        |pi | _        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_constraints_messages_at_reject_count)selfr   s     d/srv/django_bis/venv311/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/reporter.py__init__zPipReporter.__init__   sD    >I#>N>N$'-29
9
K*
 *
&&&    	criterionr   	candidater
   c                T   | j         |j        xx         dz  cc<   | j         |j                 }|| j        v rA| j        |         }t                              d|                    |j                             d}|j        D ]I}|j        |j        }}|dz  }|r||j         d|j	         dz  }n|dz  }||
                                z  }J| j        r=|j        }	| j                            |	          }
|
r|
j        r|	 |
j         }|d	| z  }t                              |           d
S )zReport a candidate being rejected.

        Logs both the rejection count message (if applicable) and details about
        the requirements and constraints that caused the rejection.
        r	   zINFO: %s)package_namez0Will try a different candidate, due to conflict:z
     z depends on zThe user requested z%
    The user requested (constraint) N)r   namer   loggerinfoformatinformationrequirementparentversionformat_for_errorr   get	specifierdebug)r   r   r   countmessagemsgreq_inforeqr)   r#   
constraintconstraint_texts               r   rejecting_candidatezPipReporter.rejecting_candidate'   sj    	$Y^4449444,Y^<D2224U;GKK
GNN	N$O$OPPP@!- 	* 	*H".C8OC -&+DDDDDD,,3'')))CC  	R>D*..t44J Rj2 R%)"A:+?"A"AQQQQSr   )N)r   r   r   r   r   r   r   r
   r   r   )__name__
__module____qualname__r   r6    r   r   r   r      sA        
 
 
 
 
.     r   r   c                  J    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.r   r   c                :    t                               d           d S )NzReporter.starting()r$   r%   )r   s    r   startingzPipDebuggingReporter.startingL   s    )*****r   indexr   c                <    t                               d|           d S )NzReporter.starting_round(%r)r?   )r   rA   s     r   starting_roundz#PipDebuggingReporter.starting_roundO   s    1599999r   stater   c                t    t                               d|           t                               d||           d S )Nz Reporter.ending_round(%r, state)zReporter.ending_round(%r, %r))r$   r%   r.   )r   rA   rD   s      r   ending_roundz!PipDebuggingReporter.ending_roundR   s4    6>>>4eUCCCCCr   c                <    t                               d|           d S )NzReporter.ending(%r)r?   )r   rD   s     r   endingzPipDebuggingReporter.endingV   s    )511111r   r(   r   r)   Candidate | Nonec                >    t                               d||           d S )Nz#Reporter.adding_requirement(%r, %r)r?   )r   r(   r)   s      r   adding_requirementz'PipDebuggingReporter.adding_requirementY   s!     	9;OOOOOr   r   r   r
   c                >    t                               d||           d S )Nz$Reporter.rejecting_candidate(%r, %r)r?   )r   r   r   s      r   r6   z(PipDebuggingReporter.rejecting_candidate^   s    :IyQQQQQr   c                <    t                               d|           d S )NzReporter.pinning(%r)r?   )r   r   s     r   pinningzPipDebuggingReporter.pinninga   s    *I66666r   N)r   r   )rA   r   r   r   )rA   r   rD   r   r   r   )rD   r   r   r   )r(   r   r)   rI   r   r   r7   )r   r
   r   r   )r8   r9   r:   __doc__r@   rC   rF   rH   rK   r6   rN   r;   r   r   r=   r=   I   s        CC+ + + +: : : :D D D D2 2 2 2P P P P
R R R R7 7 7 7 7 7r   r=   N)
__future__r   collectionsr   collections.abcr   loggingr   typingr    pip._vendor.resolvelib.reportersr   baser
   r   r   r8   r$   strr   r=   r;   r   r   <module>rX      s   " " " " " " # # # # # # # # # # # #             9 9 9 9 9 9 4 4 4 4 4 4 4 4 4 4	8		7 7 7 7 7,{Is:; 7 7 7t7 7 7 7 7<Y(CD 7 7 7 7 7r   