Skip to content

Commit b4f0350

Browse files
authored
Merge branch 'main' into python3.14
2 parents f1f8e58 + 29495bd commit b4f0350

File tree

4 files changed

+35
-4
lines changed

4 files changed

+35
-4
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ repos:
2525
- id: python-no-log-warn
2626
- id: text-unicode-replacement-char
2727
- repo: https://github.com/astral-sh/ruff-pre-commit
28-
rev: v0.14.2
28+
rev: v0.14.5
2929
hooks:
3030
- id: ruff-format
3131
- id: ruff-check
3232
- repo: https://github.com/astral-sh/uv-pre-commit
33-
rev: 0.9.6
33+
rev: 0.9.9
3434
hooks:
3535
- id: uv-lock
3636
- repo: https://github.com/executablebooks/mdformat
@@ -54,7 +54,7 @@ repos:
5454
]
5555
files: (docs/.)
5656
- repo: https://github.com/kynan/nbstripout
57-
rev: 0.8.1
57+
rev: 0.8.2
5858
hooks:
5959
- id: nbstripout
6060
exclude: (docs)

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ chronological order. Releases follow [semantic versioning](https://semver.org/)
55
releases are available on [PyPI](https://pypi.org/project/pytask) and
66
[Anaconda.org](https://anaconda.org/conda-forge/pytask).
77

8+
## Unreleased
9+
10+
- {pull}`725` fixes the pickle node hash test by accounting for Python 3.14's
11+
default pickle protocol.
12+
- {pull}`???` adapts the interactive debugger integration to Python 3.14's
13+
updated `pdb` behaviour and keeps pytest-style capturing intact.
14+
815
## 0.5.7 - 2025-11-22
916

1017
- {pull}`721` clarifies the documentation on repeated tasks in notebooks.

tests/test_debugging.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ def task_1():
182182

183183
child = pexpect.spawn(f"pytask {tmp_path.as_posix()}")
184184
child.expect(r"task_1\(\)")
185+
child.expect("Pdb")
186+
child.sendline("n")
185187
child.expect("i == 1")
186188
child.expect("Pdb")
187189
child.sendline("c")
@@ -294,11 +296,15 @@ def task_1():
294296
child = pexpect.spawn(f"pytask {tmp_path.as_posix()}")
295297
child.expect(["PDB", "set_trace", r"\(IO-capturing", "turned", r"off\)"])
296298
child.expect("task_1")
299+
child.expect("Pdb")
300+
child.sendline("n")
297301
child.expect("x = 3")
298302
child.expect("Pdb")
299303
child.sendline("c")
300304
child.expect(["PDB", "continue", r"\(IO-capturing", r"resumed\)"])
301305
child.expect(["PDB", "set_trace", r"\(IO-capturing", "turned", r"off\)"])
306+
child.expect("Pdb")
307+
child.sendline("n")
302308
child.expect("x = 4")
303309
child.expect("Pdb")
304310
child.sendline("c")
@@ -339,6 +345,15 @@ def do_debug(self, arg):
339345
340346
do_debug.__doc__ = pdb.Pdb.do_debug.__doc__
341347
348+
if hasattr(pdb.Pdb, "_create_recursive_debugger"):
349+
350+
def _create_recursive_debugger(self):
351+
return self.__class__(
352+
self.completekey,
353+
self.stdin,
354+
self.stdout,
355+
)
356+
342357
def do_continue(self, *args, **kwargs):
343358
global count_continue
344359
count_continue += 1

tests/test_nodes.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

33
import pickle
4+
import sys
45
from pathlib import Path
56

67
import cloudpickle
@@ -94,7 +95,15 @@ def test_hash_of_path_node(tmp_path, value, exists, expected):
9495
("value", "exists", "expected"),
9596
[
9697
("0", False, None),
97-
("0", True, "2e81f502b7a28f824c4f1451c946b952eebe65a8521925ef8f6135ef6f422e8e"),
98+
# Python 3.14+ uses pickle protocol 5 by default, which produces different
99+
# hashes
100+
(
101+
"0",
102+
True,
103+
"1973e23848344dc43a988a9b478663803cfffe1243480253f9a3cf004b14aa7c"
104+
if sys.version_info >= (3, 14)
105+
else "2e81f502b7a28f824c4f1451c946b952eebe65a8521925ef8f6135ef6f422e8e",
106+
),
98107
],
99108
)
100109
def test_hash_of_pickle_node(tmp_path, value, exists, expected):

0 commit comments

Comments
 (0)