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

Flask 3.0.0

Open Ced1999 opened this issue 2 years ago • 12 comments

Ask a question Flask was updated to version 3.0.0. This seems to break compatibility with flask-restx completely on my end. Are there plans to make them compatible again in the future?

Ced1999 avatar Oct 01 '23 05:10 Ced1999

At least one part is being tackled here: https://github.com/python-restx/flask-restx/issues/567

So I'd say there is hope.

Yoshi325 avatar Oct 03 '23 17:10 Yoshi325

I made a few patches for major issues, but tool the flask-restx is using to mock test flask compatibility are unfortunately also broken by transition to 3.0. So pull request reviews could take some time. This unfortunately can put also block your projects from integration of flask 3.0. I put a hotfixes to restx-monkey 5.1+ which makes 3.0 flask and flask-restx compatible again so you can test and resolve your own code base compatibilities issues, while flask-restx teams does the same. I hope this could save you some time.

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

Just pinning this to keep it at the top. It is our intention to update flask-restx to support Flask 3.0.0+ as soon as possible, but it is currently blocked because, as @Ryu-CZ mentioned, we use pytest-flask to mock flask components, and it is also broken by the new Flask version.

Thankfully, the project is still active so hopefully will be fixed shortly. You can follow the discussion here: https://github.com/pytest-dev/pytest-flask/issues/167

peter-doggart avatar Oct 10 '23 14:10 peter-doggart

@peter-doggart Thoughts on pinning flask to < 3.0.0 until this is resolved? I can raise a PR if so.

safe avatar Oct 20 '23 20:10 safe

@safe I've created a PR for this. Can you just run your eye over it and make sure it's all fine? https://github.com/python-restx/flask-restx/pull/579

peter-doggart avatar Oct 21 '23 11:10 peter-doggart

I have now released flask-restx==1.2.0 which contains restrictions on some version until we can get everything updated (still awaiting pytest-flask updates) so that a default installation isn't broken.

Anyone who wants to make use of restx-monkey can install flask-restx==1.1.0 and then patch which will allow flask >=3.0.0 usage.

peter-doggart avatar Oct 22 '23 12:10 peter-doggart

pytest-flask was upgraded yesterday.

nachitox avatar Oct 24 '23 20:10 nachitox

@nachitox Great news. I will try and get everything merged over the coming days, pretty flat out with other things this week.

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

Great news!

diogper avatar Oct 29 '23 13:10 diogper

I haven't forgotten about this, just got very little time atm. It's still on my to-do list!

peter-doggart avatar Nov 08 '23 15:11 peter-doggart

Flask-restx community, thanks for your patience on this! :)

I have just merged all the most recent PRs and done some general tidy up. Flask-restx 1.3.0 should hit PyPi in a few minutes. Flask and Werkzeug >=3.0.0 should now work correctly again.

There is still a deprecation warning relating to jsonschema, however it doesn't currently impact functionality. I will hopefully get some time to deep dive on how to fix it over the coming weeks.

Please file a new issue (or PR if you have the time!) if you find anything is broken or funny.

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

The new version is on PyPI. Should this be closed?

martin-thoma avatar Jan 26 '24 10:01 martin-thoma