From e42bc33bd649cfd57c7c33411f5b3a48bce29893 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 25 Mar 2025 12:54:12 -0400 Subject: [PATCH] Move bp to-match-comments on same line for py3.13 In the `examples/debugging/restore_builtin_breakpoint.py` i had put the pattern-comment lines on the line following the `breakpoint()` bc it seems that's where `pdb` would always "stop" and print the line to console? So the test would only pass by actually ensuring that in the `pexpect` capture.. Now on 3.13 it seems that the `pdb` line halting must have been fixed; it now renders to console the same `breakpoint()` line? Anyway it works as you'd expect now but **only** on 3.13 so after this change we might have to adjust the tests to `pytest.xfail()` on earlier versions. --- examples/debugging/restore_builtin_breakpoint.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/debugging/restore_builtin_breakpoint.py b/examples/debugging/restore_builtin_breakpoint.py index 89605075..b591b0f7 100644 --- a/examples/debugging/restore_builtin_breakpoint.py +++ b/examples/debugging/restore_builtin_breakpoint.py @@ -32,8 +32,7 @@ async def main() -> None: f'$PYTHONOBREAKPOINT: {pybp_var!r}\n' f'`sys.breakpointhook`: {pybp_hook!r}\n' ) - breakpoint() - pass # first bp, tractor hook set. + breakpoint() # first bp, tractor hook set. # XXX AFTER EXIT (of actor-runtime) verify the hook is unset.. # @@ -43,8 +42,7 @@ async def main() -> None: assert sys.breakpointhook # now ensure a regular builtin pause still works - breakpoint() - pass # last bp, stdlib hook restored + breakpoint() # last bp, stdlib hook restored if __name__ == '__main__':