/usr/lib/python2.6/site-packages/urllib3
Edit: /usr/lib/python2.6/site-packages/urllib3/poolmanager.pyc (9881B)
Ñò
;vVc @ s9 d d k Z y d d k l Z Wn# e j
o d d k l Z n Xd d k l Z d d k l Z l Z d d k l
Z
d d k l Z l
Z
l Z d d k l Z d d k l Z d d
k l Z d d d
g Z h e d 6e d 6Z e i e ƒ Z d Z d e f d „ ƒ YZ d e f d „ ƒ YZ d „ Z d S( iÿÿÿÿN( t urljoini ( t RecentlyUsedContainer( t HTTPConnectionPoolt HTTPSConnectionPool( t port_by_scheme( t LocationValueErrort
MaxRetryErrort ProxySchemeUnknown( t RequestMethods( t parse_url( t Retryt PoolManagert ProxyManagert proxy_from_urlt httpt httpst key_filet cert_filet cert_reqst ca_certst ssl_versionc B sk e Z d Z d Z d d d „ Z d „ Z d „ Z d „ Z d „ Z d d d „ Z
d „ Z e d
„ Z
RS( s$
Allows for arbitrary requests while transparently keeping track of
necessary connection pools for you.
:param num_pools:
Number of connection pools to cache before discarding the least
recently used pool.
:param headers:
Headers to include with all requests, unless other headers are given
explicitly.
:param \**connection_pool_kw:
Additional parameters are used to create fresh
:class:`urllib3.connectionpool.ConnectionPool` instances.
Example::
>>> manager = PoolManager(num_pools=2)
>>> r = manager.request('GET', 'http://google.com/')
>>> r = manager.request('GET', 'http://google.com/mail')
>>> r = manager.request('GET', 'http://yahoo.com/')
>>> len(manager.pools)
2
i
c K s5 t i | | ƒ | | _ t | d d „ ƒ| _ d S( Nt dispose_funcc S s
| i ƒ S( ( t close( t p( ( s4 /tmp/pip-build-cD3xZi/urllib3/urllib3/poolmanager.pyt
A s ( R t __init__t connection_pool_kwR t pools( t selft num_poolst headersR ( ( s4 /tmp/pip-build-cD3xZi/urllib3/urllib3/poolmanager.pyR = s c C s | S( N( ( R ( ( s4 /tmp/pip-build-cD3xZi/urllib3/urllib3/poolmanager.pyt __enter__C s c C s | i ƒ t S( N( t cleart False( R t exc_typet exc_valt exc_tb( ( s4 /tmp/pip-build-cD3xZi/urllib3/urllib3/poolmanager.pyt __exit__F s
c C sd t | } | i } | d j o4 | i i ƒ } x" t D] } | i | d ƒ q6 Wn | | | | S( s
Create a new :class:`ConnectionPool` based on host, port and scheme.
This method is used to actually create the connection pools handed out
by :meth:`connection_from_url` and companion methods. It is intended
to be overridden for customization.
R N( t pool_classes_by_schemeR t copyt SSL_KEYWORDSt popt None( R t schemet hostt portt pool_clst kwargst kw( ( s4 /tmp/pip-build-cD3xZi/urllib3/urllib3/poolmanager.pyt _new_poolK s
c C s | i i ƒ d S( s´
Empty our store of pools and direct them all to close.
This will not affect in-flight connections, but they will not be
re-used after completion.
N( R R ( R ( ( s4 /tmp/pip-build-cD3xZi/urllib3/urllib3/poolmanager.pyR \ s R c C s® | p t d ƒ ‚ n | p d } | p t i | d ƒ } | | | f } | i i i i ƒ zD | i i | ƒ } | o | S| i | | | ƒ } | | i |