It's been deprecated since pytest>=2.10. See https://docs.pytest.org/en/latest/historical-notes.html#pytest-yield-fixture-decorator