15
0

Compare commits

3 Commits

Author SHA256 Message Date
236e8f9cec Accepting request 1322100 from devel:languages:python
- Update to 0.9.9:
  * Fix PROC_MAP_REGEX for three digit minor device id by @fab1ano in #73
  * Add support for RISC-V by @yuzibo in #76
  * Fix arguments of pipe/pipe2 system calls. by @jopereira in #78
  * do not raise an exception for a valid process status by @duanev in #80
  * Remove deprecated imp module by @hamarituc in #81
  * Use importlib instead of imp in setup_cptrace.py by @skitt in #83
- Drop patches, included upstream:
  * python-ptrace-pr81-importlib.patch
  * python-ptrace-pr83-importlib.patch
- Add patch support-python314.patch:
  * Support new Python 3.14 linkat.

OBS-URL: https://build.opensuse.org/request/show/1322100
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-python-ptrace?expand=0&rev=9
2025-12-11 17:39:06 +00:00
b2f258da7d - Add patch support-python314.patch:
* Support new Python 3.14 linkat.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-ptrace?expand=0&rev=22
2025-12-11 06:01:27 +00:00
8ed7a83475 - Update to 0.9.9:
* Fix PROC_MAP_REGEX for three digit minor device id by @fab1ano in #73
  * Add support for RISC-V by @yuzibo in #76
  * Fix arguments of pipe/pipe2 system calls. by @jopereira in #78
  * do not raise an exception for a valid process status by @duanev in #80
  * Remove deprecated imp module by @hamarituc in #81
  * Use importlib instead of imp in setup_cptrace.py by @skitt in #83
- Drop patches, included upstream:
  * python-ptrace-pr81-importlib.patch
  * python-ptrace-pr83-importlib.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-ptrace?expand=0&rev=21
2025-12-11 05:54:03 +00:00
7 changed files with 51 additions and 86 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b54c43e87caf02d1452d6400649822c99e8f7ca31fa3f655ea88caf85369e3d4
size 104079

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3e643a7199fdef9ee35cb3afda293951dff0b1a628fa891856fd36b1482f1d2c
size 106526

View File

@@ -1,34 +0,0 @@
From 80e0c97a84eccb8b82737cf40b9c5581c20c245f Mon Sep 17 00:00:00 2001
From: Mario Haustein <mario.haustein@hrz.tu-chemnitz.de>
Date: Sat, 16 Sep 2023 13:49:43 +0200
Subject: [PATCH] Remove deprecated `imp` module
---
setup.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/setup.py b/setup.py
index 4d6ba36..ad54f9a 100755
--- a/setup.py
+++ b/setup.py
@@ -28,7 +28,7 @@
# - git commit -a -m "post-release"
# - git push
-from imp import load_source
+import importlib.util
from os import path
try:
# setuptools supports bdist_wheel
@@ -55,7 +55,10 @@
with open('README.rst') as fp:
LONG_DESCRIPTION = fp.read()
-ptrace = load_source("version", path.join("ptrace", "version.py"))
+ptrace_spec = importlib.util.spec_from_file_location("version", path.join("ptrace", "version.py"))
+ptrace = importlib.util.module_from_spec(ptrace_spec)
+ptrace_spec.loader.exec_module(ptrace)
+
PACKAGES = {}
for name in MODULES:
PACKAGES[name] = name.replace(".", "/")

View File

@@ -1,42 +0,0 @@
From 41f5378bbf4bfa75970d5cc3f6615411cff61a6c Mon Sep 17 00:00:00 2001
From: Stephen Kitt <steve@sk2.org>
Date: Sun, 10 Dec 2023 19:07:27 +0100
Subject: [PATCH] Use importlib instead of imp in setup_cptrace.py
Signed-off-by: Stephen Kitt <steve@sk2.org>
---
setup_cptrace.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/setup_cptrace.py b/setup_cptrace.py
index 8de9d01..f06b792 100755
--- a/setup_cptrace.py
+++ b/setup_cptrace.py
@@ -1,5 +1,7 @@
#!/usr/bin/env python
+import importlib.util
+
SOURCES = ['cptrace/cptrace.c']
CLASSIFIERS = [
@@ -17,7 +19,6 @@
def main():
- from imp import load_source
from os import path
from sys import argv
@@ -29,7 +30,10 @@ def main():
cptrace_ext = Extension('cptrace', sources=SOURCES)
- cptrace = load_source("version", path.join("cptrace", "version.py"))
+ cptrace_spec = importlib.util.spec_from_file_location("version",
+ path.join("cptrace", "version.py"))
+ cptrace = importlib.util.module_from_spec(cptrace_spec)
+ cptrace_spec.loader.exec_module(cptrace)
install_options = {
"name": cptrace.PACKAGE,

View File

@@ -1,3 +1,19 @@
-------------------------------------------------------------------
Thu Dec 11 06:00:41 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Update to 0.9.9:
* Fix PROC_MAP_REGEX for three digit minor device id by @fab1ano in #73
* Add support for RISC-V by @yuzibo in #76
* Fix arguments of pipe/pipe2 system calls. by @jopereira in #78
* do not raise an exception for a valid process status by @duanev in #80
* Remove deprecated imp module by @hamarituc in #81
* Use importlib instead of imp in setup_cptrace.py by @skitt in #83
- Drop patches, included upstream:
* python-ptrace-pr81-importlib.patch
* python-ptrace-pr83-importlib.patch
- Add patch support-python314.patch:
* Support new Python 3.14 linkat.
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Mar 3 19:17:50 UTC 2024 - Ben Greiner <code@bnavigator.de> Sun Mar 3 19:17:50 UTC 2024 - Ben Greiner <code@bnavigator.de>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-python-ptrace # spec file for package python-python-ptrace
# #
# Copyright (c) 2024 SUSE LLC # Copyright (c) 2025 SUSE LLC and contributors
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
%global flavor @BUILD_FLAVOR@%{nil} %global flavor @BUILD_FLAVOR@%{nil}
%define pyversion 0.9.8 %define pyversion 0.9.9
%define cversion 0.6.1 %define cversion 0.6.1
%if "%{flavor}" == "" %if "%{flavor}" == ""
%define pkgname python-ptrace %define pkgname python-ptrace
@@ -41,13 +41,10 @@ Version: %{pkgversion}
Release: 0 Release: 0
Summary: Python binding for ptrace Summary: Python binding for ptrace
License: GPL-2.0-only License: GPL-2.0-only
Group: Development/Languages/Python
URL: https://github.com/vstinner/python-ptrace URL: https://github.com/vstinner/python-ptrace
Source: https://github.com/haypo/python-ptrace/archive/%{pyversion}.tar.gz#/python-ptrace-%{pyversion}.tar.gz Source: https://github.com/haypo/python-ptrace/archive/%{pyversion}.tar.gz#/python-ptrace-%{pyversion}.tar.gz
# PATCH-FIX-UPSTREAM - Add python-ptrace-pr81-importlib.patch gh#vstinner/python-ptrace#81 # PATCH-FIX-UPSTREAM gh#vstinner/python-ptrace#91
Patch0: https://github.com/vstinner/python-ptrace/pull/81.patch#/python-ptrace-pr81-importlib.patch Patch0: support-python314.patch
# PATCH-FIX-UPSTREAM - Add python-ptrace-pr83-importlib.patch gh#vstinner/python-ptrace#83
Patch1: https://github.com/vstinner/python-ptrace/pull/83.patch#/python-ptrace-pr83-importlib.patch
%if "%{flavor}" == "cptrace" %if "%{flavor}" == "cptrace"
BuildRequires: %{python_module devel} BuildRequires: %{python_module devel}
%else %else

28
support-python314.patch Normal file
View File

@@ -0,0 +1,28 @@
From 324404a3d7ca7d329f1595f2520e779412d6fa98 Mon Sep 17 00:00:00 2001
From: Stefano Rivera <stefano@rivera.za.net>
Date: Sat, 11 Oct 2025 15:36:41 +0200
Subject: [PATCH] Add support for Python 3.14
Python 3.14 now uses linkat() if it's available
https://github.com/python/cpython/issues/81793
I'm not quite sure why the ARM64 and RISC-V versions were using
linkat() there, previously, but that doesn't seem relevant to this
change :)
---
tests/test_strace.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/test_strace.py b/tests/test_strace.py
index 2020a3b..89f77b6 100755
--- a/tests/test_strace.py
+++ b/tests/test_strace.py
@@ -86,7 +86,7 @@ def test_rename(self):
def test_link(self):
pattern = br"^link\('oldpath', 'newpath'\)"
- if AARCH64 or RISCV:
+ if AARCH64 or RISCV or sys.version_info >= (3, 14):
pattern = br"^linkat\(.*'oldpath'.*'newpath'.*\)"
self.assert_syscall("import os; os.link('oldpath', 'newpath')",
pattern)