-
-
Notifications
You must be signed in to change notification settings - Fork 183
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
Bump botocore
dependency specification
#1221
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
3ddd8db
relax `botocore` dependency specification
jakob-keller 1f87027
bump `botocore` dependency specification
jakob-keller 38973fe
bump `botocore` dependency specification
jakob-keller a73f8c2
bump `botocore` dependency specification
jakob-keller File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '2.15.2' | ||
__version__ = '2.16.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,0 +1,39 @@ | ||
# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"). You | ||
# may not use this file except in compliance with the License. A copy of | ||
# the License is located at | ||
# | ||
# http://aws.amazon.com/apache2.0/ | ||
# | ||
# or in the "license" file accompanying this file. This file is | ||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF | ||
# ANY KIND, either express or implied. See the License for the specific | ||
# language governing permissions and limitations under the License. | ||
|
||
from botocore.compat import parse_qs, urlparse | ||
|
||
|
||
def _urlparse(url): | ||
if isinstance(url, bytes): | ||
# Not really necessary, but it helps to reduce noise on Python 2.x | ||
url = url.decode('utf8') | ||
return urlparse(url) | ||
|
||
|
||
def assert_url_equal(url1, url2): | ||
parts1 = _urlparse(url1) | ||
parts2 = _urlparse(url2) | ||
|
||
# Because the query string ordering isn't relevant, we have to parse | ||
# every single part manually and then handle the query string. | ||
assert parts1.scheme == parts2.scheme | ||
assert parts1.netloc == parts2.netloc | ||
assert parts1.path == parts2.path | ||
assert parts1.params == parts2.params | ||
assert parts1.fragment == parts2.fragment | ||
assert parts1.username == parts2.username | ||
assert parts1.password == parts2.password | ||
assert parts1.hostname == parts2.hostname | ||
assert parts1.port == parts2.port | ||
assert parse_qs(parts1.query) == parse_qs(parts2.query) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"). You | ||
# may not use this file except in compliance with the License. A copy of | ||
# the License is located at | ||
# | ||
# http://aws.amazon.com/apache2.0/ | ||
# | ||
# or in the "license" file accompanying this file. This file is | ||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF | ||
# ANY KIND, either express or implied. See the License for the specific | ||
# language governing permissions and limitations under the License. | ||
|
||
from unittest import mock | ||
|
||
from aiobotocore import handlers | ||
|
||
|
||
class TestHandlers: | ||
async def test_500_status_code_set_for_200_response(self): | ||
http_response = mock.Mock() | ||
http_response.status_code = 200 | ||
|
||
async def content(): | ||
return """ | ||
<Error> | ||
<Code>AccessDenied</Code> | ||
<Message>Access Denied</Message> | ||
<RequestId>id</RequestId> | ||
<HostId>hostid</HostId> | ||
</Error> | ||
""" | ||
|
||
http_response.content = content() | ||
await handlers.check_for_200_error((http_response, {})) | ||
assert http_response.status_code == 500 | ||
|
||
async def test_200_response_with_no_error_left_untouched(self): | ||
http_response = mock.Mock() | ||
http_response.status_code = 200 | ||
|
||
async def content(): | ||
return "<NotAnError></NotAnError>" | ||
|
||
http_response.content = content() | ||
await handlers.check_for_200_error((http_response, {})) | ||
# We don't touch the status code since there are no errors present. | ||
assert http_response.status_code == 200 | ||
|
||
async def test_500_response_can_be_none(self): | ||
# A 500 response can raise an exception, which means the response | ||
# object is None. We need to handle this case. | ||
await handlers.check_for_200_error(None) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 doesn't appear to have been needed