requests
requests copied to clipboard
Reuse ssl.SSLContext across all SSL connections within a requests.Sesssion
requests should pass ssl_context to urllib3.PoolManager: https://github.com/requests/requests/blob/2a4dd64fb4c072c646277c9d057737b05351b86f/requests/adapters.py#L161-L162
Otherwise a new SSLContext is allocated for all requests. SSLContexsts can be huge, like 1MB, so doing this will be a performance and memory usage win.
It looks like Requests doesn't define ssl_context anywhere. Where should it be created?
How is the status of this issue?
Hello, me and my group mates are going to be working on this issue.
@alex Could you tell me where you have an instance of ssl_context within the code? Thank you.