+
    Q?j(                        ^ RI Ht ^ RIt^ RIt^ RIt^ RIt^RIHtHt ^RI	H
t
 ^RIHt ]P                  '       d   ^ RIHt ^ RIHt ]P$                  ! R4      tR	.tR
 R lt ! R R]
4      t ! R R	]4      tR# )    )annotationsN)RequestResponse)SyncByteStream)BaseTransport)
OptExcInfo)WSGIApplication_TWSGITransportc                    V ^8  d   QhRRRR/# )   bodyztyping.Iterable[_T]return )formats   "ڀ/home/vela/workspace/domain/tn-silver/web/tn-site/.runtime/imagegen-venv/lib/python3.14/site-packages/httpx2/_transports/wsgi.py__annotate__r      s      %8 =P     c                r    \        V 4      p V  F%  pV'       g   K  \        P                  ! V.V 4      u # 	  . # N)iter	itertoolschain)r   chunks   & r   _skip_leading_empty_chunksr      s4    :D5??E7D11  Ir   c                  :    ] tR t^tR R ltR R ltR R ltRtR# )	WSGIByteStreamc                    V ^8  d   QhRRRR/# )r   resultztyping.Iterable[bytes]r   Noner   )r   s   "r   r   WSGIByteStream.__annotate__   s     : :5 :$ :r   c                	J    \        VR R4      V n        \        V4      V n        R# )closeN)getattr_closer   _result)selfr   s   &&r   __init__WSGIByteStream.__init__   s    fgt41&9r   c                   V ^8  d   QhRR/# )r   r   ztyping.Iterator[bytes]r   )r   s   "r   r   r!   #   s        0  r   c              #  	:   "   V P                    R j  xL
  R #  L5ir   )r&   r'   s   &r   __iter__WSGIByteStream.__iter__#   s     <<s   c                   V ^8  d   QhRR/# )r   r   r    r   )r   s   "r   r   r!   &   s      t r   c                	F    V P                   e   V P                  4        R # R # r   )r%   r,   s   &r   r#   WSGIByteStream.close&   s    ;;"KKM #r   )r%   r&   N)__name__
__module____qualname____firstlineno__r(   r-   r#   __static_attributes__r   r   r   r   r      s    :  r   r   c                  6    ] tR t^+tRtRR R lltR R ltRtR# )	r   a  
A custom transport that handles sending requests directly to an WSGI app.
The simplest way to use this functionality is to use the `app` argument.

```
client = httpx2.Client(app=app)
```

Alternatively, you can setup the transport instance explicitly.
This allows you to include any additional configuration arguments specific
to the WSGITransport class:

```
transport = httpx2.WSGITransport(
    app=app,
    script_name="/submount",
    remote_addr="1.2.3.4"
)
client = httpx2.Client(transport=transport)
```

Arguments:
    app: The WSGI application.
    raise_app_exceptions: Boolean indicating if exceptions in the application
        should be raised. Default to `True`. Can be set to `False` for use cases
        such as testing the content of a client 500 response.
    script_name: The root path on which the WSGI application should be mounted.
    remote_addr: A string indicating the client IP of incoming requests.
Nc               0    V ^8  d   QhRRRRRRRRRR	R
R/# )r   appr	   raise_app_exceptionsboolscript_namestrremote_addrwsgi_errorsztyping.TextIO | Noner   r    r   )r   s   "r   r   WSGITransport.__annotate__J   sF     ' '' #' 	'
 ' *' 
'r   c                	B    Wn         W n        W0n        W@n        WPn        R # r   )r9   r:   r<   r>   r?   )r'   r9   r:   r<   r>   r?   s   &&&&&&r   r(   WSGITransport.__init__J   s!     $8!&&&r   c                    V ^8  d   QhRRRR/# )r   requestr   r   r   r   )r   s   "r   r   r@   X   s     9E 9Eg 9E( 9Er   c                	  aaa VP                  4        \        P                  ! VP                  4      pVP                  P
                  ;'       g"    R ^PRR/VP                  P                  ,          pRRRVP                  P                  RTRV P                  ;'       g    \        P                  RRR	R
RR
RVP                  RV P                  RVP                  P                  RVP                  P                  P                  R4      RVP                  P                  R\!        V4      RRRV P"                  /pVP                  '       d3   RVP$                  9  d"   \!        \'        VP                  4      4      VR&   VP$                  P(                   FW  w  rVVP                  R4      P+                  4       P-                  RR4      pVR 9  d
   RV,           pVP                  R4      WG&   KY  	  RoRoRoR!R VVV3R lllpV P/                  WH4      p	\1        V	4      p
Sf   Q hSf   Q hS'       d+   S^ ,          '       d   V P2                  '       d
   S^,          h\5        SP7                  4       ^ ,          4      pS UUu. uF'  w  r|VP9                  R4      VP9                  R4      3NK)  	  ppp\;        WV
R7      # u uppi )"httphttpsi  zwsgi.versionzwsgi.url_schemez
wsgi.inputzwsgi.errorszwsgi.multithreadTzwsgi.multiprocessFzwsgi.run_onceREQUEST_METHODSCRIPT_NAME	PATH_INFOQUERY_STRINGasciiSERVER_NAMESERVER_PORTSERVER_PROTOCOLzHTTP/1.1REMOTE_ADDRzContent-LengthCONTENT_LENGTH-_HTTP_Nc               (    V ^8  d   QhRRRRRRRR/# )	r   statusr=   response_headerszlist[tuple[str, str]]exc_infozOptExcInfo | Noner   z$typing.Callable[[bytes], typing.Any]r   )r   s   "r   r   2WSGITransport.handle_request.<locals>.__annotate__z   s0     		" 		"		"3		" (		" 2			"r   c                   < V oVoVoR  # )c                    R # r   r   )rS   s   &r   <lambda>FWSGITransport.handle_request.<locals>.start_response.<locals>.<lambda>   s    Tr   r   )rV   rW   rX   seen_exc_infoseen_response_headersseen_statuss   &&&r   start_response4WSGITransport.handle_request.<locals>.start_responsez   s     !K$4!$M!!r   )headersstream)   r   )CONTENT_TYPErQ   r   )readioBytesIOcontenturlportschemer?   sysstderrmethodr<   pathquerydecodehostr=   r>   rc   lenrawupperreplacer9   r   r:   intsplitencoder   )r'   rD   
wsgi_inputrl   environ
header_keyheader_valuekeyra   r   rd   status_codevaluerc   r^   r_   r`   s   &&            @@@r   handle_requestWSGITransport.handle_requestX   sT   ZZ0
{{QQFB#=gkk>P>P#QFw{{11*4++99szzUgnn4++))GKK--44W=7;;++3t9z4++
" ???/wF(+C,@(AG$%(/(;(;$J##G,224<<S#FC<<m'..w7GL	 )<  $		" 		" '2'&&&$000]1--$2K2K2K""+++-a01RghRgJCCJJw'g)>?RghVDD is   -J?)r9   r:   r>   r<   r?   )T z	127.0.0.1N)r2   r3   r4   r5   __doc__r(   r   r6   r   r   r   r   r   +   s    <'9E 9Er   )
__future__r   rh   r   rn   typing_modelsr   r   _typesr   baser   TYPE_CHECKING	_typeshedr   _typeshed.wsgir	   TypeVarr
   __all__r   r   r   r   r   r   <module>r      sh    " 	  
  ' # 	$.^^D 

^ 
fEM fEr   