Open Dylan1496 opened 2 years ago
@Dylan1496 I knew the deprecation warning would eventually turn into a problem but they did not have good documentation back then. Would you like to pr with the fix and I will gladly merge it and upstream everything to all pip, arch and nix repos.
I did try fixing it, however, all my attempts results in the server coming up but without anything being displayed (except for a new tab that is either a white or black screen).
Describe the bug When running the SwSpotify web server or using the command line interface with a python-werkzeug package version 2.1.0 or greater, the web server fails with a runtime error stating that it is not running with the werkzeug server.
To Reproduce Steps to reproduce the behavior:
Expected behavior The server should come up in a new tab or in a terminal and supply lyrics.
Desktop (please complete the following information):
Additional context Werkzeug provides a warning when using a 2.0.x versioned package:
/usr/lib/python3.10/site-packages/SwSpotify/web_server.py:48: UserWarning: The 'environ['werkzeug.server.shutdown']' function is deprecated and will be removed in Werkzeug 2.1.
The documentation for werkzeug shows the proper way to do the shutdown: https://werkzeug.palletsprojects.com/en/2.1.x/serving/#shutting-down-the-server
So until a fix is provided the only way to use this is to downgrade workzeug to 2.0.3 and add it to IgnorePkg (on Arch Linux at least, I am not sure about other Linux distros). The same message regarding deprecation appears on Windows as well, however, pip prevents the upgrade to 2.1.x.