Skip to content
Myr

poolmanager in sessions

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parent 28a9534 · Browse files · 1 file+8 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+8 added−1 removed

  • other:+8 added−1 removed

1 file+8 added−1 removed

modified:requests/sessions.py+8 added-1 removed
13 unmodified lines
14from .defaults import defaults15from .models import Request16from .hooks import dispatch_hook17from .utils import add_dict_to_cookiejar, cookiejar_from_dict, header_expand18from .packages.urllib3.poolmanager import PoolManager192021def merge_kwargs(local_kwarg, default_kwarg):22 """Merges kwarg dictionaries.
53 unmodified lines
7677 for (k, v) in defaults.items():78 self.config.setdefault(k, v)7980 self.poolmanager = PoolManager(81 num_pools=self.config.get('pool_connections'),82 maxsize=self.config.get('pool_maxsize')83 )8485 # Set up a CookieJar to be used by default86 self.cookies = cookielib.FileCookieJar()8788 def __repr__(self):
64 unmodified lines
153 hooks=hooks,154 timeout=timeout,155 allow_redirects=allow_redirects,156 proxies=proxies,151 config=config157 config=config,158 _poolmanager=self.poolmanager159 )160161 for attr in self.__attrs__:162 session_val = getattr(self, attr, None)
90 unmodified lines