Fix race between adapter connection publication and session attachment - #2049
Merged
Azure Pipelines / debugpy-test
failed
Jul 24, 2026 in 41m 45s
Build #20260723.2 had test failures
Details
- Failed: 1 (0.00%)
- Passed: 17,300 (81.56%)
- Other: 3,910 (18.43%)
- Total: 21,211
Annotations
Check failure on line 1889 in Build log
azure-pipelines / debugpy-test
Build log #L1889
PowerShell exited with code '1'.
azure-pipelines / debugpy-test
test_systemexit[1-zero--raised-launch(console=integratedTerminal)-program]
failed on teardown with "KeyError: <_pytest.stash.StashKey object at 0x0000026180462720>"
Raw output
cls = <class '_pytest.runner.CallInfo'>
func = <function call_and_report.<locals>.<lambda> at 0x00000261826BED40>
when = 'teardown'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
@classmethod
def from_call(
cls,
func: Callable[[], TResult],
when: Literal["collect", "setup", "call", "teardown"],
reraise: type[BaseException] | tuple[type[BaseException], ...] | None = None,
) -> CallInfo[TResult]:
"""Call func, wrapping the result in a CallInfo.
:param func:
The function to call. Called without arguments.
:type func: Callable[[], _pytest.runner.TResult]
:param when:
The phase in which the function is called.
:param reraise:
Exception or exceptions that shall propagate if raised by the
function, instead of being wrapped in the CallInfo.
"""
excinfo = None
instant = timing.Instant()
try:
> result: TResult | None = func()
^^^^^^
.tox\py312\Lib\site-packages\_pytest\runner.py:361:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox\py312\Lib\site-packages\_pytest\runner.py:250: in <lambda>
lambda: runtest_hook(item=item, **kwds),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox\py312\Lib\site-packages\pluggy\_hooks.py:512: in __call__
return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox\py312\Lib\site-packages\pluggy\_manager.py:120: in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox\py312\Lib\site-packages\_pytest\logging.py:873: in pytest_runtest_teardown
yield
.tox\py312\Lib\site-packages\_pytest\capture.py:905: in pytest_runtest_teardown
return (yield)
^^^^^
.tox\py312\Lib\site-packages\_pytest\runner.py:199: in pytest_runtest_teardown
item.session._setupstate.teardown_exact(nextitem)
.tox\py312\Lib\site-packages\_pytest\runner.py:579: in teardown_exact
raise exceptions[0]
.tox\py312\Lib\site-packages\_pytest\runner.py:568: in teardown_exact
fin()
.tox\py312\Lib\site-packages\_pytest\fixtures.py:1166: in finish
raise exceptions[0]
.tox\py312\Lib\site-packages\_pytest\fixtures.py:1156: in finish
fin()
.tox\py312\Lib\site-packages\_pytest\fixtures.py:1014: in _teardown_yield_fixture
next(it)
.tox\py312\Lib\site-packages\_pytest\tmpdir.py:305: in tmp_path
result_dict = request.node.stash[tmppath_result_key]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.stash.Stash object at 0x00000261823A6AA0>
key = <_pytest.stash.StashKey object at 0x0000026180462720>
def __getitem__(self, key: StashKey[T]) -> T:
"""Get the value for key.
Raises ``KeyError`` if the key wasn't set before.
"""
> return cast(T, self._storage[key])
^^^^^^^^^^^^^^^^^^
E KeyError: <_pytest.stash.StashKey object at 0x0000026180462720>
.tox\py312\Lib\site-packages\_pytest\stash.py:84: KeyError
Loading