-
Notifications
You must be signed in to change notification settings - Fork 325
Add ca_certs argument for oauth and dropbox client #385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ca_certs argument for oauth and dropbox client #385
Conversation
Thanks for putting this together! I'll ask the team to review this, though I can't promise when that would be. |
Hey @greg-db , thanks for reply. May be you have any updates? |
@stanislau-arkhipenka This is still open with the team, but I don't have an update on it. |
Codecov Report
@@ Coverage Diff @@
## main #385 +/- ##
==========================================
- Coverage 64.25% 63.67% -0.58%
==========================================
Files 30 30
Lines 51974 51982 +8
Branches 5780 5781 +1
==========================================
- Hits 33394 33098 -296
- Misses 18420 18849 +429
+ Partials 160 35 -125
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Hello @stanislau-arkhipenka, I took at look at the PR and code wise, it looks good to me. I want to get a better understanding for your use case before we make the decision to merge this. Could you help me understand why this is needed? |
dropbox/session.py
Outdated
def __init__(self, *args, **kwargs): | ||
self._ca_certs = kwargs.pop("ca_certs", None) or _TRUSTED_CERT_FILE | ||
if not self._ca_certs: | ||
raise FileNotFoundError("CA certificate not found") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This error is a bit misleading - it's not checking for the presence of a readable file (although maybe it should be?) - it's simply checking to see if ca_certs
or _TRUSTED_CERT_FILE
is set.
Hello @rogebrd ,
|
Stanislau Arkhipenka seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Signed it |
Hey guys, any updates? I've signed CLA. Do you need anything else on my side? |
Thanks for checking in. This is open with the team, but I don't have an update or timeline on it right now. |
Everything looks good to me but it looks like there are some integration tests that are failing before it can get merged in. |
New error better represents actual problem (CA not set) And also compatible with python2.7
Hey @Brent1LT , thanks for reply! |
Yep, |
Those are because only Dropboxers can run those tests with those sensitive variables. Hence why they aren't required. Moving forward with merging - thanks for doing this! |
I've added a minor follow-up for this PR in #440 to prevent pickle from breaking. |
This change adds ca_certs str argument for oauth and dropbox client classes. It may be used with applications that packed into executable archives (like python par or py2exe). It also may be useful with some security related scenarios.
Checklist
General Contributing
Is This a Code Change?
Validation
tox
pass?