-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
False-positive deprecation warning for partial async handlers #3252
Comments
Feel free to send a PR |
The issue is essentially the same as #1993 (comment) |
I guess I'm curious if my read was correct though: when synchronous handler support is removed, would this synchronous coroutine-handler-generator still work fine? |
Are you asking for |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs. |
Long story short
Wrapping a coroutine function with a
functools.partial
causes a DeprecationWarning to trigger.Steps to reproduce
Something like
causes a
DeprecationWarning
to be hit.I think when called as
handler(req)
will immediately run through the partial and return the coroutine, which can then be awaited. It seems like the dep warning in this case is more of a false-positive. Maybe an expression like the ending one below could suppress it? If this is indeed just a false-positive and I'm the onlycomplainerreporter, I could live.Tweak?:
Your environment
I'm using aiohttp 3.3.2 on Python 3.6.5 on Ubuntu 16.04, but it looks like master would still trigger the warning.
The text was updated successfully, but these errors were encountered: