MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 13.59.226.183
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/appengine.pyc
�
r2Wc@@sbddlmZddlZddlZddlZddlmZmZmZm	Z	m
Z
mZddlm
Z
ddlmZddlmZddlmZdd	lmZydd
lmZWnek
r�dZnXeje�Zdefd��YZd
efd��YZdefd��YZd�Z d�Z!d�Z"d�Z#d�Z$dS(i(tabsolute_importNi(t	HTTPErrortHTTPWarningt
MaxRetryErrort
ProtocolErrortTimeoutErrortSSLError(tBytesIO(tRequestMethods(tHTTPResponse(tTimeout(tRetry(turlfetchtAppEnginePlatformWarningcB@seZRS((t__name__t
__module__(((s[/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/appengine.pyR
stAppEnginePlatformErrorcB@seZRS((RR(((s[/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/appengine.pyR"stAppEngineManagercB@sheZdZdded�Zd�Zd�Zdddeej	d�Z
d�Zd�Zd�Z
RS(	s
    Connection manager for Google App Engine sandbox applications.

    This manager uses the URLFetch service directly instead of using the
    emulated httplib, and is subject to URLFetch limitations as described in
    the App Engine documentation here:

        https://cloud.google.com/appengine/docs/python/urlfetch

    Notably it will raise an AppEnginePlatformError if:
        * URLFetch is not available.
        * If you attempt to use this on GAEv2 (Managed VMs), as full socket
          support is available.
        * If a request size is more than 10 megabytes.
        * If a response size is more than 32 megabtyes.
        * If you use an unsupported request method such as OPTIONS.

    Beyond those cases, it will raise normal urllib3 errors.
    cC@sltstd��nt�r-td��ntjdt�tj||�||_|pbt	j
|_dS(Ns.URLFetch is not available in this environment.s�Use normal urllib3.PoolManager instead of AppEngineManageron Managed VMs, as using URLFetch is not necessary in this environment.s�urllib3 is using URLFetch on Google App Engine sandbox instead of sockets. To use sockets directly instead of URLFetch see https://urllib3.readthedocs.org/en/latest/contrib.html.(RRtis_prod_appengine_mvmstwarningstwarnR
Rt__init__tvalidate_certificateRtDEFAULTtretries(tselftheadersRR((s[/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/appengine.pyR;s		cC@s|S(N((R((s[/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/appengine.pyt	__enter__QscC@stS(N(tFalse(Rtexc_typetexc_valtexc_tb((s[/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/appengine.pyt__exit__TscK@se|j||�}ygtj|d|d|d|p6idtd|oZ|jdkoZ|jd|j|�d|j�}	Wn"tjk
r�}
t	||
��n�tj
k
r�}
d	t|
�kr�td
|
��nt
|
��n�tjk
r0}
dt|
�kr!t||d|
��nt
|
��nntjk
rT}
td
|
��nJtjk
ru}
t|
��n)tjk
r�}
td||
��nX|j|	|�}|j�r�|jr�|r�t||d��n|j|d|j�ra|j||d|d|�}tjd|�|j�|j||d|d|d|d|d||�S|S(NtpayloadtmethodRtallow_truncatedtfollow_redirectsitdeadlineRs	too largesOURLFetch request too large, URLFetch only supports requests up to 10mb in size.sToo many redirectstreasonsPURLFetch response too large, URLFetch only supportsresponses up to 32mb in size.s$URLFetch does not support method: %sstoo many redirectststatus_codetresponset_poolsForced retry: %stbodyRtredirectttimeout(t_get_retriesRtfetchRR+ttotalt_get_absolute_timeoutRtDeadlineExceededErrorRtInvalidURLErrortstrRRt
DownloadErrorRtResponseTooLargeErrortSSLCertificateErrorRtInvalidMethodErrort#_urlfetch_response_to_http_responsetget_redirect_locationtraise_on_redirecttis_forced_retrytstatust	incrementtlogtinfotsleepturlopen(RR"turlR*RRR+R,tresponse_kwR(tet
http_response((s[/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/appengine.pyRAXsd	
	
cK@s�t�r7|jjd�}|dkr7|jd=q7n|jjd�}|dkr�|jd�}|jd�dj|�|jd<ntdt|j�d|jd|j	|�S(	Nscontent-encodingtdeflatestransfer-encodingtchunkedt,R*RR<(
tis_prod_appengineRtgettsplittremovetjoinR	RtcontentR'(Rt
urlfetch_respRCtcontent_encodingttransfer_encodingt	encodings((s[/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/appengine.pyR8�s	
	cC@sR|tjkrdSt|t�rN|j|jk	rGtjdt�n|jS|S(NisPURLFetch does not support granular timeout settings, reverting to total timeout.(	R
tDEFAULT_TIMEOUTt
isinstancet_readt_connectRRR
R/(RR,((s[/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/appengine.pyR0�s
cC@sbt|t�s0tj|d|d|j�}n|jsK|jsK|jr^tjdt	�n|S(NR+tdefaultshURLFetch only supports total retries and does not recognize connect, read, or redirect retry parameters.(
RTRtfrom_intRtconnecttreadR+RRR
(RRR+((s[/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/appengine.pyR-�s
N(RRt__doc__tNonetTrueRRR R
RSRAR8R0R-(((s[/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/appengine.pyR&s		D		cC@st�pt�pt�S(N(tis_local_appengineRIR(((s[/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/appengine.pytis_appengine�s		cC@st�ot�S(N(R_R(((s[/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/appengine.pytis_appengine_sandbox�scC@s dtjkodtjdkS(NtAPPENGINE_RUNTIMEsDevelopment/tSERVER_SOFTWARE(tostenviron(((s[/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/appengine.pyR^�scC@s*dtjko)dtjdko)t�S(NRasGoogle App Engine/Rb(RcRdR(((s[/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/appengine.pyRI�scC@stjjdt�dkS(NtGAE_VMttrue(RcRdRJR(((s[/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/appengine.pyR�s(%t
__future__RtloggingRcRt
exceptionsRRRRRRtpackages.sixRtrequestRR(R	tutil.timeoutR
t
util.retryRtgoogle.appengine.apiRtImportErrorR\t	getLoggerRR>R
RRR_R`R^RIR(((s[/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/appengine.pyt<module>s,.	

�				

MMCT - 2023