Skip to content
Myr

Fixing the call to init_poolmanagers to correctly unpickle the adapter.

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

authored by Randy Merrill · committed by Randy Merrill · parent 0536136 · Browse files · 1 file+2 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+2 added−1 removed

  • other:+2 added−1 removed

1 file+2 added−1 removed

modified:requests/adapters.py+2 added-1 removed
85 unmodified lines
86 def __setstate__(self, state):87 for attr, value in state.items():88 setattr(self, attr, value)8990 self.init_poolmanager(self._pool_connections, self._pool_maxsize)90 self.init_poolmanager(self._pool_connections, self._pool_maxsize,91 block=self._pool_block)9293 def init_poolmanager(self, connections, maxsize, block=DEFAULT_POOLBLOCK):94 """Initializes a urllib3 PoolManager. This method should not be called95 from user code, and is only exposed for use when subclassing the
246 unmodified lines