jplana / python-etcd

A python client for etcd
Other
522 stars 210 forks source link

Inject pyopenssl into urllib3 only when necessary #292

Open zkonge opened 2 months ago

zkonge commented 2 months ago

The code is copied from latest requests https://github.com/psf/requests/blob/a3ce6f007597f14029e6b6f54676c34196aa050e/src/requests/__init__.py#L124

  1. Follow upstream https://github.com/psf/requests/pull/5443 and https://github.com/psf/requests/issues/5267
  2. 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.
loveyana commented 2 months ago

@lavagetto Would you mind taking a look at this PR when you have a moment? Thank you!