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

botocore.vendored.requests deprecation #421

Closed
jantman opened this issue Aug 28, 2019 · 3 comments
Closed

botocore.vendored.requests deprecation #421

jantman opened this issue Aug 28, 2019 · 3 comments

Comments

@jantman
Copy link
Owner

jantman commented Aug 28, 2019

Running awslimitchecker with the latest versions of all dependencies, we get the following DeprecationWarning:

lib/python2.7/site-packages/botocore/vendored/requests/api.py:67: DeprecationWarning: You are using the get() function from 'botocore.vendored.requests'.  This is not a public API in botocore and will be removed in the future. Additionally, this version of requests is out of date.  We recommend you install the requests package, 'import requests' directly, and use the requests.get() function instead.

This was recently changed to display by default in boto/botocore#1748 and was previously added in boto/botocore#1625 and overall relates to boto/botocore#1608 which calls for the removal of botocore's vendored-in requests and urllib3, as they're no longer used. This was announced in the 1.11.0 botocore CHANGELOG entry, which was released back on August 24, 2018.

It appears that we're currently using the vendored requests in three places:

The first one appears that, since the release of boto/botocore#1495 ("Unvendor requests and use urllib3 directly") a year ago, we should be able to catch either botocore.exceptions.ConnectTimeoutError or its other parent class, botocore.exceptions.ConnectionError.

For the second one, checking the latest awslimitchecker version, botocore itself now depends on the normal upstream urllib3 package. We should too, and should just use that.

@jantman jantman added the bug label Aug 28, 2019
jantman added a commit that referenced this issue Aug 28, 2019
…xceptions.ConnectTimeout in favor of botocore.exceptions.ConnectionError
@rohanjoseff
Copy link

Does the docker image tagged "master" have this fix?

@jantman
Copy link
Owner Author

jantman commented Sep 3, 2019

@rohanjoseff It does not. This fix is currently staged in the develop branch, waiting on a few more feature requests before I cut a release. This should be done in a week or so.

Please keep in mind that the vendored-in requests library will still be present in the installation until boto/botocore#1608 is done upstream; awslimitchecker will just not be using it anymore.

@jantman
Copy link
Owner Author

jantman commented Sep 10, 2019

This was merged to master in #427 and released as 7.1.0. The release is now live on PyPI and the Docker image should be live on Docker Hub shortly.

@rohanjoseff

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

Successfully merging a pull request may close this issue.

2 participants