-
Notifications
You must be signed in to change notification settings - Fork 116
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
Can't upgrade to Braintree 4.18.1 / Python 3.10.9 (DeprecationWarning: Use ProtectionLevel enum instead) #148
Comments
👋 thanks for reaching out! In v 4.18.0 we deprecated ChargebackProtectionLevel. You've got two options in my opinion:
Hope this helps! |
I don't think you understood my report. We are not using If you look at the full stack trace and compare your code, this is why: the class is still there. https://github.com/braintree/braintree_python/blob/master/braintree/dispute.py#L72 |
Hey @tammyalexandra thanks for the clarification. Going to re-open this issue and take a deeper look. |
@tammyalexandra I've tried replicating this issue spinning up a Docker image that's got python 3.10 and then running a test file that imports the braintree library, and I'm not able to reproduce this error. Are you running tests in development mode? How are you setting the PYTHONWARNINGS variable? |
I could reproduce it by simply running |
for internal tracking, issue 7868 |
Is there any update on this draft PR? We're experiencing the same issue when attempting to update braintree |
That draft PR had some breaking changes that made it an unfeasible solution unfortunately. I would like to circle back to what @hollabaq86 asked before though. The only way I could replicate the errors from the original description on this issue was to run tests or import braintree with How are you all setting the |
We are using this library in our tests with |
pytest allows you to filter and suppress warnings, since this isn't causing failures I'm going to go ahead and close this issue. |
I think it should be reopen because deprecation warning should not be raised on import of the module but only when accessing the deprecated ChargebackProtectionLevel. #155 fix that. |
Braintree 4.18.1 (trying to upgrade from 4.17.1)
Python 3.10.9 (recently upgraded; works with 4.17.1)
Running locally on Mac OS X 13.1
The upgrade is causing automated tests with
import braintree
to fail with the following:Thanks for your help in resolving this!
The text was updated successfully, but these errors were encountered: