def __init__(self, **kwargs): ''' Constructor. It delegates construction to the base class HttxBase, except for the proxy that will be set specifically Setting the proxy ensures the initialization of the storage of netlocations and the cache of active netlocations @param kwargs: keywords arguments @see: L{HttxOptions} ''' HttxBase.__init__(self, **kwargs) self.setproxy(kwargs.get('proxy', None))
def __init__(self, url=None, **kwargs): ''' Constructor. It delegates construction to the base class L{HttxBase} and initializes the member variables with the help of the L{createconnection} method @param kwargs: keywords arguments passed to L{HttxBase} @see: L{HttxOptions} ''' HttxBase.__init__(self, **kwargs) self.redircount = kwargs.get('redircount', 0) self.lastreq = None self.auxhttx = None self.createconnection(url)
def __init__(self, url = None, **kwargs): ''' Constructor. It delegates construction to the base class L{HttxBase} and initializes the member variables with the help of the L{createconnection} method @param kwargs: keywords arguments passed to L{HttxBase} @see: L{HttxOptions} ''' HttxBase.__init__(self, **kwargs) self.redircount = kwargs.get('redircount', 0) self.lastreq = None self.auxhttx = None self.createconnection(url)
def __init__(self, url, **kwargs): ''' Constructor. It delegates construction to the base class L{HttxBase} and initializes the member variables @param url: url to open a connection to @type url: str @param kwargs: keywords arguments passed to L{HttxBase} @see: L{HttxOptions} ''' HttxBase.__init__(self, **kwargs) self.url = url # For connections currently with no pending network activity self.httxconnque = deque() # For connections with pending network activity self.httxconncache = dict() # Temporary cache after creation and before usage self.inopcache = set()
def __init__(self, **kwargs): ''' Constructor. It delegates construction to the base class HttxBase, except for the proxy that will be set specifically Setting the proxy ensures the initialization of the storage of netlocations and the cache of active netlocations @param kwargs: keywords arguments @see: L{HttxOptions} ''' HttxBase.__init__(self, **kwargs) self.netlocations = dict() self.locationcache = dict() if httxoptions.proxydefaults: self.setproxydefaults() # The user may have enforced a private proxy for a particular protocol # not necessarily overriding all system proxies (or yes) if 'proxy' in kwargs: self.setproxy(kwargs['proxy'])