public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/rpkg] 1.70-1: Patch: _run_command: timeout is not supported in Python 2
Date: Mon, 10 Aug 2026 21:44:53 GMT	[thread overview]
Message-ID: <178639829318.1.18236266959297492854.rpms-rpkg-7dcb2f136f98@fedoraproject.org> (raw)

            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

                 reply	other threads:[~2026-08-10 21:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178639829318.1.18236266959297492854.rpms-rpkg-7dcb2f136f98@fedoraproject.org \
    --to=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox