-
Notifications
You must be signed in to change notification settings - Fork 12
add uvicorn context-creation support when run with gUnicorn #576
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
base: main
Are you sure you want to change the base?
Conversation
intercepts status codes
This reverts commit 7f97945.
| @@ -0,0 +1,53 @@ | |||
| # Django ASGI | |||
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.
Can we document the caveats? of the limited support? e.g. https://github.com/AikidoSec/firewall-node/blob/main/docs/next.md#caveats
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.
there are no caveats, the limited support is about with which frameworks it works? not sure how I am supposed to clarify that further, is already in bold under ## Support (as in limited support)
| await self.client_app(receive, send) | ||
| else: | ||
| # client_app = coroutine application(scope, receive, send) | ||
| await self.client_app(scope, receive, send) |
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.
no need for return here?
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.
wdym, returning the value? not done for ASGI apps
57eed8f to
af0b50c
Compare
|
|
||
| @on_import("psycopg.cursor_async", "psycopg", version_requirement="3.1.0") | ||
| def patch_async(m): | ||
| """ |
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.
Docstring in patch_async only restates that it patches psycopg.cursor_async. Replace with the rationale for the async-specific patch or remove the redundant comment.
Details
β¨ AI Reasoning
βAn added docstring for the newly introduced async patch function merely restates that it patches the psycopg.cursor_async module and that it's similar to the normal patch. This repeats what the code (registering AsyncCursor.copy/execute/executemany) already shows and doesn't explain why the separate async patch is needed or any design rationale. A 'why' comment or removal would be more valuable.
π§ How do I fix it?
Write comments that explain the purpose, reasoning, or business logic behind the code using words like 'because', 'so that', or 'in order to'.
Reply @AikidoSec feedback: [FEEDBACK] to get better review comments in the future.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
Summary by Aikido
π New Features
β‘ Enhancements
π§ Refactors
More info