Replace Urllib3 method_whitelist with allowed_methods (#638)

* Replace method_whitelist with allowed_methods

* Add ChangeLog Entry

* update requests to 2.25 and six to 1.15
This commit is contained in:
Rene Nulsch 2021-02-27 16:43:56 +01:00 committed by GitHub
parent 27a7c2c880
commit 4e1e74bddc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
- Fixed Spotify.user_playlist_reorder_tracks calling Spotify.playlist_reorder_tracks with an incorrect parameter order - Fixed Spotify.user_playlist_reorder_tracks calling Spotify.playlist_reorder_tracks with an incorrect parameter order
- Fixed deprecated Urllib3 `Retry(method_whitelist=...)` in favor of `Retry(allowed_methods=...)`
## [2.16.1] - 2020-10-24 ## [2.16.1] - 2020-10-24

View File

@ -26,8 +26,8 @@ setup(
author_email="paul@echonest.com", author_email="paul@echonest.com",
url='https://spotipy.readthedocs.org/', url='https://spotipy.readthedocs.org/',
install_requires=[ install_requires=[
'requests>=2.20.0', 'requests>=2.25.0',
'six>=1.10.0', 'six>=1.15.0',
], ],
tests_require=test_reqs, tests_require=test_reqs,
extras_require=extra_reqs, extras_require=extra_reqs,

View File

@ -194,7 +194,7 @@ class Spotify(object):
total=self.retries, total=self.retries,
connect=None, connect=None,
read=False, read=False,
method_whitelist=frozenset(['GET', 'POST', 'PUT', 'DELETE']), allowed_methods=frozenset(['GET', 'POST', 'PUT', 'DELETE']),
status=self.status_retries, status=self.status_retries,
backoff_factor=self.backoff_factor, backoff_factor=self.backoff_factor,
status_forcelist=self.status_forcelist) status_forcelist=self.status_forcelist)