Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ releases are available on [PyPI](https://pypi.org/project/pytask) and

- {pull}`725` fixes the pickle node hash test by accounting for Python 3.14's
default pickle protocol.
- {pull}`???` adapts the interactive debugger integration to Python 3.14's
updated `pdb` behaviour and keeps pytest-style capturing intact.

## 0.5.7 - 2025-11-22

Expand Down
15 changes: 15 additions & 0 deletions tests/test_debugging.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ def task_1():

child = pexpect.spawn(f"pytask {tmp_path.as_posix()}")
child.expect(r"task_1\(\)")
child.expect("Pdb")
child.sendline("n")
child.expect("i == 1")
child.expect("Pdb")
child.sendline("c")
Expand Down Expand Up @@ -294,11 +296,15 @@ def task_1():
child = pexpect.spawn(f"pytask {tmp_path.as_posix()}")
child.expect(["PDB", "set_trace", r"\(IO-capturing", "turned", r"off\)"])
child.expect("task_1")
child.expect("Pdb")
child.sendline("n")
child.expect("x = 3")
child.expect("Pdb")
child.sendline("c")
child.expect(["PDB", "continue", r"\(IO-capturing", r"resumed\)"])
child.expect(["PDB", "set_trace", r"\(IO-capturing", "turned", r"off\)"])
child.expect("Pdb")
child.sendline("n")
child.expect("x = 4")
child.expect("Pdb")
child.sendline("c")
Expand Down Expand Up @@ -339,6 +345,15 @@ def do_debug(self, arg):

do_debug.__doc__ = pdb.Pdb.do_debug.__doc__

if hasattr(pdb.Pdb, "_create_recursive_debugger"):

def _create_recursive_debugger(self):
return self.__class__(
self.completekey,
self.stdin,
self.stdout,
)

def do_continue(self, *args, **kwargs):
global count_continue
count_continue += 1
Expand Down