toolbelt
toolbelt copied to clipboard
Remove import from deprecated urllib3.contrib.pyopenssl
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?