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

Change all decorators to use wraps or update_wrapper from functools #139

Open
sjamaan opened this issue Aug 21, 2020 · 0 comments
Open

Change all decorators to use wraps or update_wrapper from functools #139

sjamaan opened this issue Aug 21, 2020 · 0 comments

Comments

@sjamaan
Copy link
Contributor

sjamaan commented Aug 21, 2020

Currently, you cannot reorder the decorators on route methods because Binder expects the wrapped method to have certain attributes. This is a major annoyance because it is super picky in which order stuff needs to be applied.

We should review all the wrappers and use wraps or update_wrapper from functools, which will copy the properties of the wrapped function, so it becomes much more user-friendly.

If there are decorators which change which arguments the function accepts (no_scoping_required is one of those, I think) we should attempt to make it order-independent as well.

@sjamaan sjamaan changed the title Change all decorators to use wraps from functools Change all decorators to use wraps or update_wrapper from functools Aug 21, 2020
@sjamaan sjamaan changed the title Change all decorators to use wraps or update_wrapper from functools Change all decorators to use wraps or update_wrapper from functools Aug 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant