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

retry: wrapping plain functions fails on Python 2.7 #36

Closed
tseaver opened this issue Jun 25, 2021 · 0 comments · Fixed by #37
Closed

retry: wrapping plain functions fails on Python 2.7 #36

tseaver opened this issue Jun 25, 2021 · 0 comments · Fixed by #37
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@tseaver
Copy link
Contributor

tseaver commented Jun 25, 2021

functools.wraps loses metadata under Python 2.7, and therefore breaks pytest fixture injection. See also pytest-dev/pytest#2782, which recommends using six.wraps instead under Python 2.7.

@tseaver tseaver added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Jun 25, 2021
@tseaver tseaver self-assigned this Jun 25, 2021
tseaver added a commit that referenced this issue Jun 25, 2021
'six.wraps' preserves metdata better under Python 2.7, which makes
stuff like pytest fixture injection work with plain functions.

Closes #36.
tseaver added a commit to googleapis/python-storage that referenced this issue Jun 25, 2021
busunkim96 pushed a commit that referenced this issue Jun 29, 2021
'six.wraps' preserves metdata better under Python 2.7, which makes
stuff like pytest fixture injection work with plain functions.

Closes #36.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant