Skip to content
Myr

Fixed pickle support for requests.adapters.HTTPAdapter by adding

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

'proxy_manager' when unpickling.

authored by Erik Wickstrom · committed by Ian Cordasco · parent cac2077 · Browse files · 1 file+5 added−0 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+5 added−0 removed

  • other:+5 added−0 removed

1 file+5 added−0 removed

modified:requests/adapters.py+5 added
95 unmodified lines
9697 self.init_poolmanager(self._pool_connections, self._pool_maxsize,98 block=self._pool_block)99100 # Can't handle by adding 'proxy_manager' to self.__attrs__ because101 # because self.poolmanager uses a lambda function, which isn't pickleable.102 if not hasattr(self, 'proxy_manager'):103 self.proxy_manager = {}104105 def init_poolmanager(self, connections, maxsize, block=DEFAULT_POOLBLOCK):106 """Initializes a urllib3 PoolManager. This method should not be called107 from user code, and is only exposed for use when subclassing the108 :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.
290 unmodified lines