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

Consider using "wrapt" for decorators. #97

Open
schinckel opened this issue Apr 28, 2018 · 1 comment
Open

Consider using "wrapt" for decorators. #97

schinckel opened this issue Apr 28, 2018 · 1 comment

Comments

@schinckel
Copy link
Contributor

The AsyncAccessory stuff looks interesting, but I note that you are writing some decorators in there.

GrahamDumpleton wrote a series of blog posts about writing decorators, the TLDR of which is that you should use his wrapt package when writing them to ensure they work reliably, and don't change the name/signature of the object they are wrapping.

https://github.com/GrahamDumpleton/wrapt/tree/master/blog

@cdce8p
Copy link
Contributor

cdce8p commented Apr 28, 2018

I don't think that this is that big of a deal, but adding @functools.wraps(wrapped) woun't hurt either.
@schinckel Do you want to do the change and prepare the PR?

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

2 participants