| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Thanks, however the hitch here is that @deprecated also emits a runtime warning, so with this we will be emitting 2 runtime deprecation warnings. You could say, let's remove the existing runtime deprecation, the problem with that is that our compat for Python < 3.13 doesn't emit a runtime warning. This has been fine so far since we only use @deprecated under TYPE_CHECKING, but here it's not.
So either
Sorry, something went wrong.
|
|
||
|
|
||
| @deprecated( | ||
| "pytest.yield_fixture is deprecated, use pytest.fixture to access configuration values instead.", |
There was a problem hiding this comment.
Let's use the same text as the existing runtime deprecation.
| "pytest.yield_fixture is deprecated, use pytest.fixture to access configuration values instead.", | |
| "@pytest.yield_fixture is deprecated. Use @pytest.fixture instead; they are the same.", |
Sorry, something went wrong.
|
thanks for your response!
sure, happy to do this! |
Sorry, something went wrong.
|
I'd go for (trivial) option 4: Pass category=None into warnings.deprecated() so that it doesn't show a runtime warning, and keep our own. I think there is a lot of value in having deprecations visible statically, so I opened #14342 to that effect. Thanks @MarcoGorelli for getting the ball rolling! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
yield_fixtureis deprecated, is it ok to use thedeprecated` decorator on it?
pytest/src/_pytest/fixtures.py
Lines 1434 to 1435 in 959cd47