flask-restx icon indicating copy to clipboard operation
flask-restx copied to clipboard

Support Werkzeug 3.0

Open funsim opened this issue 2 years ago • 5 comments

https://github.com/python-restx/flask-restx/blob/7ce0ef8056e66d81018e32dfe4b2dcc59dedfb83/flask_restx/api.py#L35-L40

Should be replaced with

from importlib.metadata import version
  
if version("werkzeug").split(".")[0] >= "2": 
    from werkzeug.wrappers import Response as BaseResponse 
else: 
    from werkzeug.wrappers import BaseResponse 

funsim avatar Oct 05 '23 11:10 funsim

Good spot, will make sure this gets updated along with the flask 3.0 support things.

peter-doggart avatar Oct 06 '23 09:10 peter-doggart

Switch to importlib #562 is related to this issue. I will check project for other usages of __version__.

For @funsim: flask-restx dropped support of 3.7 python which could cause conflict of package versioning so please check your python version also. But I think werkzeug dropped 3.7 python support too.

Ryu-CZ avatar Oct 06 '23 11:10 Ryu-CZ

Is there any update on this?

emily-coffin avatar Dec 08 '23 16:12 emily-coffin

@funsim @emily-coffin This should be fixed on v1.3.0 which was released today. Please let me know if it is not. :)

peter-doggart avatar Dec 10 '23 14:12 peter-doggart

Thanks for your work here Peter. It's much appreciated.

seanieb avatar Dec 10 '23 22:12 seanieb