kennethreitz/requests — pull request #1827 by pepijndevos (2013-12-24 10:25:28+00:00)
Title: Use adapter pool size for proxies

I was doing hundreds of parallel requests, and kept seeing warnings about dropped connections because the connection pool was full.

So I increased the connection pool on the adapter, and increased it some more. And then even more. It did not help.

Then I noticed that only my proxy connections where dropped.
Some investigation revealed that proxy connections use their own pool subclass.
However, this pool is created without respecting the pool size setting.

This PR simply propagates the pool kwargs to the proxy pool.
I contemplated adding additional kwargs for the proxy pool size, but this seems uneccecery complexity.

If there is a use case for using one Session for proxied and direct requests, and the proxies needs a different pool size than the direct connections, I could add that.