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

Upgrade to flask 2 #1764

Merged
merged 1 commit into from
Jul 5, 2021
Merged

Upgrade to flask 2 #1764

merged 1 commit into from
Jul 5, 2021

Conversation

corenting
Copy link
Contributor

I noticed in issue #1759 that the flask version was pinned to the 1.x branch to fix compatibility issues. This PR introduces the necessary changes to bump Flask and werkzeug to version 2.x .

@cyberw
Copy link
Collaborator

cyberw commented May 21, 2021

Cool stuff! Right now there is just so much more flask 1.x running out there (that people might be running in the same env as locust or inside locust), so I dont think we want to merge this right now, but it is nice to know we can.

@corenting
Copy link
Contributor Author

Cool stuff! Right now there is just so much more flask 1.x running out there (that people might be running in the same env as locust or inside locust), so I dont think we want to merge this right now, but it is nice to know we can.

Thanks for the feedback :) Maybe I can add conditions to see which version of Flask is used and adapt the changes depending on this, to allow running with both Flask 1.x and Flask 2.x ?

@cyberw cyberw marked this pull request as draft May 21, 2021 11:36
@cyberw
Copy link
Collaborator

cyberw commented May 21, 2021

Thanks for the feedback :) Maybe I can add conditions to see which version of Flask is used and adapt the changes depending on this, to allow running with both Flask 1.x and Flask 2.x ?

That would be nice. We'd still have to depend on 1.x in setup.py, but I guess it might still be useful for some people.

@cyberw
Copy link
Collaborator

cyberw commented Jun 5, 2021

Actually, I'm thinking about making a 2.0 release soon and it makes total sense to update flask at the same time. can you fix the formatting errors though?

@cyberw cyberw marked this pull request as ready for review June 5, 2021 20:15
@corenting
Copy link
Contributor Author

corenting commented Jun 7, 2021

Actually, I'm thinking about making a 2.0 release soon and it makes total sense to update flask at the same time. can you fix the formatting errors though?

Sure ! I just pushed an update with formatting fixed. I didn't have time to verify the tests though, but look like they are OK on the CI.

@jjin-ut
Copy link

jjin-ut commented Jun 21, 2021

Thanks for the PR. I ran into this error just now when I try to run locust.

app.jinja_options["extensions"].append("jinja2.ext.do")
KeyError: 'extensions'

It was working for me a few hours ago, then all in sudden ran into this error. Nothing has changed on my side.
When is this PR going to be released? Hope it will fix the issue.

@cyberw
Copy link
Collaborator

cyberw commented Jun 21, 2021

Thanks for the PR. I ran into this error just now when I try to run locust.

app.jinja_options["extensions"].append("jinja2.ext.do")
KeyError: 'extensions'

It was working for me a few hours ago, then all in sudden ran into this error. Nothing has changed on my side.
When is this PR going to be released? Hope it will fix the issue.

I want to do this in 2.0, because it may be a breaking change for some people. Locust 1.5.3 uses a pinned 1.x version of Flask, so you shouldnt have this issue?

@jjin-ut
Copy link

jjin-ut commented Jun 21, 2021

Thanks for the PR. I ran into this error just now when I try to run locust.

app.jinja_options["extensions"].append("jinja2.ext.do")
KeyError: 'extensions'

It was working for me a few hours ago, then all in sudden ran into this error. Nothing has changed on my side.
When is this PR going to be released? Hope it will fix the issue.

I want to do this in 2.0, because it may be a breaking change for some people. Locust 1.5.3 uses a pinned 1.x version of Flask, so you shouldnt have this issue?

Ah my locust is 1.4.4. I'll update and see if it works. Thank you!

@jjin-ut
Copy link

jjin-ut commented Jun 21, 2021

Thanks for the PR. I ran into this error just now when I try to run locust.

app.jinja_options["extensions"].append("jinja2.ext.do")
KeyError: 'extensions'

It was working for me a few hours ago, then all in sudden ran into this error. Nothing has changed on my side.
When is this PR going to be released? Hope it will fix the issue.

I want to do this in 2.0, because it may be a breaking change for some people. Locust 1.5.3 uses a pinned 1.x version of Flask, so you shouldnt have this issue?

update to 1.5.3 fixed my problem. Thank you!

@cyberw cyberw merged commit e01999e into locustio:master Jul 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants