-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MOD-3613] Improve client error message for asgi / wsgi apps that hav…
…e non-nullary functions (#2190) * Return a more helpful error to ensure that ASGI app functions get no args. * Return ASGI app function not nullary error earlier by inspecting the function. * Require WSGI app functions to also be non nullary and fix a small bug - the decorator accepted 0 as a positional arg. * Fix the small bug everywhere - the decorators accepted 0 as a positional arg. * Shuffle around the is_nullary logic and test fix. * Switch is_nullary for method_has_params and fix bug in logic there. * Add a bit more testing for method_has_params. * Missing parens. * Add a deprecation warning for default args used in asgi / wsgi app functions. * Clarify a few comments. * Fix tests to reflect updated warning messages. --------- Co-authored-by: Daniel Shaar <[email protected]>
- Loading branch information
1 parent
7fcb063
commit 01c3799
Showing
5 changed files
with
140 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters