
    si/
                        S r SSKJr  SSKrSSKJr  SSKJr  SSKrSSK	J
r
  SSKJr  S	S
KJr  S	SKJr  \(       a  SSKJr  \R&                  " \5      r  S       SS jjr\SS j5       rg)zNotices network fetch logic.    )annotationsN)ThreadPoolExecutor)TYPE_CHECKING   )get_session)get_spinner   )cached_response)ChannelNoticeResponse)Sequencec                    [        US9n[        S5         [        [        SS UR	                  S U 5       5       5      5      sSSS5        $ ! , (       d  f       g= f)a_  
Provided a list of channel notification url/name tuples, return a sequence of
ChannelNoticeResponse objects.

Args:
    url_and_names: channel url and the channel name
    silent: turn off "loading animation" (defaults to False)
    max_workers: increase worker number in thread executor (defaults to 10)
Returns:
    Sequence[ChannelNoticeResponse]
)max_workerszRetrieving noticesNc              3  &   #    U  H  nUv   M	     g 7fN ).0chn_infos     3lib/python3.13/site-packages/conda/notices/fetch.py	<genexpr>'get_notice_responses.<locals>.<genexpr>.   s      % %s   c                    [        U 6 $ r   )get_channel_notice_response)argss    r   <lambda>&get_notice_responses.<locals>.<lambda>1   s
    %@$%G    )r   r   tuplefiltermap)url_and_namessilentr   executors       r   get_notice_responsesr#      sQ      "k:H	)	*$,LLG%

 
+	*	*s   -A
Ac           	     D   [        U 5      n UR                  U SSS9n UR                  S	:  a  [        XUR                  5       S
9$ [
        R                  SUR                   SU  35        g! [        R                  R                   a    [
        R                  SU SU  35         g[        R                  R                   a(  n[
        R                  SU SU SU  35         SnAgSnAff = f! [         a%    [
        R                  SU  35        [        XSS
9s $ f = f)z
Return a channel response object. We use this to wrap the response with
additional channel information to use. If the response was invalid we suppress/log
and error message.
F   )allow_redirectstimeoutzRequest timed out for channel: z url: NzRequest error <z> for channel: i,  )	json_dataz	Received z when trying to GET zUnable to parse JSON data for )r   getrequests
exceptionsTimeoutloggerinfoRequestExceptionerrorstatus_coder   json
ValueError)urlnamesessionrespexcs        r   r   r   8   s    #G	{{  
@c!(diikJJKK)D$4$4#55I#OP && 5dV6#GH// se?4&seLM  @4SE:;$S$??@s4   A- 'C0 %C0 -9C-(C-C((C-0,DD)F
   )r    zSequence[tuple[str, str]]r!   boolr   intreturnzSequence[ChannelNoticeResponse])r4   strr5   r=   r<   zChannelNoticeResponse | None)__doc__
__future__r   loggingconcurrent.futuresr   typingr   r*   gateways.connection.sessionr   	reportersr   cacher
   typesr   collections.abcr   	getLogger__name__r-   r#   r   r   r   r   <module>rJ      s    # "  1    5 # " ((			8	$
 
,

 
 %	
@ @ @r   