[GH-ISSUE #637] Urllib3 method_whitelist deprecated #379

Closed
opened 2026-02-27 23:22:18 +03:00 by kerem · 1 comment
Owner

Originally created by @ReneNulschDE on GitHub (Feb 6, 2021).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/637

Describe the bug
In Urllib3 version >= 1.26.0 Retry(method_whitelist=...) is deprecated. Your component is using method_whitelist here

Your code
None. Your lib is used in the Home-Assistant Spotify component.

Expected behavior
No deprecation warnings. Check if a replacement with allowed_methods is possible. Tested this with a local code change and works good.

Output
/home/rene/repos/core/venv/lib/python3.8/site-packages/urllib3/util/retry.py:252: DeprecationWarning: Using 'method_whitelist' with Retry is deprecated and will be removed in v2.0. Use 'allowed_methods' instead

Environment:

  • OS: Linux Ubuntu 20.04
  • Python version: 3.8.6
  • spotipy version: 2.16.1

Additional context

Originally created by @ReneNulschDE on GitHub (Feb 6, 2021). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/637 **Describe the bug** In Urllib3 version >= 1.26.0 `Retry(method_whitelist=...)` is deprecated. Your component is using method_whitelist [here](https://github.com/plamere/spotipy/blob/44970c3348f4242be4dbadadf1d08ff5242918da/spotipy/client.py#L197) **Your code** None. Your lib is used in the Home-Assistant Spotify component. **Expected behavior** No deprecation warnings. Check if a replacement with `allowed_methods` is possible. Tested this with a local code change and works good. **Output** /home/rene/repos/core/venv/lib/python3.8/site-packages/urllib3/util/retry.py:252: DeprecationWarning: Using 'method_whitelist' with Retry is deprecated and will be removed in v2.0. Use 'allowed_methods' instead **Environment:** - OS: Linux Ubuntu 20.04 - Python version: 3.8.6 - spotipy version: 2.16.1 **Additional context**
kerem 2026-02-27 23:22:18 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@stephanebruckert commented on GitHub (Mar 4, 2021):

Released in 2.17.1

<!-- gh-comment-id:790860754 --> @stephanebruckert commented on GitHub (Mar 4, 2021): Released in 2.17.1
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotipy#379
No description provided.