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

replace subclassing of wrapt wrappers by using a partial #164

Closed
wants to merge 1 commit into from

Conversation

beniwohli
Copy link
Contributor

We need to pass along the method and module names to the function
wrapper. This has so far been done by subclassing wrapt.FunctionWrapper.
While this works, it adds a lot of duplicate code that we need to sync
up every time we update wrapt. Using a partial should mean much less
maintenance work.

@beniwohli beniwohli force-pushed the remove-wrapt-subclasses branch 5 times, most recently from dbe3675 to 2d9e80f Compare February 20, 2018 13:59
@beniwohli
Copy link
Contributor Author

pypy tests fail because somehow this change introduces two additional frames into the captures span stack traces, but only on PyPy. No idea why...

beniwohli added a commit to beniwohli/apm-agent-python that referenced this pull request Feb 21, 2018
We need to pass along the method and module names to the function
wrapper. This has so far been done by subclassing wrapt.FunctionWrapper.
While this works, it adds a lot of duplicate code that we need to sync
up every time we update wrapt. Using a partial should mean much less
maintenance work.

closes elastic#164
We need to pass along the method and module names to the function
wrapper. This has so far been done by subclassing wrapt.FunctionWrapper.
While this works, it adds a lot of duplicate code that we need to sync
up every time we update wrapt. Using a partial should mean much less
maintenance work.

closes elastic#164
@beniwohli beniwohli closed this in a1f6079 Feb 22, 2018
beniwohli added a commit that referenced this pull request Feb 22, 2018
We need to pass along the method and module names to the function
wrapper. This has so far been done by subclassing wrapt.FunctionWrapper.
While this works, it adds a lot of duplicate code that we need to sync
up every time we update wrapt. Using a partial should mean much less
maintenance work.

closes #164
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

2 participants