We’d like to give additional visibility to an upcoming change to Botocore, a dependency on Boto3, the AWS SDK for Python. Starting 10/21/19, we will be removing the vendored version of the requests library in Botocore. In this post, we’ll cover the key details.

In August of last year, we made significant improvements to the internals of Botocore to allow for pluggable HTTP clients. A key part of the internal refactoring was changing the HTTP client library from the requests library to urllib3. As part of this change, we also decided to unvendor our HTTP library. This allows us to support a range of versions of urllib3 instead of requiring us to depend on a specific version. This meant that we no longer used the vendored version of requests in Botocore and we could remove this unused code. See the GitHub pull request for a more information.

If you’re using the vendored version of requests in Botocore, you’ll see the following warning:

./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.

You can migrate away from this by installing requests into your python environment and importing requests directly:


from botocore.vendored import requests
response = requests.get('https://...')


$ pip install requests
import requests
response = requests.get('https://...')

The associated PR https://github.com/boto/botocore/pull/1829 has a branch you can use to test this change before its merged into an official release.

Please let us know if you have any questions or concerns in the GitHub pull request.

from AWS Developer Blog https://aws.amazon.com/blogs/developer/removing-the-vendored-version-of-requests-from-botocore/