python-etcd
python-etcd copied to clipboard
Inject pyopenssl into urllib3 only when necessary
The code is copied from latest requests https://github.com/psf/requests/blob/a3ce6f007597f14029e6b6f54676c34196aa050e/src/requests/init.py#L124
- Follow upstream https://github.com/psf/requests/pull/5443 and https://github.com/psf/requests/issues/5267
- New PyOpenSSL bundles the OpenSSL 3, which may cause performance degradation https://github.com/python/cpython/issues/95031, especially in old Python that uses OpenSSL 1.1-, because urllib3 prefer PyOpenSSL after injecting.
@lavagetto Would you mind taking a look at this PR when you have a moment? Thank you!