Skip to content

Commit f7e804c

Browse files
docs: from_parent - add minimal before/after example
1 parent c4b6c93 commit f7e804c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/en/deprecations.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ Node Construction changed to ``Node.from_parent``
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)