Skip to content
Myr

Merge pull request #1244 from jajadinimueter/master

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

Fixed further pickeling issues in Session and HTTPAdapter

authored by Kenneth Reitz · committed by Kenneth Reitz · parents 25ea8cd, c41932e · Browse files · 2 files+6 added−4 removed
This commit

State

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

Diff stats

2 files+6 added−4 removed

  • other:+6 added−4 removed

2 files+6 added−4 removed

modified:requests/adapters.py+4 added-3 removed
50 unmodified lines
51 self.config = {}5253 super(HTTPAdapter, self).__init__()5455 self._pool_connections = pool_connections56 self._pool_maxsize = pool_maxsize5758 self.init_poolmanager(pool_connections, pool_maxsize)5960 def __getstate__(self):61 return dict((attr, getattr(self, attr, None)) for attr in
2 unmodified lines
64 def __setstate__(self, state):65 for attr, value in state.items():66 setattr(self, attr, value)6765 # setup a new poolmanager after unpickling66 if self._pool_connections is not None:67 self.init_poolmanager(self._pool_connections, self._pool_maxsize)68 self.init_poolmanager(self._pool_connections, self._pool_maxsize)6970 def init_poolmanager(self, connections, maxsize):71 # save these values for pickling72 self._pool_connections = connections
189 unmodified lines
modified:requests/sessions.py+2 added-1 removed
176 unmodified lines
177 """178179 __attrs__ = [180 'headers', 'cookies', 'auth', 'timeout', 'proxies', 'hooks',181 'params', 'verify', 'cert', 'prefetch', 'adapters']181 'params', 'verify', 'cert', 'prefetch', 'adapters', 'stream',182 'trust_env']183184 def __init__(self):185186 #: A case-insensitive dictionary of headers to be sent on each
287 unmodified lines