Skip to content

Commit 31cd934

Browse files
docs: from_parent - add minimal before/after example
fixup: fix from_parent version
1 parent 13e5dc9 commit 31cd934

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

doc/en/deprecations.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,15 @@ display captured output when tests fail: ``no``, ``stdout``, ``stderr``, ``log``
3737
Node Construction changed to ``Node.from_parent``
3838
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3939

40-
.. deprecated:: 5.3
40+
.. deprecated:: 5.4
4141

4242
The construction of nodes new should use the named constructor ``from_parent``.
4343
This limitation in api surface intends to enable better/simpler refactoring of the collection tree.
4444

45+
This means that instead of :code:``MyItem(name="foo", parent=collector, obj=42)``
46+
one now has to invoke :code:``MyItem.from_parent(collector, name="foo")``.
47+
48+
4549

4650
``junit_family`` default value change to "xunit2"
4751
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)