You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/en/deprecations.rst
+18-17Lines changed: 18 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -367,23 +367,6 @@ conflicts (such as :class:`pytest.File` now taking ``path`` instead of
367
367
``fspath``, as :ref:`outlined above <node-ctor-fspath-deprecation>`), a
368
368
deprecation warning is now raised.
369
369
370
-
Applying a mark to a fixture function
371
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
372
-
373
-
.. deprecated:: 7.4
374
-
375
-
Applying a mark to a fixture function never had any effect, but it is a common user error.
376
-
377
-
.. code-block:: python
378
-
379
-
@pytest.mark.usefixtures("clean_database")
380
-
@pytest.fixture
381
-
defuser() -> User: ...
382
-
383
-
Users expected in this case that the ``usefixtures`` mark would have its intended effect of using the ``clean_database`` fixture when ``user`` was invoked, when in fact it has no effect at all.
384
-
385
-
Now pytest will issue a warning when it encounters this problem, and will raise an error in the future versions.
386
-
387
370
388
371
The ``yield_fixture`` function/decorator
389
372
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -403,6 +386,24 @@ an appropriate period of deprecation has passed.
403
386
404
387
Some breaking changes which could not be deprecated are also listed.
405
388
389
+
Applying a mark to a fixture function
390
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
391
+
392
+
.. deprecated:: 7.4
393
+
.. versionremoved:: 9.0
394
+
395
+
Applying a mark to a fixture function never had any effect, but it is a common user error.
396
+
397
+
.. code-block:: python
398
+
399
+
@pytest.mark.usefixtures("clean_database")
400
+
@pytest.fixture
401
+
defuser() -> User: ...
402
+
403
+
Users expected in this case that the ``usefixtures`` mark would have its intended effect of using the ``clean_database`` fixture when ``user`` was invoked, when in fact it has no effect at all.
404
+
405
+
Now pytest will issue a warning when it encounters this problem, and will raise an error in the future versions.
406
+
406
407
.. _legacy-path-hooks-deprecated:
407
408
408
409
``py.path.local`` arguments for hooks replaced with ``pathlib.Path``
0 commit comments