-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
chore: bump werkzeug and Flask #23965
Conversation
Hi @dpgaspar! We have a Mypy configuration problem in #23927
|
not yet |
@@ -309,7 +310,7 @@ vine==5.0.0 | |||
# kombu | |||
wcwidth==0.2.5 | |||
# via prompt-toolkit | |||
werkzeug==2.1.2 | |||
werkzeug==2.3.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest you to pin werkzeug
in setup.py because we use this lib in superset project directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, makes sense
Codecov Report
@@ Coverage Diff @@
## master #23965 +/- ##
===========================================
- Coverage 68.18% 56.98% -11.20%
===========================================
Files 1941 1941
Lines 75261 75261
Branches 8168 8168
===========================================
- Hits 51317 42888 -8429
- Misses 21855 30284 +8429
Partials 2089 2089
Flags with carried forward coverage won't be shown. Click here to find out more. see 306 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@cwegener @dpgaspar I found that mypy PR python/mypy#10652 which resolves flask & werkzeug typing problems. |
I'm actually not very concerned about the static type checking at the moment. I think it's a lower priority. |
Yes. The solution for this particular mypy issue should be to remove the |
Would it be better to go to Flask 2.2 before migrating to Flask 2.3? |
@@ -33,6 +33,7 @@ def fetch_events(self, last_id: Optional[str] = None): | |||
|
|||
@mock.patch("uuid.uuid4", return_value=UUID) | |||
def test_events(self, mock_uuid4): | |||
app._got_first_request = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a bit of an hack, async_query_manager.init_app(app)
registers a Flask app.before_request
. New Flask will only allow registering before request hooks if no request was yet processed by the app.
@@ -1188,10 +1193,10 @@ def test_data_cache_default_timeout( | |||
|
|||
|
|||
def test_chart_cache_timeout( | |||
load_energy_table_with_slice: List[Slice], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an interesting case that surfaced on this new Flask version. Flask now is stricter, so when popping a new context from the app stack it checks if the context is the one we are expecting. load_energy_table_with_slice
creates a new app_context
so it needs to be first
Flask is on 2.2 |
yep, thank you once more for doing that on: #24033 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, pretty big changes needed, thanks for all the work here 👍
SUMMARY
Bump Flask and Werkzeug
https://nvd.nist.gov/vuln/detail/CVE-2023-30861
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION