-
Type:
Build Failure
-
Resolution: Done
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Python Drivers
-
None
-
None
-
None
-
None
-
None
-
None
Name of Failure:
test.asynchronous.test_custom_types.TestBSONCustomTypeEncoderAndFallbackEncoderTandem.test_infinite_loop_exceeds_max_recursion_depth
Link to task:
Context of when and why the failure occurred:
Possibly a 3.13 change? The entire stack trace is within CPython code at cleanup time.
Stack trace:
[2025/04/08 10:02:14.933] FAILURE: pytest.PytestUnraisableExceptionWarning: Exception ignored in: <function WeakValueDictionary.__init__.<locals>.remove at 0x7f470b9d6660> [2025/04/08 10:02:14.933] Traceback (most recent call last): [2025/04/08 10:02:14.933] File "/opt/python/3.13/lib/python3.13/weakref.py", line 113, in remove [2025/04/08 10:02:14.933] _atomic_removal(self.data, wr.key) [2025/04/08 10:02:14.933] ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^ [2025/04/08 10:02:14.933] RecursionError: maximum recursion depth exceeded () [2025/04/08 10:02:14.933] cls = <class '_pytest.runner.CallInfo'> [2025/04/08 10:02:14.933] func = <function call_and_report.<locals>.<lambda> at 0x7f46ecd8c0e0> [2025/04/08 10:02:14.933] when = 'call' [2025/04/08 10:02:14.933] reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>) [2025/04/08 10:02:14.933] @classmethod [2025/04/08 10:02:14.933] def from_call( [2025/04/08 10:02:14.933] cls, [2025/04/08 10:02:14.933] func: Callable[[], TResult], [2025/04/08 10:02:14.933] when: Literal["collect", "setup", "call", "teardown"], [2025/04/08 10:02:14.933] reraise: type[BaseException] | tuple[type[BaseException], ...] | None = None, [2025/04/08 10:02:14.933] ) -> CallInfo[TResult]: [2025/04/08 10:02:14.933] """Call func, wrapping the result in a CallInfo. [2025/04/08 10:02:14.933] [2025/04/08 10:02:14.933] :param func: [2025/04/08 10:02:14.933] The function to call. Called without arguments. [2025/04/08 10:02:14.933] :type func: Callable[[], _pytest.runner.TResult] [2025/04/08 10:02:14.933] :param when: [2025/04/08 10:02:14.933] The phase in which the function is called. [2025/04/08 10:02:14.933] :param reraise: [2025/04/08 10:02:14.933] Exception or exceptions that shall propagate if raised by the [2025/04/08 10:02:14.933] function, instead of being wrapped in the CallInfo. [2025/04/08 10:02:14.933] """ [2025/04/08 10:02:14.933] excinfo = None [2025/04/08 10:02:14.933] start = timing.time() [2025/04/08 10:02:14.933] precise_start = timing.perf_counter() [2025/04/08 10:02:14.933] try: [2025/04/08 10:02:14.933] > result: TResult | None = func() [2025/04/08 10:02:14.933] .venv/lib/python3.13/site-packages/_pytest/runner.py:341: [2025/04/08 10:02:14.933] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [2025/04/08 10:02:14.933] .venv/lib/python3.13/site-packages/_pytest/runner.py:242: in <lambda> [2025/04/08 10:02:14.933] lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise [2025/04/08 10:02:14.933] .venv/lib/python3.13/site-packages/pluggy/_hooks.py:513: in __call__ [2025/04/08 10:02:14.933] return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) [2025/04/08 10:02:14.933] .venv/lib/python3.13/site-packages/pluggy/_manager.py:120: in _hookexec [2025/04/08 10:02:14.933] return self._inner_hookexec(hook_name, methods, kwargs, firstresult) [2025/04/08 10:02:14.933] .venv/lib/python3.13/site-packages/_pytest/threadexception.py:92: in pytest_runtest_call [2025/04/08 10:02:14.933] yield from thread_exception_runtest_hook() [2025/04/08 10:02:14.933] .venv/lib/python3.13/site-packages/_pytest/threadexception.py:68: in thread_exception_runtest_hook [2025/04/08 10:02:14.933] yield [2025/04/08 10:02:14.933] .venv/lib/python3.13/site-packages/_pytest/unraisableexception.py:95: in pytest_runtest_call [2025/04/08 10:02:14.933] yield from unraisable_exception_runtest_hook() [2025/04/08 10:02:14.933] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [2025/04/08 10:02:14.933] def unraisable_exception_runtest_hook() -> Generator[None]: [2025/04/08 10:02:14.933] with catch_unraisable_exception() as cm: [2025/04/08 10:02:14.933] try: [2025/04/08 10:02:14.933] yield [2025/04/08 10:02:14.933] finally: [2025/04/08 10:02:14.933] if cm.unraisable: [2025/04/08 10:02:14.933] if cm.unraisable.err_msg is not None: [2025/04/08 10:02:14.933] err_msg = cm.unraisable.err_msg [2025/04/08 10:02:14.933] else: [2025/04/08 10:02:14.933] err_msg = "Exception ignored in" [2025/04/08 10:02:14.933] msg = f"{err_msg}: {cm.unraisable.object!r}\n\n" [2025/04/08 10:02:14.933] msg += "".join( [2025/04/08 10:02:14.933] traceback.format_exception( [2025/04/08 10:02:14.933] cm.unraisable.exc_type, [2025/04/08 10:02:14.933] cm.unraisable.exc_value, [2025/04/08 10:02:14.933] cm.unraisable.exc_traceback, [2025/04/08 10:02:14.933] ) [2025/04/08 10:02:14.933] ) [2025/04/08 10:02:14.933] > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) [2025/04/08 10:02:14.933] E pytest.PytestUnraisableExceptionWarning: Exception ignored in: <function WeakValueDictionary.__init__.<locals>.remove at 0x7f470b9d6660> [2025/04/08 10:02:14.933] E [2025/04/08 10:02:14.933] E Traceback (most recent call last): [2025/04/08 10:02:14.933] E File "/opt/python/3.13/lib/python3.13/weakref.py", line 113, in remove [2025/04/08 10:02:14.933] E _atomic_removal(self.data, wr.key) [2025/04/08 10:02:14.933] E ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^ [2025/04/08 10:02:14.933] E RecursionError: maximum recursion depth exceeded [2025/04/08 10:02:14.933] .venv/lib/python3.13/site-packages/_pytest/unraisableexception.py:85: PytestUnraisableExceptionWarning