-
Notifications
You must be signed in to change notification settings - Fork 145
Fix patching for PynamoDB 4.x with botocore 1.13 #181
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
Fix patching for PynamoDB 4.x with botocore 1.13 #181
Conversation
Ah, I happen to work on the same issue :) Maybe There are still test failures. The reason might be incompatibility between aiobotocore and botocore >= 1.13 aio-libs/aiobotocore#743. |
I thought about that as well, but assumed there was a reason it wasn't added during the PynamoDB 4 commit. Anyway it seems to make sense, so I added it now.
I focused on getting the PynamoDB patching to work again with |
Just curious, what about |
Hi @Dunedan, Thanks for submitting this PR. Looks like few tests have failed because aiobotocore version is still making dependency on botocore.vendored.requests package. This does not require any change in aws-xray-python-sdk. Hopefully upcoming version of aiobotocore removes this dependency. |
@polamayster I believe PynamoDB < 4.0 is simply not compatible with botocore >= 1.13, as the dependency on |
Now aiobotocore 0.11 is out with compatibility with new botocore, and aws-xray-sdk-python tests are green with that. |
Codecov Report
@@ Coverage Diff @@
## master #181 +/- ##
=========================================
- Coverage 83.44% 83.4% -0.05%
=========================================
Files 77 77
Lines 2905 2910 +5
=========================================
+ Hits 2424 2427 +3
- Misses 481 483 +2
Continue to review full report at Codecov.
|
Thank you very much for your contribution! This looks like a great fix :) |
Fixes #179
Patching PynamoDB broke when using
botocore
1.13, as this version ofbotocore
doesn't shiprequests
anymore. While the vendoredrequests
library is a requirement for PynamoDB <4.0, it's not for PynamoDB >=4.0. Therefore only import and patchbotocore.vendored.requests.sessions
when using PynamoDB <4.0.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.