Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flask 3.0.0 #566

Open
Ced1999 opened this issue Oct 1, 2023 · 12 comments
Open

Flask 3.0.0 #566

Ced1999 opened this issue Oct 1, 2023 · 12 comments
Labels
question Further information is requested

Comments

@Ced1999
Copy link

Ced1999 commented Oct 1, 2023

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 Ced1999 added the question Further information is requested label Oct 1, 2023
@Yoshi325
Copy link

Yoshi325 commented Oct 3, 2023

At least one part is being tackled here: #567

So I'd say there is hope.

@Ryu-CZ
Copy link
Contributor

Ryu-CZ commented Oct 6, 2023

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.

@peter-doggart
Copy link
Contributor

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: pytest-dev/pytest-flask#167

meshantz added a commit to meshantz/flask-restx that referenced this issue Oct 12, 2023
@safe
Copy link

safe commented Oct 20, 2023

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

@peter-doggart
Copy link
Contributor

@safe I've created a PR for this. Can you just run your eye over it and make sure it's all fine? #579

@peter-doggart
Copy link
Contributor

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.

@nachitox
Copy link

pytest-flask was upgraded yesterday.

@peter-doggart
Copy link
Contributor

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

@diogper
Copy link

diogper commented Oct 29, 2023

Great news!

@peter-doggart
Copy link
Contributor

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

@peter-doggart
Copy link
Contributor

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.

@martin-thoma
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

8 participants