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

PyStdIsDeprecatedWarning doesnt show the caller line #227

Closed
jayvdb opened this issue Dec 21, 2019 · 1 comment
Closed

PyStdIsDeprecatedWarning doesnt show the caller line #227

jayvdb opened this issue Dec 21, 2019 · 1 comment

Comments

@jayvdb
Copy link
Contributor

jayvdb commented Dec 21, 2019

The output of this is like:

/usr/lib/python3.7/site-packages/py/_std.py:19: PyStdIsDeprecatedWarning: py.std is deprecated, plase import _pytestfixturefunction directly
  category=PyStdIsDeprecatedWarning)

It should instead show the line of the caller, not the line of the warning invocation.

@jayvdb
Copy link
Contributor Author

jayvdb commented Dec 21, 2019

Worth noting that I am currently seeing it occurring at
https://github.com/pytest-dev/pytest/blob/e3ac44d/src/_pytest/fixtures.py#L173

jayvdb added a commit to jayvdb/py that referenced this issue Dec 21, 2019
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

1 participant