/usr/lib/python2.6/site-packages/urllib3/contrib
Edit: /usr/lib/python2.6/site-packages/urllib3/contrib/appengine.pyc (7783B)
Ñò
;vVc @ sT d d k Z d d k Z d d k Z d d k l Z l Z l Z l Z l Z l Z d d k
l Z d d k l
Z
d d k l Z d d k l Z d d k l Z y d d k l Z Wn e j
o
d Z n Xe i e ƒ Z d
e f d „ ƒ YZ d e f d
„ ƒ YZ d e
f d „ ƒ YZ d „ Z d „ Z d „ Z d „ Z! d „ Z" d S( iÿÿÿÿNi ( t HTTPErrort HTTPWarningt
MaxRetryErrort
ProtocolErrort TimeoutErrort SSLError( t BytesIO( t RequestMethods( t HTTPResponse( t Timeout( t Retry( t urlfetcht AppEnginePlatformWarningc B s e Z RS( ( t __name__t
__module__( ( ( s: /tmp/pip-build-cD3xZi/urllib3/urllib3/contrib/appengine.pyR s t AppEnginePlatformErrorc B s e Z RS( ( R
R ( ( ( s: /tmp/pip-build-cD3xZi/urllib3/urllib3/contrib/appengine.pyR ! s t AppEngineManagerc B sh e Z d Z d d e d „ Z d „ Z d „ Z d d d e e i d „ Z
d „ Z d „ 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.
c C sq t p t d ƒ ‚ n t ƒ o t d ƒ ‚ n t i d t ƒ t i | | ƒ | | _ | p t i
| _ d S( 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 R t is_prod_appengine_v2t warningst warnR R t __init__t validate_certificateR
t DEFAULTt retries( t selft headersR R ( ( s: /tmp/pip-build-cD3xZi/urllib3/urllib3/contrib/appengine.pyR : s
c C s | S( N( ( R ( ( s: /tmp/pip-build-cD3xZi/urllib3/urllib3/contrib/appengine.pyt __enter__P s c C s t S( N( t False( R t exc_typet exc_valt exc_tb( ( s: /tmp/pip-build-cD3xZi/urllib3/urllib3/contrib/appengine.pyt __exit__S s c K sy | i | | ƒ } yj t i | d | d | d | p h d t d | o | i d j o | i d | i | ƒ d | i ƒ} Wn,t i j
o }
t | |
ƒ ‚ nt i
j
o8 }
d |
i j o t d
|
ƒ ‚ n t
|
ƒ ‚ nÁ t i j
o> }
d |
i j o t | | d |
ƒ‚ n t
|
ƒ ‚ nu t i j
o }
t d
|
ƒ ‚ nO t i j
o }
t |
ƒ ‚ n, t i j
o }
t d | |
ƒ ‚ n X| i | | } | i ƒ o' | i o | o t | | d ƒ ‚ n | i | d | i ƒok | i | | d | d | ƒ} t i d | ƒ | i ƒ | i | | d | d | d | d | d | | S| S( Nt payloadt methodR t allow_truncatedt follow_redirectsi t deadlineR s too largesO URLFetch request too large, URLFetch only supports requests up to 10mb in size.s Too many redirectst reasonsP URLFetch response too large, URLFetch only supportsresponses up to 32mb in size.s$ URLFetch does not support method: %ss too many redirectst status_codet responset _pools Forced retry: %st bodyR t redirectt timeout( t _get_retriesR t fetchR R* t totalt _get_absolute_timeoutR t DeadlineExceededErrorR t InvalidURLErrort messageR R t
DownloadErrorR t ResponseTooLargeErrort SSLCertificateErrorR t InvalidMethodErrort# _urlfetch_response_to_http_responset get_redirect_locationt raise_on_redirectt is_forced_retryt statust incrementt logt infot sleept urlopen( R R! t urlR) R R R* R+ t response_kwR' t et
http_response( ( s: /tmp/pip-build-cD3xZi/urllib3/urllib3/contrib/appengine.pyR@ W sd
c K sf t ƒ o1 | i i d ƒ } | d j o | i d =q; n t d t | i ƒ d | i d | i | S( Ns content-encodingt deflateR) R R; ( t is_prod_appengine_v1R t getR R t contentR&