pass on cert, verify, timeout, trust_env to Client#528
pass on cert, verify, timeout, trust_env to Client#528AtomsForPeace wants to merge 3 commits intoencode:masterfrom
Conversation
|
Hmmm, I see that mypy is failing. Would it possibly be better to have the defaults for timeout and trust_env the same in request as they are in Client? Client has trust_env: bool = True but request has trust_env: bool = None. That would solve the type issue. |
Right - this PR should also change the signatures in Eg. we want |
|
Oh right, I'd skimmed this. Yes your observation here is spot on...
😃 Absolutely, yes. Go for it! |
|
Ready to merge? |
| verify=verify, | ||
| timeout=timeout, | ||
| trust_env=trust_env, | ||
| ) as client: |
There was a problem hiding this comment.
Great. Need to drop these four arguments from client.request, too.
|
Thanks for having put in the work here. Incorperated into #544 |
Think this is what's needed for #505
I'd love to add a test for it but couldn't think of any sensible way of doing. Tried messing around with mocking the Client object and seeing the attributes that were set in the request function call but didn't pan out as hoped.
Any suggestions for tests?
I'd be happy to add one.
Let me know if I should remove timeout, cert, verify and leave only trust_env.