Skip to content
Myr

Remove keep_alive cruft from urllib3 (for now)

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 9518d05 · Browse files · 1 file+2 added−8 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−8 removed

  • other:+2 added−8 removed

1 file+2 added−8 removed

modified:requests/async.py+2 added-8 removed
18 unmodified lines
19curious_george.patch_all(thread=False)2021from . import api22from .hooks import dispatch_hook23from .packages.urllib3.poolmanager import PoolManager232425__all__ = (26 'map',
36 unmodified lines
63delete = _patched(api.delete)64request = _patched(api.request)656668def map(requests, keep_alive=False):67def map(requests):68 """Concurrently converts a list of Requests to Responses.6970 :param requests: a collection of Request objects.71 :param keep_alive: If True, HTTP Keep-Alive will be used.72 """7375 if keep_alive:76 pools = PoolManager(num_pools=len(requests), maxsize=1)77 else:78 pools = None7980 jobs = [gevent.spawn(_send, r, pools=pools) for r in requests]74 jobs = [gevent.spawn(_send, r) for r in requests]75 gevent.joinall(jobs)7677 return [r.response for r in requests]78
3 unmodified lines