
    fi|                     n   d dl mZmZ d dlZd dlZd dlZd dlZd dlZd dlZd dl	Z	d dl
m
Z
mZmZ d dlmZ d dlmZ 	 d dlZn# e$ r dZY nw xY wd dlZd dlZd dlZd dlmZ d dlmZmZmZ d dlmZ d d	lmZm Z m!Z! d d
l"m#Z#m$Z$m%Z%m&Z& e#rPd 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- d dl"m.Z. d dl"m/Z/ d dl"m0Z0 d dl1m2Z2 d dl1m3Z3 d dl4m5Z5m6Z6 g Z7ej8        d dfej9        d dfej9        d dfej9        d dffD ]@Z:	 e7;                    e:d           e:d                     e:d          f           6# e<$ r Y =w xY w G d! d"e          Z=d.d#Z> G d$ d%e=          Z? G d& d'e?          Z@	 d dlAZAd dlBZB G d( d)e?          ZCn# e$ r  G d* d)e@          ZCY nw xY w G d+ d,e=          ZDd- ZEdS )/    )ABCabstractmethodN)datetime	timedeltatimezone)defaultdict)
getproxies)EndpointType)Dsnloggercapture_internal_exceptions)BackgroundWorker)EnvelopeItem
PayloadRef)TYPE_CHECKINGcastListDict)Any)Callable)DefaultDict)Iterable)Mapping)Optional)Self)Tuple)Type)Union)PoolManager)ProxyManager)EventEventDataCategoryc                  ,    t          t          d          S )NSO_KEEPALIVEgetattrsocket     d/var/www/html/Pagina-Ingenieria-Requisitos/venv/lib/python3.11/site-packages/sentry_sdk/transport.py<lambda>r,   0   s     ? ? r*      c                  ,    t          t          d          S )NTCP_KEEPIDLEr&   r)   r*   r+   r,   r,   1   s    WV^<< r*   -   c                  ,    t          t          d          S )NTCP_KEEPINTVLr&   r)   r*   r+   r,   r,   2   s    WV_== r*   
   c                  ,    t          t          d          S )NTCP_KEEPCNTr&   r)   r*   r+   r,   r,   3   s    WV];; r*         c                   b    e Zd ZdZdZddZd Zed             Z	 ddZ	d Z
	 	 ddd	d
Zd ZdS )	TransportzWBaseclass for all transports.

    A transport is used to send an event to sentry.
    Nc                 ~    || _         |r,|d         $|d         rt          |d                   | _        d S d | _        d S )Ndsn)optionsr   
parsed_dsn)selfr<   s     r+   __init__zTransport.__init__E   sE     	#wu~1gen1!'%.11DOOO"DOOOr*   c                     t          j        dt          d           t                      }|                    |           |                     |           dS )z
        DEPRECATED: Please use capture_envelope instead.

        This gets invoked with the event dictionary when an event should
        be sent to sentry.
        zAcapture_event is deprecated, please use capture_envelope instead!r7   
stacklevelN)warningswarnDeprecationWarningr   	add_eventcapture_envelope)r>   eventenvelopes      r+   capture_eventzTransport.capture_eventM   s_     	O	
 	
 	
 	
 ::5!!!h'''''r*   c                     dS )a  
        Send an envelope to Sentry.

        Envelopes are a data container format that can hold any type of data
        submitted to Sentry. We use it to send all event data (including errors,
        transactions, crons check-ins, etc.) to Sentry.
        Nr)   )r>   rI   s     r+   rG   zTransport.capture_envelope`   s	     	r*   c                     dS )z
        Wait `timeout` seconds for the current events to be sent out.

        The default implementation is a no-op, since this method may only be relevant to some transports.
        Subclasses should override this method if necessary.
        Nr)   r>   timeoutcallbacks      r+   flushzTransport.flushl   s	     tr*   c                     dS )z
        Forcefully kills the transport.

        The default implementation is a no-op, since this method may only be relevant to some transports.
        Subclasses should override this method if necessary.
        Nr)   r>   s    r+   killzTransport.killz   s	     tr*   r-   quantityc                    dS )a  This increments a counter for event loss by reason and
        data category by the given positive-int quantity (default 1).

        If an item is provided, the data category and quantity are
        extracted from the item, and the values passed for
        data_category and quantity are ignored.

        When recording a lost transaction via data_category="transaction",
        the calling code should also record the lost spans via this method.
        When recording lost spans, `quantity` should be set to the number
        of contained spans, plus one for the transaction itself. When
        passing an Item containing a transaction via the `item` parameter,
        this method automatically records the lost spans.
        Nr)   )r>   reasondata_categoryitemrU   s        r+   record_lost_eventzTransport.record_lost_event   s	    . tr*   c                     dS )NTr)   rR   s    r+   
is_healthyzTransport.is_healthy       tr*   NNN)__name__
__module____qualname____doc__r=   r?   rJ   r   rG   rP   rS   rZ   r\   r)   r*   r+   r9   r9   =   s         
 J# # # #( ( (& 	 	 ^	       	     2    r*   r9   c              #     K   |t          j        t          j                  }|                     d          D ]}	 |                                                    d          }|d d         \  }}|t          t          |                    z   }|r|                    d          pdD ]}||fV  	z# t          t          f$ r Y w xY wd S )N,:r7   seconds;r^   )
r   nowr   utcsplitstripr   intLookupError
ValueError)headerrj   limit
parametersretry_after_val
categoriesretry_aftercategorys           r+   _parse_rate_limitsrx      s      
{l8<((c"" 	 		,,S11J*4RaR.'OZ	#o2F2F G G GGK&@:+;+;C+@+@KG , ,+++++,Z( 	 	 	H		 	s   A6B22CCc                      e Zd ZdZdZd Z	 	 d dddZd Zd	 Ze	j
        dfd
Zd Zd!dZd"dZd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Z	 d#dZd Zed             Zed             Zej         d             ZdS )$BaseHttpTransportzThe base HTTP transport.   c                    ddl m} t                              | |           | j        J || _        t          |d                   | _        | j                            d|z            | _	        i | _
        t          j                                        | _        t          t                     | _        t%          j                    | _        |                                 | _        t,          j        | _        |                    di           }|                    d|                    d                    }|                    d	|t4          d
nd          }|dk    rt4          t7          j        d           d
}d }|dvr$t7          j        d|           d| _        d | _        n|| _        |	|| _        d S | j        d
k    r	d| _        d S | j        dk    r	d| _        d S d S )Nr   )VERSIONtransport_queue_size)
queue_sizezsentry.python/%s_experimentstransport_compression_level transport_zlib_compression_leveltransport_compression_algogzipbrzSYou asked for brotli compression without the Brotli module, falling back to gzip -9)r   r   z2Unknown compression algo %s, disabling compression	      )sentry_sdk.constsr}   r9   r?   r=   r<   r   _workerto_auth_auth_disabled_untilurllib3utilRetry_retryr   rn   _discarded_eventstime_last_client_report_sent
_make_pool_pool
sentry_sdkHub_hub_clsgetbrotlir   warning_compression_level_compression_algo)r>   r<   r}   experimentscompression_levelcompression_algos         r+   r?   zBaseHttpTransport.__init__   s   ------4)))***'7;Q3RSSS_,,-?'-IJJ
!l((**!,S!1!1(,	%__&&
 #kk."55'OO)OO>??
 
 '??(
 %0FN  	
 	
 t##Ne    & $>11NDFV   '(D#%)D""%5D"(&7D####v--&'D####t++&'D### ,+r*   Nr-   rT   c                   | j         d         sd S ||j        }d}|dk    r|                                pi }t          t	          t
          t          t          t          f                  |	                    d          pg                     dz   }| 
                    |d|           n;|dk    r#t          |                                          pd}n|t          d          | j        ||fxx         |z  cc<   d S )	Nsend_client_reportsr-   transactionspansspanrT   
attachmentzdata category not provided)r<   rX   get_transaction_eventlenr   r   r   strobjectr   rZ   	get_bytes	TypeErrorr   )r>   rW   rX   rY   rU   rH   
span_counts          r+   rZ   z#BaseHttpTransport.record_lost_event   s    |12 	F .MH--2244: T$sF{"34eii6H6H6NBOOPPSTT  &&vv
&KKKK,.. t~~//005A"8999}f4555A55555r*   c                 6    |j                             |          S r^   )headersr   r>   responserq   s      r+   _get_header_valuez#BaseHttpTransport._get_header_value  s    ##F+++r*   c                    |                      |d          }|r=t          j        d           | j                            t          |                     d S |j        dk    rt          j        d           |                      |d          }|| j                            |          nd pd}t          j
        t          j                  t          |          z   | j        d <   d S d S )Nzx-sentry-rate-limitsz%Rate-limited via x-sentry-rate-limits  zRate-limited via 429zRetry-After<   rg   )r   r   r   r   updaterx   statusr   parse_retry_afterr   rj   r   rk   r   )r>   r   rq   retry_after_valuerv   s        r+   _update_rate_limitsz%BaseHttpTransport._update_rate_limits  s   
 ''2HII 	NBCCC ''(:6(B(BCCCCC
 _##N1222 $ 6 6x O O %0 --.?@@@ 	 
 *2hl)C)Ci#G G G *D &&& $#r*   c                 $     fd}|                     t           j        j                  t           j                                                  d           	                      d|||          }n/# t          $ r"                      d            |d            w xY w	                      |           |j	        dk    r                     d           n|j	        dk    s|j	        d	k     rqt          j        d
|j	        t          |dt          |dd                                                     d                    |j	                              |d           |                                 d S # |                                 w xY w)Nc                                          | d           d S j        D ]}                     | |           d S )Nerror)rX   rY   )rZ   items)rW   rY   rI   r>   s     r+   record_lossz4BaseHttpTransport._send_request.<locals>.record_loss=  s_    &&vW&EEEEE$N > >D**6*====> >r*   )z
User-AgentzX-Sentry-AuthPOSTnetworknetwork_errorr   
status_429i,     z%Unexpected status code: %s (body: %s)datacontentz	status_{})r   r   r   client	to_header_request	Exceptionon_dropped_eventr   r   r   r   r'   formatclose)r>   bodyr   endpoint_typerI   r   r   s   `   `  r+   _send_requestzBaseHttpTransport._send_request4  s   	> 	> 	> 	> 	> 	> 	!$*"344!$TZ%9%9%;%;!<!< 	
 	
 	

	}}	 HH  	 	 	!!),,,K(((	
	$$X...#%%
 %%l333C''8?S+@+@;OHfgh	4.P.PQQ  
 %%k&8&8&I&IJJJO,,,NNHNNs   A6 6,B"&B=E9 9Fc                     d S r^   r)   )r>   _reasons     r+   r   z"BaseHttpTransport.on_dropped_eventm  r]   r*   Fr   c                 |   | j         d         sd S |s!| j        t          j                    |z
  k     sd S | j        }t	          t
                    | _        t          j                    | _        |sd S t          t          t          j                    d |                                D             d          d          S )Nr   c                 &    g | ]\  \  }}}|||d S ))rW   rw   rU   r)   ).0rw   rW   rU   s       r+   
<listcomp>zBBaseHttpTransport._fetch_pending_client_report.<locals>.<listcomp>  s>     ) ) ).Xv$ $*xXVV) ) )r*   )	timestampdiscarded_events)jsonclient_report)type)	r<   r   r   r   r   rn   r   r   r   )r>   forceintervalr   s       r+   _fetch_pending_client_reportz.BaseHttpTransport._fetch_pending_client_reportq  s    |12 	4 	6x9OOO41!,S!1!1(,	% 	4!%) )
 .3355) ) )	 	   !
 
 
 	
r*   c                     |                      |d          }|&|                     t          |g                     d S d S )Nr   )r   r   )r   )r   rG   r   )r>   r   r   s      r+   _flush_client_reportsz'BaseHttpTransport._flush_client_reports  sP    99PR9SS$!!(-"A"A"ABBBBB %$r*   c                 :      fd} ||          p
 |d           S )Nc                     j                             |           }|d uo!|t          j        t          j                  k    S r^   )r   r   r   rj   r   rk   )buckettsr>   s     r+   	_disabledz4BaseHttpTransport._check_disabled.<locals>._disabled  s9    %))&11BT>Eb8<+E+E&EEr*   r)   )r>   rw   r   s   `  r+   _check_disabledz!BaseHttpTransport._check_disabled  s@    	F 	F 	F 	F 	F
 y""5iioo5r*   c                 b    t          d | j                                        D                       S )Nc              3   Z   K   | ]&}|t          j        t          j                  k    V  'd S r^   )r   rj   r   rk   )r   r   s     r+   	<genexpr>z5BaseHttpTransport._is_rate_limited.<locals>.<genexpr>  sD       
 
02Bhl+++
 
 
 
 
 
r*   )anyr   valuesrR   s    r+   _is_rate_limitedz"BaseHttpTransport._is_rate_limited  s?     
 
6:6J6Q6Q6S6S
 
 
 
 
 	
r*   c                 4    | j                                         S r^   )r   fullrR   s    r+   _is_worker_fullz!BaseHttpTransport._is_worker_full  s    |  """r*   c                 T    |                                  p|                                  S r^   )r   r   rR   s    r+   r\   zBaseHttpTransport.is_healthy  s(    ((**Ed.C.C.E.EFFr*   c                    g }|j         D ]g}|                     |j                  r6|j        dv r|                     d           |                     d|           R|                    |           ht          |j        |          }|j         sd S |                     d          }||j                             |           | 	                    |          \  }}| j
        J t          j        d|j        | j
        j        | j
        j                   d	d
i}|r||d<   |                     |                                |t$          j        |           d S )N)r   r   defaultstatsdself_rate_limitsratelimit_backoffr   )r   r   r{   )r   z(Sending envelope [%s] project:%s host:%szContent-Typezapplication/x-sentry-envelopezContent-Encoding)r   r   rI   )r   r   rX   r   rZ   appendr   r   r   _serialize_enveloper=   r   debugdescription
project_idhostr   getvaluer
   ENVELOPE)r>   rI   	new_itemsrY   client_report_itemcontent_encodingr   r   s           r+   _send_envelopez BaseHttpTransport._send_envelope  s    	N 	' 	'D##D$677 '%)VVV))*<===&&':&FFFF  &&&& H$4IFFF~ 	4 ">>>KK)N!!"4555!%!9!9(!C!C$***6 O&O 		
 	
 	
 ;
  	;*:G&'MMOO&/	 	 	
 	
 	
 tr*   c                    d }t          j                    }| j        dk    s| j        |                    |           n| j        }| j        dk    rHt
          A|                    t          j        |                                | j                             nIt          j
        |d| j                  5 }|                    |           d d d            n# 1 swxY w Y   ||fS )Nr   r   )qualityw)fileobjmodecompresslevel)ioBytesIOr   r   serialize_intor   writecompress	serializer   GzipFile)r>   rI   r  r   fs        r+   r   z%BaseHttpTransport._serialize_envelope  s6   z||"a''4+A+I##D))))#5%--&2D

O **,,d6M      ] s$:Q   /++A.../ / / / / / / / / / / / / / /
  %%s   4CCCc                     t                      r^   NotImplementedErrorrR   s    r+   _get_pool_optionsz#BaseHttpTransport._get_pool_options      !###r*   c                    t                                          d          }|sdS |                    d          D ]M}|                                }|j                            |          s|j                            |          r dS NdS )NnoFre   T)r	   r   rl   rm   r   endswithnetloc)r>   r=   no_proxyr   s       r+   _in_no_proxyzBaseHttpTransport._in_no_proxy  s    <<##D)) 	5NN3'' 	 	D::<<D''-- 1B1K1KD1Q1Q ttur*   c                     t                      r^   r  rR   s    r+   r   zBaseHttpTransport._make_pool  r  r*   c                     t                      r^   r  r>   methodr   r   r   s        r+   r   zBaseHttpTransport._request  s     "###r*   c                       fd} j                             |          s6                     d           j        D ]}                     d|           d S d S )Nc                      t                      5                                                                   d d d            d S # 1 swxY w Y   d S r^   )r   r  r   )rI   r>   s   r+   send_envelope_wrapperzABaseHttpTransport.capture_envelope.<locals>.send_envelope_wrapper  s    ,.. - -##H---**,,,- - - - - - - - - - - - - - - - - -s   *AAA
full_queuequeue_overflowr   )r   submitr   r   rZ   )r>   rI   r"  rY   s   ``  r+   rG   z"BaseHttpTransport.capture_envelope  s    
	- 	- 	- 	- 	- 	- |""#899 	D!!,///  D D&&'7d&CCCC	D 	DD Dr*   c                      t          j        d           |dk    r: j                             fd            j                            ||           d S d S )NzFlushing HTTP transportr   c                  0                          d          S )NT)r   )r   rR   s   r+   r,   z)BaseHttpTransport.flush.<locals>.<lambda>.  s    (B(B(B(N(N r*   )r   r   r   r%  rP   rM   s   `  r+   rP   zBaseHttpTransport.flush%  sd     	.///Q;;L N N N NOOOLw11111 ;r*   c                 `    t          j        d           | j                                         d S )NzKilling HTTP transport)r   r   r   rS   rR   s    r+   rS   zBaseHttpTransport.kill1  s-    -...r*   c                  >    t          j        dt          d           dS )zRConvenience method to warn users about the deprecation of the `hub_cls` attribute.zNThe `hub_cls` attribute is deprecated and will be removed in a future release.   rA   N)rC   rD   rE   r)   r*   r+   _warn_hub_clszBaseHttpTransport._warn_hub_cls6  s0     	\	
 	
 	
 	
 	
 	
r*   c                 B    t                                            | j        S )QDEPRECATED: This attribute is deprecated and will be removed in a future release.HttpTransportr+  r   rR   s    r+   hub_clszBaseHttpTransport.hub_cls@  s     	##%%%}r*   c                 F    t                                            || _        dS )r-  Nr.  )r>   values     r+   r0  zBaseHttpTransport.hub_clsG  s!     	##%%%r*   r_   )Fr   )Fr^   )!r`   ra   rb   rc   TIMEOUTr?   rZ   r   r   r
   r   r   r   r   r   r   r   r   r\   r  r   r  r  r   r   rG   rP   rS   staticmethodr+  propertyr0  setterr)   r*   r+   rz   rz      s       ""G9( 9( 9(| 	"B "B "B "B "B "BH, , ,  : #+7 7 7 7r  
 
 
 
>C C C C6 6 6
 
 
# # #G G G3 3 3j& & &,$ $ $	 	 	$ $ $$ $ $D D D& 
2 
2 
2 
2  
 
 
 \
   X ^  ^  r*   rz   c                   @    e Zd ZU ereeef         ed<   d Zd Z	d Z
dS )r/  r   c                     | j                             di                               d          }|dnt          |          dt          j        | j                  d}d }| j         d         | j         d         }| j         d         rA|g }d	 |D             }t          D ])}|d
         |d         f|vr|                    |           *|||d<   | j         d         pPt          j	                            d          p1t          j	                            d          pt          j                    |d<   | j         d         pt          j	                            d          |d<   | j         d         pt          j	                            d          |d<   |S )Nr   transport_num_poolsr7   CERT_REQUIRED)total)	num_pools	cert_reqsrN   socket_options
keep_alivec                 .    h | ]}|d          |d         fS r   r-   r)   r   os     r+   	<setcomp>z2HttpTransport._get_pool_options.<locals>.<setcomp>f  $    AAAQQqT1Q4LAAAr*   r   r-   ca_certsSSL_CERT_FILEREQUESTS_CA_BUNDLE	cert_fileCLIENT_CERT_FILEkey_fileCLIENT_KEY_FILE)r<   r   rn   r   Timeoutr3  KEEP_ALIVE_SOCKET_OPTIONSr   osenvironcertifiwhere)r>   r<  r<   r>  used_optionsdefault_options         r+   r  zHttpTransport._get_pool_optionsS  s    L$$^R88<<=RSS	'/S^^(T\:::
 
 <()5!\*:;N<% 	:%!#AA.AAAL"; : :"1%~a'89MM")).999%(6G$% L$ z~~o..z~~233 }	 	
  $|K8  
BJNN=
 =
 #l:6 
"*..;
 ;

 r*   c                    | j         t          d          d }|                     | j                   }| j        d         }| j         j        dk    r,|dk    r&|p#| o t                                          d          }| j        d         }|s,|dk    r&|p#| o t                                          d          }|                                 }|r| j        d         }|r||d<   |                    d          rMd	}	 d
dl	m
} n'# t          $ r d}t          j        d|           Y nw xY w|r	 ||fi |S t          j        di |S t          j        |fi |S t          j        di |S )N4Cannot create HTTP-based transport without valid DSNhttps_proxyhttps 
http_proxyhttpproxy_headerssocksTr   )SOCKSProxyManagerFzYou have configured a SOCKS proxy (%s) but support for SOCKS proxies is not installed. Disabling proxy support. Please add `PySocks` (or `urllib3` with the `[socks]` extra) to your dependencies.r)   )r=   rp   r  r<   schemer	   r   r  
startswithurllib3.contrib.socksr^  ImportErrorr   r   r   r    r!   )	r>   proxyr  rW  rZ  optsr\  use_socks_proxyr^  s	            r+   r   zHttpTransport._make_pool~  s   ?"STTT$$T_55 l=1?!W,,+2C2COL$NZ\\5E5Eg5N5NE \,/
 	N***Mx<#LJLL4D4DV4L4LE%%'' 	/ L9M 6(5_%(( ;"&GGGGGGG"   &+ON ]     # 7,,U;;d;;;".66666+E::T:::&.....s   9D   !D$#D$c                 n    | j                             || j                            |          ||          S )N)r   r   )r   requestr   get_api_urlr  s        r+   r   zHttpTransport._request  s?     z!!J""=11	 " 
 
 	
r*   N)r`   ra   rb   r   r   r    r!   __annotations__r  r   r   r)   r*   r+   r/  r/  O  sc          0[,.////) ) )V,/ ,/ ,/\
 
 
 
 
r*   r/  c                   n    e Zd ZU dZdZereej        ej	        ej
        f         ed<   d Zd Zd Zd ZdS )	Http2Transportz&The HTTP2 transport based on httpcore.   r   c                 F    t          fd|j        D             d           S )Nc              3      K   | ]G\  }}|                     d                                           k    0|                     d           V  HdS )asciiN)decodelower)r   keyvalrq   s      r+   r   z3Http2Transport._get_header_value.<locals>.<genexpr>  sb         Szz'**0022f<< JJw''<<<< r*   )nextr   r   s     `r+   r   z Http2Transport._get_header_value  sC       $,$4  
   r*   c                     | j                             || j                            |          ||d| j        | j        | j        | j        di          }|S )NrN   )poolconnectr  read)r   r   
extensions)r   rg  r   rh  r3  )r>   r  r   r   r   r   s         r+   r   zHttp2Transport._request  si     z))
&&}55 $#'<!% $	    *  H Or*   c                    | j         d uo| j         j        dk    dd}| j        d         | j        d         ng }d |D             }t          D ])}|d         |d         f|vr|                    |           *||d<   t          j                    }|                    | j        d         pPt          j	        
                    d	          p1t          j	        
                    d
          pt          j                               | j        d         pt          j	        
                    d          }| j        d         pt          j	        
                    d          }||                    ||           ||d<   |S )NrX  r*  )http2retriesr>  c                 .    h | ]}|d          |d         fS rA  r)   rB  s     r+   rD  z3Http2Transport._get_pool_options.<locals>.<setcomp>  rE  r*   r   r-   rF  rG  rH  rI  rJ  rK  rL  ssl_context)r=   r_  r<   rN  r   sslcreate_default_contextload_verify_locationsrO  rP  r   rQ  rR  load_cert_chain)r>   r<   r>  rS  rT  r~  rI  rK  s           r+   r  z Http2Transport._get_pool_options  s    4 6O*g5 G < 01= -..  BA.AAAL"; : :"1%~a'89MM")).999(6G$%466K--Z( #:>>/22#:>>"677# =??	   [1WRZ^^DV5W5WI|J/T2:>>BS3T3TH$++Ix@@@%0GM"Nr*   c                    | j         t          d          d }|                     | j                   }| j        d         }| j         j        dk    r,|dk    r&|p#| o t                                          d          }| j        d         }|s,|dk    r&|p#| o t                                          d          }|                                 }|r| j        d         }|r||d<   |                    d          rh	 d	|v r+|	                    d	          }|rt          j        d
           t          j        dd|i|S # t          $ r t          j        d|           Y nw xY wt          j        dd|i|S t          j        di |S )NrV  rW  rX  rY  rZ  r[  r\  r]  r>  zqYou have defined socket_options but using a SOCKS proxy which doesn't support these. We'll ignore socket_options.	proxy_urlzoYou have configured a SOCKS proxy (%s) but support for SOCKS proxies is not installed. Disabling proxy support.r)   )r=   rp   r  r<   r_  r	   r   r  r`  popr   r   httpcore
SOCKSProxyRuntimeError	HTTPProxyConnectionPool)r>   rc  r  rW  rZ  rd  r\  r>  s           r+   r   zHttp2Transport._make_pool  s   & !WXXXE((99H ,}5K%00kR6G6G#SH(R9I9I'9R9R l3J RjB.."Q8|'P
8H8H8P8P))++D G $_ =  :,9D)##G,, G+t33-1XX6F-G-GN- " & %X!" !" !"  (2KKUKdKKK'    N!     $-FFFFFF*22T222s   7AD9 9EEN)r`   ra   rb   rc   r3  r   r   r  r  r  r  ri  r   r   r  r   r)   r*   r+   rk  rk    s         44 	#X%79PP   		 		 			 	 	0#	 #	 #	J)	3 )	3 )	3 )	3 )	3r*   rk  c                        e Zd Z fdZ xZS )rk  c                 r    t                                          |           t          j        d           d S )NzhYou tried to use HTTP2Transport but don't have httpcore[http2] installed. Falling back to HTTPTransport.)superr?   r   r   )r>   r<   	__class__s     r+   r?   zHttp2Transport.__init__  s<    GGW%%%Nz    r*   )r`   ra   rb   r?   __classcell__)r  s   @r+   rk  rk    s8        	 	 	 	 	 	 	 	 	r*   c                   .    e Zd ZdZd Zd ZdeddfdZdS )_FunctionTransportz
    DEPRECATED: Users wishing to provide a custom transport should subclass
    the Transport class, rather than providing a function.
    c                 H    t                               |            || _        d S r^   )r9   r?   _func)r>   funcs     r+   r?   z_FunctionTransport.__init__O  s#    
 	4   


r*   c                 0    |                      |           d S r^   )r  )r>   rH   s     r+   rJ   z _FunctionTransport.capture_eventW  s    
 	

5tr*   rI   returnNc                 `    |                                 }||                     |           d S d S r^   )	get_eventrJ   )r>   rI   rH   s      r+   rG   z#_FunctionTransport.capture_envelope_  s=     ""$$u%%%%% r*   )r`   ra   rb   rc   r?   rJ   r   rG   r)   r*   r+   r  r  I  s^         
    & &d & & & & & &r*   r  c                    | d         }|                      di                                dd          }|rt          nt          }t          |t                    r|S t          |t
                    rt          |t                    r|}n:t          |          r+t          j	        dt          d           t          |          S | d         r ||           S d S )	N	transportr   transport_http2FzFunction transports are deprecated and will be removed in a future release.Please provide a Transport instance or subclass, instead.r7   rA   r;   )r   rk  r/  
isinstancer9   r   
issubclasscallablerC   rD   rE   r  )r<   ref_transportuse_http2_transporttransport_clss       r+   make_transportr  h  s    K(M!++nb99==>OQVWW ':LNN}M-++ 1	M4	(	( 	1Zy-Q-Q 	1%	-	 	  1H		
 	
 	
 	
 "-000 u~ &}W%%%4r*   r^   )Fabcr   r   r	  rO  r   r(   r  r   rC   r   r   r   collectionsr   urllib.requestr	   r   rb  r   rQ  r   r   r
   sentry_sdk.utilsr   r   r   sentry_sdk.workerr   sentry_sdk.enveloper   r   r   typingr   r   r   r   r   r   r   r   r   r   r   r   r   r   urllib3.poolmanagerr    r!   sentry_sdk._typesr"   r#   rN  
SOL_SOCKETSOL_TCPoptionr   AttributeErrorr9   rx   rz   r/  r  h2rk  r  r  r)   r*   r+   <module>r     s   # # # # # # # # 				 				   



   2 2 2 2 2 2 2 2 2 2 # # # # # # % % % % % %MMMM   FFF       * * * * * * E E E E E E E E E E . . . . . . : : : : : : : : : : 2 2 2 2 2 2 2 2 2 2 2 2 ;""""""//////000000:::::::: ??C^<<bA^==rB^;;Q?	  F!((&)YVAY[[&))LMMMM    	b b b b b b b bJ   "Y Y Y Y Y	 Y Y Yxj
 j
 j
 j
 j
% j
 j
 j
ZJ3OOOIII{3 {3 {3 {3 {3* {3 {3 {3 {3             T& & & & & & & &>    s5   A A
A2D::EE4F F! F!