Needs to handle anything that requests currently deals with when trust_env=True is set.
.netrc, REQUEST_CA_BUNDLE and anything else relevant.
First step to dealing with this would be to outline exactly what set of stuff requests includes. If anyone wants to dig into this and comment on this issue comprehensively with what set of behavior we need, then that'd be a great start.
We have adapters/environment.py currently stubbed out to deal with adding in this behavior.
If this is still important, I'd be interested in doing some research here to determine what exactly requests includes, and then possibly implementing proper functionality.
This is definitely important! If you can lend a hand with discovery that'd be great.
Hi, I tried to include netrc support. #177 what do you think about this approach?
We still need a way to grab environment variables and to document those environment variables for this issue to be closed.
I did some research in the Requests docs looking for environment variables it supports, and whether we support them already:
NETRCREQUEST_CA_BUNDLE or CURL_CA_BUNDLE (see here and here).HTTP_PROXY, HTTPS_PROXY (see here), ALL_PROXY, NO_PROXY.(Note that the names of the *_PROXY environment variables seems be a convention.)
To make extra sure we don't miss anything, it would probably be worth cloning the Requests repo and grepping our way using environment variable, os.getenv and os.environ.get.
The scope of this issue is rather broad, so if that's confirmed and as suggested by @sethmlarson in https://github.com/encode/httpx/pull/277#issuecomment-525036637, how about creating issues for each set of environment variables?
Should also support SSL_CERT_FILE as that's merged in Requests 3.0 branch and was intended to be supported and is an OpenSSL thing. See PEP 476.
After inspecting the Requests code base, I updated the list with CURL_CA_BUNDLE — I couldn't find any other use of environment variables in there.
Having recently spent a lot of time in wireshark, I'd quite like SSLKEYLOGFILE too (unless Python's ssl provides this free of charge?)
Having recently spent a lot of time in wireshark, I'd quite like
SSLKEYLOGFILEtoo (unless Python'ssslprovides this free of charge?)
Seems it will be landing in Python 3.8. Meanwhile, sslkeylog?
Most helpful comment
I did some research in the Requests docs looking for environment variables it supports, and whether we support them already:
NETRCREQUEST_CA_BUNDLEorCURL_CA_BUNDLE(see here and here).HTTP_PROXY,HTTPS_PROXY(see here),ALL_PROXY,NO_PROXY.(Note that the names of the
*_PROXYenvironment variables seems be a convention.)To make extra sure we don't miss anything, it would probably be worth cloning the Requests repo and grepping our way using
environment variable,os.getenvandos.environ.get.The scope of this issue is rather broad, so if that's confirmed and as suggested by @sethmlarson in https://github.com/encode/httpx/pull/277#issuecomment-525036637, how about creating issues for each set of environment variables?