nodes: keep plugins which subclass Item, File working for a bit more (#9279)

* nodes: keep plugins which subclass Item, File working for a bit more

Fix #8435.

* Update src/_pytest/nodes.py

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>

Co-authored-by: Florian Bruhin <me@the-compiler.org>
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
This commit is contained in:
Ran Benita
2021-11-08 16:51:04 +02:00
committed by GitHub
parent eb6c4493b2
commit f87df9c52e
2 changed files with 7 additions and 3 deletions

View File

@@ -669,9 +669,13 @@ class Item(Node):
nodeid: Optional[str] = None,
**kw,
) -> None:
# The first two arguments are intentionally passed positionally,
# to keep plugins who define a node type which inherits from
# (pytest.Item, pytest.File) working (see issue #8435).
# They can be made kwargs when the deprecation above is done.
super().__init__(
name=name,
parent=parent,
name,
parent,
config=config,
session=session,
nodeid=nodeid,