-
Notifications
You must be signed in to change notification settings - Fork 118
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
Function _http_view_func_wrapper
should use @functools.wraps
#178
Comments
svleeuwen
added a commit
to svleeuwen/functions-framework-python
that referenced
this issue
Mar 24, 2022
To make sure function attributes are copied to `_http_view_func_wrapper`
Hello, thanks for filing this issue! This seems like a good change to add. Would it be possible for you to add a unit test and open a PR? |
svleeuwen
added a commit
to svleeuwen/functions-framework-python
that referenced
this issue
Apr 1, 2022
anniefu
added a commit
that referenced
this issue
May 10, 2022
* fix: Add functools.wraps decorator (#178) To make sure function attributes are copied to `_http_view_func_wrapper` Co-authored-by: Annie Fu <16651409+anniefu@users.noreply.github.com>
Fixed with #179 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For example when using Flask-Talisman you can specify per-view options using:
Talisman will decorate the view function with a
talisman_view_options
attribute which is retrieved later like this:Adding
functools.wraps
makes sure all function attributes are copied from the original function to the_http_view_func_wrapper
.Will create a pull request for this in a minute.
The text was updated successfully, but these errors were encountered: