From 4e1e74bddce6b1680bca974c6571eaef250c0242 Mon Sep 17 00:00:00 2001 From: Rene Nulsch <33263735+ReneNulschDE@users.noreply.github.com> Date: Sat, 27 Feb 2021 16:43:56 +0100 Subject: [PATCH] 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 --- CHANGELOG.md | 1 + setup.py | 4 ++-- spotipy/client.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93fc834..ced9870 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - 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 diff --git a/setup.py b/setup.py index d2c31d9..d3b85bd 100644 --- a/setup.py +++ b/setup.py @@ -26,8 +26,8 @@ setup( author_email="paul@echonest.com", url='https://spotipy.readthedocs.org/', install_requires=[ - 'requests>=2.20.0', - 'six>=1.10.0', + 'requests>=2.25.0', + 'six>=1.15.0', ], tests_require=test_reqs, extras_require=extra_reqs, diff --git a/spotipy/client.py b/spotipy/client.py index 8cbc49d..e5bc0e7 100644 --- a/spotipy/client.py +++ b/spotipy/client.py @@ -194,7 +194,7 @@ class Spotify(object): total=self.retries, connect=None, read=False, - method_whitelist=frozenset(['GET', 'POST', 'PUT', 'DELETE']), + allowed_methods=frozenset(['GET', 'POST', 'PUT', 'DELETE']), status=self.status_retries, backoff_factor=self.backoff_factor, status_forcelist=self.status_forcelist)