Merge ~vmpyr/ubuntu/+source/python-ptrace:ubuntu/devel into ubuntu/+source/python-ptrace:ubuntu/devel

Proposed by Ujjwal Sarswat
Status: Needs review
Proposed branch: ~vmpyr/ubuntu/+source/python-ptrace:ubuntu/devel
Merge into: ubuntu/+source/python-ptrace:ubuntu/devel
Diff against target: 67 lines (+35/-1)
4 files modified
debian/changelog (+7/-0)
debian/control (+2/-1)
debian/patches/fix-linkat-regex-for-python314.patch (+25/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Ujjwal Sarswat (community) not needed Disapprove
Graham Inggs (community) Needs Information
Review via email: mp+497507@code.launchpad.net

Description of the change

The test test_link tries to regex match link() with the system call arising from os.link(). This behaviour was changed in Python 3.14 to instead use linkat(), if available [1].

This MP updates the regex to also match for linkat().

[1] https://github.com/python/cpython/commit/5a57248b22ad3b9aafcaaadae2c304a1923daeca

To post a comment you must log in.
Revision history for this message
Ujjwal Sarswat (vmpyr) wrote :

I built the package locally against resolute-proposed and the build was successful.

Revision history for this message
Graham Inggs (ginggs) wrote :

It looks like this was fixed in python-ptrace 0.9.9-0.3

review: Needs Information
Revision history for this message
Ujjwal Sarswat (vmpyr) wrote :

Confirmed, yes this has been fixed.

review: Disapprove (not needed)

Unmerged commits

0d8a869... by Ujjwal Sarswat

update maintainer

15db4f5... by Ujjwal Sarswat

changelog

e30d4be... by Ujjwal Sarswat

d/p/fix-linkat-regex-for-python314.patch: match both link and linkat (LP: #2136100)

90b0c8b... by Graham Inggs

0.9.9-0.2build1 (patches unapplied)

Imported using git-ubuntu import.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 1a52961..bf4650d 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+python-ptrace (0.9.9-0.2ubuntu1) resolute; urgency=medium
7+
8+ * d/p/fix-linkat-regex-for-python314.patch: match both link and linkat
9+ (LP: #2136100)
10+
11+ -- Ujjwal Sarswat <ujjwal.sarswat@canonical.com> Mon, 15 Dec 2025 14:52:32 +0530
12+
13 python-ptrace (0.9.9-0.2build1) resolute; urgency=medium
14
15 * No-change rebuild with Python 3.14 as supported version
16diff --git a/debian/control b/debian/control
17index 60608cf..35b06d0 100644
18--- a/debian/control
19+++ b/debian/control
20@@ -1,7 +1,8 @@
21 Source: python-ptrace
22 Section: python
23 Priority: optional
24-Maintainer: Pierre Chifflier <pollux@debian.org>
25+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
26+XSBC-Original-Maintainer: Pierre Chifflier <pollux@debian.org>
27 Build-Depends: debhelper-compat (= 13),
28 dh-python,
29 python3-all-dev,
30diff --git a/debian/patches/fix-linkat-regex-for-python314.patch b/debian/patches/fix-linkat-regex-for-python314.patch
31new file mode 100644
32index 0000000..f201345
33--- /dev/null
34+++ b/debian/patches/fix-linkat-regex-for-python314.patch
35@@ -0,0 +1,25 @@
36+Description: Fix linkat regex for Python 3.14
37+ Python 3.14 introduced calling of linkat() instead of link() from os.link(),
38+ if available on platforms (like Linux and OpenIndiana) where the
39+ system link() function does not follow symlinks.
40+ See: https://github.com/python/cpython/commit/5a57248b22ad3b9aafcaaadae2c304a1923daeca
41+Author: Ujjwal Sarswat <ujjwal.sarswat@canonical.com>, Dominik Viererbe <dominik.viererbe@canonical.com>
42+Origin: vendor
43+Bug: https://github.com/vstinner/python-ptrace/pull/91
44+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1117911
45+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/python-ptrace/+bug/2136100
46+Forwarded: not-needed, already reported
47+Last-Update: 2025-12-15
48+---
49+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
50+--- a/tests/test_strace.py
51++++ b/tests/test_strace.py
52+@@ -85,7 +85,7 @@
53+ pattern)
54+
55+ def test_link(self):
56+- pattern = br"^link\('oldpath', 'newpath'\)"
57++ pattern = br"^(link|linkat)\(.*'oldpath'.*'newpath'.*\)"
58+ if AARCH64 or RISCV:
59+ pattern = br"^linkat\(.*'oldpath'.*'newpath'.*\)"
60+ self.assert_syscall("import os; os.link('oldpath', 'newpath')",
61diff --git a/debian/patches/series b/debian/patches/series
62new file mode 100644
63index 0000000..ce365c8
64--- /dev/null
65+++ b/debian/patches/series
66@@ -0,0 +1 @@
67+fix-linkat-regex-for-python314.patch

Subscribers

People subscribed via source and target branches