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

Update to flask 3 #564

Merged
merged 2 commits into from
Dec 10, 2023
Merged

Update to flask 3 #564

merged 2 commits into from
Dec 10, 2023

Conversation

pjonsson
Copy link
Contributor

@pjonsson pjonsson commented Dec 7, 2023

Remove the before_first_request decorator since it is deprecated in Flask 2.2.

Remove the check for schema compatibility,
generate.py already performs that check,
and conftest.py ensures the tables are
freshly created.

I don't know anything about Prometheus so I only know the CI tests pass,
I have no idea if Prometheus works as intended.


📚 Documentation preview 📚: https://datacube-explorer--564.org.readthedocs.build/en/564/

Copy link

codecov bot commented Dec 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (34daed4) 86.31% compared to head (46a8498) 86.29%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #564      +/-   ##
===========================================
- Coverage    86.31%   86.29%   -0.03%     
===========================================
  Files           26       26              
  Lines         3457     3451       -6     
===========================================
- Hits          2984     2978       -6     
  Misses         473      473              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@omad omad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me, thanks.

This decorator is deprecated in Flask 2.2.

Remove the check for schema compatibility,
generate.py already performs that check,
and conftest.py ensures the tables are
freshly created.

Fixes opendatacube#547
This does not need to be pinned
after removing the before_first_request
decorator.

The Werkzeug restriction was only added
for the pinned flask, so remove that too.
Werkzeug 3 has removed the safe_conversion
parameter of iri_to_uri, so remove that
from _stac_legacy.py.
@omad omad merged commit 5d83bd2 into opendatacube:develop Dec 10, 2023
7 checks passed
@pjonsson pjonsson deleted the flask-update branch December 11, 2023 08:23
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.

2 participants