public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpkg] 1.70-1: Patch: _run_command: timeout is not supported in Python 2
@ 2026-08-10 21:44
0 siblings, 0 replies; only message in thread
From: @ 2026-08-10 21:44 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/rpkg
Branch : 1.70-1
Commit : 7dcb2f136f98eea22097e41203f2d86725269b0f
Author : Ondřej Nosek <onosek@redhat.com>
Date : 2025-12-09T22:40:51+00:00
Stats : +48/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rpkg/c/7dcb2f136f98eea22097e41203f2d86725269b0f?branch=1.70-1
Log:
Patch: _run_command: timeout is not supported in Python 2
Signed-off-by: Ondřej Nosek <onosek@redhat.com>
---
diff --git a/0006-_run_command-timeout-is-not-supported-in-Python-2.patch b/0006-_run_command-timeout-is-not-supported-in-Python-2.patch
new file mode 100644
index 0000000..8df5ea6
--- /dev/null
+++ b/0006-_run_command-timeout-is-not-supported-in-Python-2.patch
@@ -0,0 +1,43 @@
+From d0a4e9a8e4778d4b232af4565b36e4b83ae6071b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ond=C5=99ej=20Nosek?= <onosek@redhat.com>
+Date: Tue, 9 Dec 2025 21:39:32 +0100
+Subject: [PATCH] _run_command: timeout is not supported in Python 2
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Splitting this functionality for Python's versions.
+This relates to the commit 0123ce42d214968defe74b8a05ba7d9c7ecfa6c1.
+
+Signed-off-by: Ondřej Nosek <onosek@redhat.com>
+---
+ pyrpkg/__init__.py | 13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/pyrpkg/__init__.py b/pyrpkg/__init__.py
+index 8276b2b..8df338c 100644
+--- a/pyrpkg/__init__.py
++++ b/pyrpkg/__init__.py
+@@ -1331,11 +1331,14 @@ class Commands(object):
+ except Exception as e:
+ raise rpkgError(e)
+
+- try:
+- exit_code = proc.wait(timeout=3600)
+- except subprocess.TimeoutExpired:
+- proc.kill()
+- raise rpkgError('Command timed out.')
++ if six.PY3:
++ try:
++ exit_code = proc.wait(timeout=3600)
++ except subprocess.TimeoutExpired:
++ proc.kill()
++ raise rpkgError('Command timed out.')
++ else:
++ exit_code = proc.wait()
+ if exit_code > 0 and not return_stderr:
+ raise rpkgError('Failed to execute command.')
+
+--
+2.52.0
+
diff --git a/rpkg.spec b/rpkg.spec
index 97048c4..36dc585 100644
--- a/rpkg.spec
+++ b/rpkg.spec
@@ -1,6 +1,6 @@
Name: rpkg
Version: 1.69
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Python library for interacting with rpm+git
# Automatically converted from old format: GPLv2+ and LGPLv2 - reviewed
@@ -51,6 +51,7 @@ Patch2: 0002-Execute-shell-command-Non-interactive-stdin.patch
Patch3: 0003-Use-ruff-code-checker-instead-of-bandit.patch
Patch4: 0004-update-interactive-editor-is-broken.patch
Patch5: 0005-Check-the-correct-sorting-of-imports-from-now-on.patch
+Patch6: 0006-_run_command-timeout-is-not-supported-in-Python-2.patch
%description
Python library for interacting with rpm+git
@@ -281,6 +282,9 @@ example_cli_dir=$RPM_BUILD_ROOT%{_datadir}/%{name}/examples/cli
%changelog
+* Tue Dec 09 2025 Ondřej Nosek <onosek@redhat.com> - 1.69-4
+- Patch: _run_command: timeout is not supported in Python 2
+
* Tue Dec 09 2025 Ondřej Nosek <onosek@redhat.com> - 1.69-3
- Patch: Check the correct sorting of imports from now on
- Patch: `update`: interactive editor is broken
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-10 21:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-10 21:44 [rpms/rpkg] 1.70-1: Patch: _run_command: timeout is not supported in Python 2
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox