Skip to content

Commit 0db1ff0

Browse files
committed
doc: document {Code,TracebackEntry}.path changes as breaking
Closes pytest-dev#9423.
1 parent 69da199 commit 0db1ff0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

doc/en/changelog.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,12 @@ Deprecations
173173
This was changed for consistency with :func:`pytest.mark.skip <pytest.mark.skip>` and :func:`pytest.mark.xfail <pytest.mark.xfail>` which both accept
174174
``reason`` as an argument.
175175

176+
- `#8174 <https://github.com/pytest-dev/pytest/issues/8174>`_: The following changes have been made to types reachable through :attr:`pytest.ExceptionInfo.traceback`:
177+
178+
- The ``path`` property of ``_pytest.code.Code`` returns ``Path`` instead of ``py.path.local``.
179+
- The ``path`` property of ``_pytest.code.TracebackEntry`` returns ``Path`` instead of ``py.path.local``.
180+
181+
There was no deprecation period for this change (sorry!).
176182

177183

178184
Features
@@ -473,10 +479,9 @@ Trivial/Internal Changes
473479

474480
- `#8174 <https://github.com/pytest-dev/pytest/issues/8174>`_: The following changes have been made to internal pytest types/functions:
475481

476-
- The ``path`` property of ``_pytest.code.Code`` returns ``Path`` instead of ``py.path.local``.
477-
- The ``path`` property of ``_pytest.code.TracebackEntry`` returns ``Path`` instead of ``py.path.local``.
478482
- The ``_pytest.code.getfslineno()`` function returns ``Path`` instead of ``py.path.local``.
479483
- The ``_pytest.python.path_matches_patterns()`` function takes ``Path`` instead of ``py.path.local``.
484+
- The ``_pytest._code.Traceback.cut()`` function accepts any ``os.PathLike[str]``, not just ``py.path.local``.
480485

481486

482487
- `#8248 <https://github.com/pytest-dev/pytest/issues/8248>`_: Internal Restructure: let ``python.PyObjMixin`` inherit from ``nodes.Node`` to carry over typing information.

0 commit comments

Comments
 (0)