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

replaced-http-statuses-with-HTTPStatus-from-http-stdlib #1174

Conversation

DamianCzajkowski
Copy link
Contributor

No description provided.

@DamianCzajkowski DamianCzajkowski requested a review from rafalp April 4, 2024 10:30
@rafalp rafalp added this to the Next release milestone Apr 4, 2024
@DamianCzajkowski DamianCzajkowski self-assigned this Apr 4, 2024
@rafalp rafalp modified the milestones: 0.23, Next release Apr 4, 2024
Copy link

codecov bot commented Apr 4, 2024

Codecov Report

Attention: Patch coverage is 98.55072% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 97.86%. Comparing base (5a0f358) to head (fd1a15f).
Report is 5 commits behind head on main.

Files Patch % Lines
tests/asgi/test_query_execution.py 93.33% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1174   +/-   ##
=======================================
  Coverage   97.86%   97.86%           
=======================================
  Files         109      109           
  Lines        8142     8153   +11     
=======================================
+ Hits         7968     7979   +11     
  Misses        174      174           

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

ariadne/exceptions.py Outdated Show resolved Hide resolved
ariadne/asgi/handlers/http.py Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
ariadne/wsgi.py Outdated Show resolved Hide resolved
ariadne/wsgi.py Show resolved Hide resolved
tests/wsgi/test_explorer.py Outdated Show resolved Hide resolved
tests/wsgi/test_query_execution.py Outdated Show resolved Hide resolved
tests_integrations/flask/test_http_request.py Show resolved Hide resolved
Copy link
Collaborator

@rafalp rafalp left a comment

Choose a reason for hiding this comment

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

Only problem with this change is that some places that returned 400 BAD REQUEST or 200 OK as response content will now only return a response code (eg. 400 or 200).

We could re-add HTTP_STATUS_X constants to constants but convert them into a HttpStatusResponse enum with str values for plaintext responses.

ariadne/exceptions.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@rafalp rafalp left a comment

Choose a reason for hiding this comment

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

Linters are failing

@rafalp rafalp merged commit e3d8e6b into main Apr 5, 2024
22 checks passed
@rafalp rafalp deleted the 65-it-might-be-slightly-better-idea-to-aggregate-http-statuses-in-separate-namespace branch April 5, 2024 16:34
@DamianCzajkowski DamianCzajkowski added roadmap Feature that we want to have included and removed roadmap Feature that we want to have included labels Apr 9, 2024
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.

It might be slightly better idea to aggregate HTTP statuses in separate namespace.
2 participants