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
* Remove changelog entry for #8251
Reverted in #8903
* Move #9202 changelog to to trivial
This won't concern users of pytest
* Streamline deprecation changelogs/docs
* Remove #8994 changelog
This is an impovement for a warning introduced in this release, so including it in a changelog against the last release seems confusing.
* Remove #9241 changelog
This is an impovement for a doc update introduced in this release, so including it in a changelog against the last release seems confusing. The issue number also seems about something different.
* Remove #8897 changelog
Empty file...
* Various minor changelog fixes
Copy file name to clipboardExpand all lines: changelog/7259.breaking.rst
+1
Original file line number
Diff line number
Diff line change
@@ -5,4 +5,5 @@ Since `py.path.local` is a `os.PathLike[str]`, these plugins are unaffacted.
5
5
6
6
Plugins and users which call `reportinfo()`, use the first return value and interact with it as a `py.path.local`, would need to adjust by calling `py.path.local(fspath)`.
7
7
Although preferably, avoid the legacy `py.path.local` and use `pathlib.Path`, or use `item.location` or `item.path`, instead.
8
+
8
9
Note: pytest was not able to provide a deprecation period for this change.
Defining a custom pytest node type which is both an :class:`pytest.Item <Item>` and a :class:`pytest.Collector <Collector>` now issues a warning.
1
+
Defining a custom pytest node type which is both an :class:`pytest.Item <Item>` and a :class:`pytest.Collector <Collector>` (e.g. :class:`pytest.File <File>`) now issues a warning.
2
2
It was never sanely supported and triggers hard to debug errors.
3
3
4
-
Instead, a separate collector node should be used, which collects the item. See :ref:`non-python tests` for an example.
4
+
See :ref:`the deprecation note <diamond-inheritance-deprecated>` for full details.
:func:`pytest_cmdline_preparse <_pytest.hookspec.pytest_cmdline_preparse>` has been officially deprecated. It will be removed in a future release. Use :func:`pytest_load_initial_conftests <_pytest.hookspec.pytest_load_initial_conftests>` instead.
2
+
3
+
See :ref:`the deprecation note <cmdline-preparse-deprecated>` for full details.
Upgrade readthedocs configuration to use a [newer Ubuntu version](https://blog.readthedocs.com/new-build-specification/) with better unicode support for PDF docs.
1
+
Upgrade readthedocs configuration to use a `newer Ubuntu version <https://blog.readthedocs.com/new-build-specification/>`__` with better unicode support for PDF docs.
Copy file name to clipboardExpand all lines: doc/en/deprecations.rst
+39-8
Original file line number
Diff line number
Diff line change
@@ -55,6 +55,26 @@ In order to support the transition from ``py.path.local`` to :mod:`pathlib`, the
55
55
56
56
The accompanying ``py.path.local`` based paths have been deprecated: plugins which manually invoke those hooks should only pass the new ``pathlib.Path`` arguments, and users should change their hook implementations to use the new ``pathlib.Path`` arguments.
57
57
58
+
Directly constructing internal classes
59
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60
+
61
+
.. deprecated:: 7.0
62
+
63
+
Directly constructing the following classes is now deprecated:
64
+
65
+
- ``_pytest.mark.structures.Mark``
66
+
- ``_pytest.mark.structures.MarkDecorator``
67
+
- ``_pytest.mark.structures.MarkGenerator``
68
+
- ``_pytest.python.Metafunc``
69
+
- ``_pytest.runner.CallInfo``
70
+
- ``_pytest._code.ExceptionInfo``
71
+
- ``_pytest.config.argparsing.Parser``
72
+
- ``_pytest.config.argparsing.OptionGroup``
73
+
- ``_pytest.pytester.HookRecorder``
74
+
75
+
These constructors have always been considered private, but now issue a deprecation warning, which may become a hard error in pytest 8.
76
+
77
+
.. _cmdline-preparse-deprecated:
58
78
59
79
Passing ``msg=`` to ``pytest.skip``, ``pytest.fail`` or ``pytest.exit``
Inheriting from both Item and file at once has never been supported officially,
120
-
however some plugins providing linting/code analysis have been using this as a hack.
121
-
122
-
This practice is now officially deprecated and a common way to fix this is `example pr fixing inheritance`_.
123
-
140
+
Defining a custom pytest node type which is both an :class:`pytest.Item <Item>` and a :class:`pytest.Collector <Collector>` (e.g. :class:`pytest.File <File>`) now issues a warning.
141
+
It was never sanely supported and triggers hard to debug errors.
124
142
143
+
Some plugins providing linting/code analysis have been using this as a hack.
144
+
Instead, a separate collector node should be used, which collects the item. See
145
+
:ref:`non-python tests` for an example, as well as an `example pr fixing inheritance`_.
0 commit comments