How to resolve deprecation warning about decorators/route handlers #3551
-
Using any of the route handler decorators How do I resolve this? I checked the docs, but they still tell you to use these decorators which cause the warning. The only way I can see right now is to directly use What is the action I am supposed to take based on this deprecation warning? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hey @bunny-therapist, thanks for reporting this! It seems like this is an overzealous warning, you're not doing everything wrong here. It is this code which produces the warning: It was intended to warn if you subclass one of the decorators, but we seem to have forgotten to add an exception for the handler classes themselves. Would you mind opening a proper issue for this so we can track and fix it? |
Beta Was this translation helpful? Give feedback.
-
Thanks. Will do. |
Beta Was this translation helpful? Give feedback.
Hey @bunny-therapist, thanks for reporting this! It seems like this is an overzealous warning, you're not doing everything wrong here.
It is this code which produces the warning:
litestar/litestar/handlers/http_handlers/decorators.py
Line 49 in 84f51c8
It was intended to warn if you subclass one of the decorators, but we seem to have forgotten to add an exception for the handler classes themselves. Would you mind opening a proper issue for this so we can track and fix it?