toolbelt icon indicating copy to clipboard operation
toolbelt copied to clipboard

Remove import from deprecated urllib3.contrib.pyopenssl

Open intgr opened this issue 3 years ago • 0 comments

urllib3 is in the process of deprecating urllib3.contrib.pyopenssl, see https://github.com/urllib3/urllib3/issues/2680

requests-toolbelt currently attempts to import from urllib3.contrib.pyopenssl import PyOpenSSLContext. Apparently this is used by X509Adapter.

What's the path forward here? Can X509Adapter be ported to newer APIs that are supported?

Otherwise it would be preferred if DeprecationWarning was only shown for code that actually uses X509Adapter, maybe make the import lazy and put it in a function?

intgr avatar Aug 23 '22 07:08 intgr