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

Replace flask-restful #1105

Merged
merged 3 commits into from
May 20, 2021
Merged

Conversation

Zlopez
Copy link
Contributor

@Zlopez Zlopez commented May 18, 2021

The Flask restful had last release in 2014 and the CI started failing
because of some dependencies that are no longer available.

I decided to replace flask-restful with
flask.view.MethodView and
webargs. The API will not change, but the error messages will be
slightly different.

Signed-off-by: Michal Konečný [email protected]

@Zlopez Zlopez requested a review from a team as a code owner May 18, 2021 16:32
The Flask restful had last release in 2014 and the CI started failing
because of some dependencies that are no longer available.

I decided to replace flask-restful with
[flask.view.MethodView](https://flask.palletsprojects.com/en/2.0.x/views/#method-based-dispatching) and
[webargs](https://webargs.readthedocs.io/en/latest/index.html). The API will not change, but the error messages will be
slightly different.

Signed-off-by: Michal Konečný <[email protected]>
@Zlopez Zlopez force-pushed the replace_flask_restful branch from 1cc875c to 5ed3705 Compare May 18, 2021 16:33
@lgtm-com
Copy link

lgtm-com bot commented May 18, 2021

This pull request introduces 1 alert when merging 5ed3705 into 332bfb5 - view on LGTM.com

new alerts:

  • 1 for Signature mismatch in overriding method

Zlopez added 2 commits May 18, 2021 18:59
The overriden error_handler doesn't have correct signature, let's fix
this.

Signed-off-by: Michal Konečný <[email protected]>
Signed-off-by: Michal Konečný <[email protected]>
@codecov
Copy link

codecov bot commented May 20, 2021

Codecov Report

Merging #1105 (d35ac73) into master (332bfb5) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1105      +/-   ##
==========================================
- Coverage   97.37%   97.34%   -0.03%     
==========================================
  Files          64       64              
  Lines        4268     4220      -48     
  Branches      598      600       +2     
==========================================
- Hits         4156     4108      -48     
  Misses         65       65              
  Partials       47       47              
Impacted Files Coverage Δ
anitya/api_v2.py 98.56% <100.00%> (-0.28%) ⬇️
anitya/app.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 332bfb5...d35ac73. Read the comment docs.

@Zlopez Zlopez merged commit acff06e into fedora-infra:master May 20, 2021
@Zlopez Zlopez deleted the replace_flask_restful branch May 20, 2021 08:26
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.

1 participant