
    g`                         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e      Z G d	 d
e      Zy)    )defaultdict)	getLogger)AnyDefaultDict)BaseReporter   )	CandidateRequirementc                   (    e Zd ZddZdededdfdZy)PipReporterreturnNc                 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    /var/www/python.vincentserveurtest.ovh/public_html/venv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/reporter.py__init__zPipReporter.__init__   s)    >I#>N$9
9
K*
&    	criterion	candidatec                    | 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   r   r   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   r   N)__name__
__module____qualname__r   r   r	   r-    r   r   r   r      s!    
,S Y 4 r   r   c                       e Zd ZdZddZdeddfdZdededdfdZdeddfd	Z	d
e
deddfdZdededdfdZdeddfdZy)PipDebuggingReporterz9A reporter that does an info log for every event it sees.r   Nc                 .    t         j                  d       y )NzReporter.starting()r   r    r   s    r   startingzPipDebuggingReporter.starting=   s    )*r   indexc                 0    t         j                  d|       y )NzReporter.starting_round(%r)r6   )r   r8   s     r   starting_roundz#PipDebuggingReporter.starting_round@   s    159r   statec                 ^    t         j                  d|       t         j                  d||       y )Nz Reporter.ending_round(%r, state)zReporter.ending_round(%r, %r))r   r    r'   )r   r8   r;   s      r   ending_roundz!PipDebuggingReporter.ending_roundC   s"    6>4eUCr   c                 0    t         j                  d|       y )NzReporter.ending(%r)r6   )r   r;   s     r   endingzPipDebuggingReporter.endingG   s    )51r   r#   r$   c                 2    t         j                  d||       y )Nz#Reporter.adding_requirement(%r, %r)r6   )r   r#   r$   s      r   adding_requirementz'PipDebuggingReporter.adding_requirementJ   s    9;Or   r   r   c                 2    t         j                  d||       y )Nz$Reporter.rejecting_candidate(%r, %r)r6   )r   r   r   s      r   r-   z(PipDebuggingReporter.rejecting_candidateM   s    :IyQr   c                 0    t         j                  d|       y )NzReporter.pinning(%r)r6   )r   r   s     r   pinningzPipDebuggingReporter.pinningP   s    *I6r   r.   )r/   r0   r1   __doc__r7   r   r:   r   r=   r?   r
   r	   rA   r-   rD   r2   r   r   r4   r4   :   s    C+:C :D :D# Dc Dd D2C 2D 2Pk P9 PQU PRS RY R4 R7 7t 7r   r4   N)collectionsr   loggingr   typingr   r    pip._vendor.resolvelib.reportersr   baser	   r
   r/   r   r   r4   r2   r   r   <module>rK      s7    #  # 9 (	8	+, +\7< 7r   