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

Make middleware expose more wrapped attributes #1202

Merged
merged 4 commits into from Mar 9, 2022

Conversation

MattFisher
Copy link
Contributor

Include name, module, qualname, doc, annotations
Addresses #1145

Include __name__, __module__, __qualname__, __doc__, __annotations__
Addresses getsentry#1145
@github-actions
Copy link

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@sl0thentr0py sl0thentr0py marked this pull request as ready for review March 9, 2022 13:29
@sl0thentr0py
Copy link
Member

@MattFisher py2.7 fails because you can't set __doc__ on classes. See this discussion on how functools.wraps is for functions so all the attributes don't work the same for class wrapping.

I'm removing __doc__ and __annotations__ and keeping the others in.

@sl0thentr0py sl0thentr0py merged commit c405136 into getsentry:master Mar 9, 2022
@DmytroLitvinov
Copy link

Hi @sl0thentr0py ,
Maybe we should add checking for Python2 & Python3 and add __doc__, __annotations__ for Py3?

@sl0thentr0py
Copy link
Member

sl0thentr0py commented Mar 9, 2022

As far as I understand from this table annotations don't make sense for a class anyway and __doc__ is nice to have I guess, but I'd prefer not to add another version check for it, sorry!

Either way, __module__ and __qualname__ should fix the linked issue.

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

Successfully merging this pull request may close these issues.

None yet

3 participants