
httpx.create_ssl_context() is one such utility function python -m pip install httpx python
import httpx
ctx = httpx.create_ssl_context()
Ironically the context returned doesn't support ctx.minimum_version assignment due to another hangnail in the ssl.SSLContext API! This is fixed in the default branch however https://github.com/encode/httpx/pull/1714#event-4947041362 On Mon, 28 Jun 2021, 18:32 Jonathan Fine, <jfine2358@gmail.com> wrote:
Thomas Grainger wrote:
It looks like there's a consensus being reached, should I create a bpo?
Perhaps first state what seems to be the consensus and invite further comments before going to bpo.
Disclaimer: I'd like to see both:
1. Something on PyPi to help persons who are using ssl on current Python. 2. Something in a future version of Python, that constrains attribute access.
We can do (1) first, and it will help inform (2).
-- Jonathan