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
Running against the current pytest main branch results in:
File "/__w/qutebrowser/qutebrowser/.tox/bleeding-qt5/lib/python3.11/site-packages/pytest_bdd/__init__.py", line 4, in <module>
from pytest_bdd.scenario import scenario, scenarios
File "/__w/qutebrowser/qutebrowser/.tox/bleeding-qt5/lib/python3.11/site-packages/_pytest/assertion/rewrite.py", line 175, in exec_moduleexec(co, module.__dict__)
File "/__w/qutebrowser/qutebrowser/.tox/bleeding-qt5/lib/python3.11/site-packages/pytest_bdd/scenario.py", line 23, in <module>from _pytest.nodes import iterparentnodeids
ImportError: cannot import name 'iterparentnodeids' from '_pytest.nodes' (/__w/qutebrowser/qutebrowser/.tox/bleeding-qt5/lib/python3.11/site-packages/_pytest/nodes.py)
The _pytest.nodes.iterparentnodeids() function is removed without replacement. Prefer to traverse the node hierarchy itself instead. If you really need to, copy the function from the previous pytest release.
Relevant code from before it was removed (with SEP = "/"):
defiterparentnodeids(nodeid: str) ->Iterator[str]:
"""Return the parent node IDs of a given node ID, inclusive. For the node ID "testing/code/test_excinfo.py::TestFormattedExcinfo::test_repr_source" the result would be "" "testing" "testing/code" "testing/code/test_excinfo.py" "testing/code/test_excinfo.py::TestFormattedExcinfo" "testing/code/test_excinfo.py::TestFormattedExcinfo::test_repr_source" Note that / components are only considered until the first ::. """pos=0first_colons: Optional[int] =nodeid.find("::")
iffirst_colons==-1:
first_colons=None# The root Session node - always present.yield""# Eagerly consume SEP parts until first colons.whileTrue:
at=nodeid.find(SEP, pos, first_colons)
ifat==-1:
breakifat>0:
yieldnodeid[:at]
pos=at+len(SEP)
# Eagerly consume :: parts.whileTrue:
at=nodeid.find("::", pos)
ifat==-1:
breakifat>0:
yieldnodeid[:at]
pos=at+len("::")
# The node ID itself.ifnodeid:
yieldnodeid
The text was updated successfully, but these errors were encountered:
Running against the current pytest main branch results in:
due to:
Relevant changelog entry:
Relevant code from before it was removed (with
SEP = "/"
):The text was updated successfully, but these errors were encountered: