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

Unclear which HTTPError was instantiated from deprecated_args() warnings #2010

Closed
vytas7 opened this issue Jan 24, 2022 · 0 comments · Fixed by #2008
Closed

Unclear which HTTPError was instantiated from deprecated_args() warnings #2010

vytas7 opened this issue Jan 24, 2022 · 0 comments · Fixed by #2008

Comments

@vytas7
Copy link
Member

vytas7 commented Jan 24, 2022

In Falcon 3.0.x, instantiating HTTPError or its subclasses with positional arguments (of course except the allowed ones) generates a DeprecatedWarning via the deprecated_args() decorator.

However, it is unclear from the warning which class/function was invoked, it just says "calls [with more than N] positional args are deprecated". Brought up by @laurent-chriqui (see the linked PR).

Ideally, as a developer, I would like the warning to read along the lines of

DeprecatedWarning: Calls to HTTPNotFound.__init__(...) with positional args are deprecated. Please specify them as keyword arguments instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant