Skip to content
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

Newest botocore (1.4.73) support. Fixing #55, #53 and #52. #74

Merged
merged 3 commits into from
Nov 16, 2016

Conversation

vas3k
Copy link
Collaborator

@vas3k vas3k commented Nov 16, 2016

When I tried to use aiobotocore for sending SMS through SNS I've got an error:

ParamValidationErrorbotocore.validate in serialize_to_request
errorParameter validation failed: Unknown parameter in input: "PhoneNumber", must be one of: TopicArn, TargetArn, Message, Subject, MessageStructure, MessageAttributes

That's because botocore dependency version was pinned to >=1.4.0 <=1.4.28 because of issues #55, #53 and #52. But support for a PhoneNumber parameter in sns.publish() was added later. But I really needed the aiobotocore library because I'm using Multipart Upload to S3 from aiohttp web server.

So I spent an evening to compare the newest botocore==1.4.73 source code with current aiobotocore modules and have fixed some incompatibilities.

Now I have perfectly working aibotocore in my project. I'm using aiohttp==1.1.1, botocore==1.4.73 and Python 3.5.2 (with flawless async/await) to upload multipart files to S3 and SNS features (push notifications, SMS). Everything works great.

I've run included tests and got 18 out of 20 passed. As you see below, 2 failed tests are related to DynamoDB and hardcoded ARN's, so I can't test them. This is related to #65 I think. But all Travis tests are passed successfully :)

botocore.exceptions.ClientError: An error occurred (AccessDeniedException) when calling the DeleteTable operation: User: arn:aws:iam::9999999999:user/vas3k is not authorized to perform: dynamodb:DeleteTable on resource: arn:aws:dynamodb:us-east-1:641171361437:table/aiobotocoretest_1479318016

===== 18 passed, 1 skipped, 1 xfailed, 2 error in 67.98 seconds ======

I hope my pull request will be helpful and I've not missed any important places in code.

@adamrothman
Copy link
Contributor

@vas3k You are a hero.

@jettify
Copy link
Member

jettify commented Nov 16, 2016

Wow! Thank you very much! Botocore folks published new version 23 hours ago, it is very hard to keep pace with them :) I will review code and rerun tests. Unfortunately tests on travis are just flake8.

@vas3k
Copy link
Collaborator Author

vas3k commented Nov 16, 2016

@jettify thank you! Yes, botocore is hard. I've done this first on the latest version on my computer (it was 1.4.58) and when I've updated to 1.4.73 everything was broken again :) Keep me in touch if any the tests will fail. During the review please pay attention to this place, maybe here can be a tiny blocking behaviour. Or not, I'm really don't know.

@jettify
Copy link
Member

jettify commented Nov 16, 2016

@vas3k rerun tests successfully, code looks good!

@jettify jettify merged commit 5133b24 into aio-libs:master Nov 16, 2016
@jettify
Copy link
Member

jettify commented Nov 16, 2016

I want to clean up couple of warnings in tests and then create new release. Please ping me if I get distracted.

@jettify
Copy link
Member

jettify commented Nov 19, 2016

new version released to pypi https://pypi.python.org/pypi/aiobotocore/0.0.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants