tiagocoutinho / multivisor

Centralized supervisor WebUI and CLI
GNU General Public License v3.0
184 stars 37 forks source link

multivisor not compatible with werkzeug >=2.1 #89

Open beenje opened 2 years ago

beenje commented 2 years ago

run_with_reloader was removed in werkzeug 2.1.0: https://github.com/pallets/werkzeug/pull/2276

$ multivisor --help
Traceback (most recent call last):
  File "/opt/conda/envs/supervisor/bin/multivisor", line 5, in <module>
    from multivisor.server.web import main
  File "/opt/conda/envs/supervisor/lib/python3.9/site-packages/multivisor/server/web.py", line 17, in <module>
    from werkzeug.serving import run_with_reloader
ImportError: cannot import name 'run_with_reloader' from 'werkzeug.serving' (/opt/conda/envs/supervisor/lib/python3.9/site-packages/werkzeug/serving.py)

$ pip list
Package            Version
------------------ -------
blinker            1.4
click              8.1.3
Flask              2.1.2
future             0.18.2
gevent             21.12.0
greenlet           1.1.2
importlib-metadata 4.11.4
itsdangerous       2.1.2
Jinja2             3.1.2
MarkupSafe         2.1.1
msgpack            1.0.3
multivisor         6.0.1
pip                22.1.2
pyzmq              23.0.0
setuptools         62.3.2
six                1.16.0
supervisor         4.2.4
Werkzeug           2.1.2
wheel              0.37.1
zerorpc            0.6.3
zipp               3.8.0
zope.event         4.5.0
zope.interface     5.4.0
elee1766 commented 1 year ago

i have patched this locally by replacing run_with_reloader with run_simple, and adding arg use_reloader=True

it's in web.py

it seems to be working so far, not sure if anything else is broken yet.

mridzwan commented 1 year ago

Changing the import module from werkzeug.serving to werkzeug._reloader also works

https://github.com/miguelgrinberg/Flask-SocketIO/commit/6563634e4c7836479ff5d38d20f4339e6bcf92ab