public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/rpkg] 1.70-1: A few patches
Date: Mon, 10 Aug 2026 21:44:52 GMT	[thread overview]
Message-ID: <178639829271.1.15148462411503100811.rpms-rpkg-3ecb092e8a11@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/rpkg
            Branch : 1.70-1
            Commit : 3ecb092e8a11863e5883f0fbd37f0c77ea95f1b1
            Author : Ondřej Nosek <onosek@redhat.com>
            Date   : 2025-12-09T10:47:44+00:00
            Stats  : +413/-3 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/rpkg/c/3ecb092e8a11863e5883f0fbd37f0c77ea95f1b1?branch=1.70-1

            Log:
            A few patches

- Patch: Check the correct sorting of imports from now on
- Patch: `update`: interactive editor is broken

Signed-off-by: Ondřej Nosek <onosek@redhat.com>

---
diff --git a/0004-update-interactive-editor-is-broken.patch b/0004-update-interactive-editor-is-broken.patch
new file mode 100644
index 0000000..c8e1f0d
--- /dev/null
+++ b/0004-update-interactive-editor-is-broken.patch
@@ -0,0 +1,121 @@
+From 4d758fc593db84ca5797efca55f151dfcb1aab2d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ond=C5=99ej=20Nosek?= <onosek@redhat.com>
+Date: Tue, 9 Dec 2025 03:13:39 +0100
+Subject: [PATCH 1/2] `update`: interactive editor is broken
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Revert "Execute shell command: Non-interactive stdin"
+This (partially) reverts commit 0123ce42d214968defe74b8a05ba7d9c7ecfa6c1.
+
+Fixes: #762
+Signed-off-by: Ondřej Nosek <onosek@redhat.com>
+---
+ pyrpkg/__init__.py     |  2 --
+ tests/test_commands.py | 23 ++++++++---------------
+ 2 files changed, 8 insertions(+), 17 deletions(-)
+
+diff --git a/pyrpkg/__init__.py b/pyrpkg/__init__.py
+index a4b4dd7..38ccbcf 100644
+--- a/pyrpkg/__init__.py
++++ b/pyrpkg/__init__.py
+@@ -1302,7 +1302,6 @@ class Commands(object):
+                 # stderr, so....
+                 parent_proc = subprocess.Popen(
+                     command, env=environ, shell=shell, cwd=cwd,  # nosec
+-                    stdin=subprocess.DEVNULL,
+                     stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+ 
+                 proc = subprocess.Popen(
+@@ -1314,7 +1313,6 @@ class Commands(object):
+             else:
+                 proc = subprocess.Popen(
+                     command, env=environ, shell=shell, cwd=cwd,  # nosec
+-                    stdin=subprocess.DEVNULL,
+                     stdout=proc_stdout, stderr=proc_stderr,
+                     universal_newlines=return_text)
+         except KeyboardInterrupt:
+diff --git a/tests/test_commands.py b/tests/test_commands.py
+index a757c7e..012a618 100644
+--- a/tests/test_commands.py
++++ b/tests/test_commands.py
+@@ -1118,8 +1118,7 @@ class TestRunCommand(CommandTestCase):
+         self.assertEqual((0, None, None), result)
+         Popen.assert_called_once_with(   # nosec # noqa: S604
+             'rpmbuild', env=os.environ, shell=True, cwd=None,
+-            stdin=subprocess.DEVNULL, stdout=None, stderr=None,
+-            universal_newlines=False)
++            stdout=None, stderr=None, universal_newlines=False)
+ 
+     @patch('subprocess.Popen')
+     def test_run_command_without_shell(self, Popen):
+@@ -1130,8 +1129,7 @@ class TestRunCommand(CommandTestCase):
+         self.assertEqual((0, None, None), result)
+         Popen.assert_called_once_with(
+             ['rpmbuild'], env=os.environ, shell=False, cwd=None,
+-            stdin=subprocess.DEVNULL, stdout=None, stderr=None,
+-            universal_newlines=False)
++            stdout=None, stderr=None, universal_newlines=False)
+ 
+     @patch('subprocess.Popen')
+     def test_return_stdout(self, Popen):
+@@ -1144,8 +1142,7 @@ class TestRunCommand(CommandTestCase):
+         self.assertEqual((0, 'output', None), result)
+         Popen.assert_called_once_with(
+             ['rpmbuild'], env=os.environ, shell=False, cwd=None,
+-            stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, stderr=None,
+-            universal_newlines=False)
++            stdout=subprocess.PIPE, stderr=None, universal_newlines=False)
+ 
+     @patch('subprocess.Popen')
+     def test_return_stderr(self, Popen):
+@@ -1158,8 +1155,7 @@ class TestRunCommand(CommandTestCase):
+         self.assertEqual((0, None, 'output'), result)
+         Popen.assert_called_once_with(
+             ['rpmbuild'], env=os.environ, shell=False, cwd=None,
+-            stdin=subprocess.DEVNULL, stdout=None, stderr=subprocess.PIPE,
+-            universal_newlines=False)
++            stdout=None, stderr=subprocess.PIPE, universal_newlines=False)
+ 
+     @patch('subprocess.Popen')
+     def test_pipe(self, Popen):
+@@ -1178,7 +1174,7 @@ class TestRunCommand(CommandTestCase):
+         Popen.assert_has_calls([
+             call(['rpmbuild'],
+                  env=os.environ, shell=False, cwd=None,
+-                 stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, stderr=subprocess.STDOUT),
++                 stdout=subprocess.PIPE, stderr=subprocess.STDOUT),
+             call(['grep', 'src.rpm'],
+                  env=os.environ, shell=False, cwd=None,
+                  stdin=first_proc.stdout, stdout=None, stderr=None,
+@@ -1219,8 +1215,7 @@ class TestRunCommand(CommandTestCase):
+             self.assertEqual((0, None, None), result)
+             Popen.assert_called_once_with(
+                 ['rpmbuild'], env={'myvar': 'test'},
+-                shell=False, cwd=None,
+-                stdin=subprocess.DEVNULL, stdout=None, stderr=None,
++                shell=False, cwd=None, stdout=None, stderr=None,
+                 universal_newlines=False)
+ 
+     @patch('subprocess.Popen')
+@@ -1232,8 +1227,7 @@ class TestRunCommand(CommandTestCase):
+ 
+         Popen.assert_called_once_with(
+             ['rpmbuild'], env=os.environ, shell=False, cwd=tempdir,
+-            stdin=subprocess.DEVNULL, stdout=None, stderr=None,
+-            universal_newlines=False)
++            stdout=None, stderr=None, universal_newlines=False)
+ 
+         shutil.rmtree(tempdir)
+ 
+@@ -1246,5 +1240,4 @@ class TestRunCommand(CommandTestCase):
+ 
+         Popen.assert_called_once_with(
+             ['rpmbuild'], env=os.environ, shell=False, cwd=None,
+-            stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, stderr=None,
+-            universal_newlines=True)
++            stdout=subprocess.PIPE, stderr=None, universal_newlines=True)
+-- 
+2.52.0
+

diff --git a/0005-Check-the-correct-sorting-of-imports-from-now-on.patch b/0005-Check-the-correct-sorting-of-imports-from-now-on.patch
new file mode 100644
index 0000000..0d8fa82
--- /dev/null
+++ b/0005-Check-the-correct-sorting-of-imports-from-now-on.patch
@@ -0,0 +1,282 @@
+From 2ecdd95bed7833f201e14dd603feb3cdcbe4031f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ond=C5=99ej=20Nosek?= <onosek@redhat.com>
+Date: Tue, 9 Dec 2025 03:35:42 +0100
+Subject: [PATCH 2/2] Check the correct sorting of imports from now on
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Ondřej Nosek <onosek@redhat.com>
+---
+ pyproject.toml                    |  2 +-
+ pyrpkg/__init__.py                | 27 +++++++++++++++++++--------
+ pyrpkg/layout/__init__.py         |  9 +++++++--
+ pyrpkg/lookaside.py               |  3 +--
+ tests/commands/test_check_repo.py |  3 ++-
+ tests/commands/test_clone.py      |  1 +
+ tests/test_commands.py            |  1 +
+ tests/test_flatpak_build.py       |  4 ++--
+ tests/test_lookaside.py           |  3 +--
+ tests/test_retire.py              |  5 +++--
+ tests/test_side_tag.py            |  3 ++-
+ tests/test_spec.py                |  2 +-
+ tests/test_utils.py               | 13 +++++++++----
+ tests/utils.py                    |  1 +
+ 14 files changed, 51 insertions(+), 26 deletions(-)
+
+diff --git a/pyproject.toml b/pyproject.toml
+index d9f30a7..fee23af 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -106,7 +106,7 @@ select = [
+     # flake8-simplify
+     #"SIM",
+     # isort
+-    #"I",
++    "I",
+     # flake8-bandit
+     "S",
+     # flake8-type-checking
+diff --git a/pyrpkg/__init__.py b/pyrpkg/__init__.py
+index 38ccbcf..8276b2b 100644
+--- a/pyrpkg/__init__.py
++++ b/pyrpkg/__init__.py
+@@ -45,15 +45,27 @@ from six.moves import configparser, urllib
+ from six.moves.urllib.parse import urljoin
+ 
+ from pyrpkg import layout
+-from pyrpkg.errors import (AlreadyUploadedError, HashtypeMixingError,
+-                           NoSourcesError, SpecfileDoesntMatchRepoNameError,
+-                           UnknownTargetError, rpkgAuthError, rpkgError)
++from pyrpkg.errors import (
++    AlreadyUploadedError,
++    HashtypeMixingError,
++    NoSourcesError,
++    SpecfileDoesntMatchRepoNameError,
++    UnknownTargetError,
++    rpkgAuthError,
++    rpkgError,
++)
+ from pyrpkg.lookaside import CGILookasideCache
+ from pyrpkg.sources import SourcesFile
+ from pyrpkg.spec import SpecFile
+-from pyrpkg.utils import (cached_property, extract_srpm, find_me,
+-                          is_file_tracked, is_lookaside_eligible_file,
+-                          log_result, spec_file_undo_rpmautospec)
++from pyrpkg.utils import (
++    cached_property,
++    extract_srpm,
++    find_me,
++    is_file_tracked,
++    is_lookaside_eligible_file,
++    log_result,
++    spec_file_undo_rpmautospec,
++)
+ 
+ from .gitignore import GitIgnore
+ 
+@@ -78,8 +90,7 @@ except ImportError:
+     specfile_uses_rpmautospec = None
+ 
+ try:
+-    from rpmautospec import \
+-        calculate_release_number as rpmautospec_calculate_release_number
++    from rpmautospec import calculate_release_number as rpmautospec_calculate_release_number
+     from rpmautospec import process_distgit as rpmautospec_process_distgit
+ except ImportError:
+     rpmautospec_process_distgit = None
+diff --git a/pyrpkg/layout/__init__.py b/pyrpkg/layout/__init__.py
+index 850ddc2..c17a81e 100644
+--- a/pyrpkg/layout/__init__.py
++++ b/pyrpkg/layout/__init__.py
+@@ -12,8 +12,13 @@
+ from pyrpkg.errors import LayoutError
+ 
+ from .base import MetaLayout
+-from .layouts import (DistGitLayout, DistGitResultsDirLayout,  # noqa: F401
+-                      IncompleteLayout, RetiredLayout, SRPMLayout)
++from .layouts import (  # noqa: F401
++    DistGitLayout,
++    DistGitResultsDirLayout,
++    IncompleteLayout,
++    RetiredLayout,
++    SRPMLayout,
++)
+ 
+ 
+ def build(path, hint=None):
+diff --git a/pyrpkg/lookaside.py b/pyrpkg/lookaside.py
+index 2a786df..689b8b6 100644
+--- a/pyrpkg/lookaside.py
++++ b/pyrpkg/lookaside.py
+@@ -26,8 +26,7 @@ import pycurl
+ import six
+ from six.moves import http_client, urllib
+ 
+-from .errors import (AlreadyUploadedError, DownloadError, InvalidHashType,
+-                     UploadError)
++from .errors import AlreadyUploadedError, DownloadError, InvalidHashType, UploadError
+ 
+ 
+ class CGILookasideCache(object):
+diff --git a/tests/commands/test_check_repo.py b/tests/commands/test_check_repo.py
+index 8952481..29a0849 100644
+--- a/tests/commands/test_check_repo.py
++++ b/tests/commands/test_check_repo.py
+@@ -5,9 +5,10 @@ import subprocess
+ import sys
+ import tempfile
+ 
+-from pyrpkg.errors import rpkgError
+ from six.moves import StringIO
+ 
++from pyrpkg.errors import rpkgError
++
+ try:
+     from unittest.mock import patch
+ except ImportError:
+diff --git a/tests/commands/test_clone.py b/tests/commands/test_clone.py
+index 85fdfd1..d9ed832 100644
+--- a/tests/commands/test_clone.py
++++ b/tests/commands/test_clone.py
+@@ -4,6 +4,7 @@ import sys
+ import tempfile
+ 
+ import git
++
+ import pyrpkg
+ 
+ from . import CommandTestCase
+diff --git a/tests/test_commands.py b/tests/test_commands.py
+index 012a618..383edf4 100644
+--- a/tests/test_commands.py
++++ b/tests/test_commands.py
+@@ -11,6 +11,7 @@ from datetime import datetime
+ import git
+ import rpm
+ import six
++
+ from pyrpkg import rpkgError
+ 
+ try:
+diff --git a/tests/test_flatpak_build.py b/tests/test_flatpak_build.py
+index 32926a8..3a143db 100644
+--- a/tests/test_flatpak_build.py
++++ b/tests/test_flatpak_build.py
+@@ -3,10 +3,10 @@ import subprocess
+ from textwrap import dedent
+ 
+ import requests
+-from pyrpkg import Modulemd
+-
+ from utils import CommandTestCase
+ 
++from pyrpkg import Modulemd
++
+ try:
+     import unittest2 as unittest
+ except ImportError:
+diff --git a/tests/test_lookaside.py b/tests/test_lookaside.py
+index 6bace2e..b42b447 100644
+--- a/tests/test_lookaside.py
++++ b/tests/test_lookaside.py
+@@ -21,8 +21,7 @@ try:
+ except ImportError:
+     import mock
+ 
+-from pyrpkg.errors import (AlreadyUploadedError, DownloadError,
+-                           InvalidHashType, UploadError)
++from pyrpkg.errors import AlreadyUploadedError, DownloadError, InvalidHashType, UploadError
+ from pyrpkg.lookaside import CGILookasideCache
+ 
+ old_stat = os.stat
+diff --git a/tests/test_retire.py b/tests/test_retire.py
+index 1fdeafd..3f4d943 100644
+--- a/tests/test_retire.py
++++ b/tests/test_retire.py
+@@ -5,11 +5,12 @@ import shutil
+ import subprocess
+ import tempfile
+ 
+-import pyrpkg.cli
+ import six
+-from pyrpkg.errors import rpkgError
+ from six.moves import configparser
+ 
++import pyrpkg.cli
++from pyrpkg.errors import rpkgError
++
+ try:
+     from unittest import mock
+ except ImportError:
+diff --git a/tests/test_side_tag.py b/tests/test_side_tag.py
+index 7a7f859..be96778 100644
+--- a/tests/test_side_tag.py
++++ b/tests/test_side_tag.py
+@@ -4,10 +4,11 @@ import logging
+ import os
+ 
+ import koji
+-import pyrpkg.cli
+ import six
+ from six.moves import StringIO, configparser
+ 
++import pyrpkg.cli
++
+ try:
+     from unittest import mock
+ except ImportError:
+diff --git a/tests/test_spec.py b/tests/test_spec.py
+index 0c7907a..2f61c2c 100644
+--- a/tests/test_spec.py
++++ b/tests/test_spec.py
+@@ -1,7 +1,7 @@
+ import os
+ import shutil
+-import unittest
+ import tempfile
++import unittest
+ 
+ from pyrpkg import spec
+ from pyrpkg.errors import rpkgError
+diff --git a/tests/test_utils.py b/tests/test_utils.py
+index 0cd62d8..c0feda6 100644
+--- a/tests/test_utils.py
++++ b/tests/test_utils.py
+@@ -14,12 +14,17 @@ try:
+ except ImportError:
+     import mock
+ 
+-from pyrpkg.utils import (cached_property, is_file_in_directory,
+-                          is_file_tracked, log_result,
+-                          spec_file_undo_rpmautospec, warn_deprecated)
+-
+ from utils import CommandTestCase
+ 
++from pyrpkg.utils import (
++    cached_property,
++    is_file_in_directory,
++    is_file_tracked,
++    log_result,
++    spec_file_undo_rpmautospec,
++    warn_deprecated,
++)
++
+ 
+ class CachedPropertyTestCase(unittest.TestCase):
+     def test_computed_only_once(self):
+diff --git a/tests/utils.py b/tests/utils.py
+index c58d836..52b9215 100644
+--- a/tests/utils.py
++++ b/tests/utils.py
+@@ -7,6 +7,7 @@ import sys
+ import tempfile
+ 
+ import six
++
+ from pyrpkg import Commands
+ 
+ # For running tests with Python 2
+-- 
+2.52.0
+

diff --git a/rpkg.spec b/rpkg.spec
index e658f06..97048c4 100644
--- a/rpkg.spec
+++ b/rpkg.spec
@@ -1,10 +1,11 @@
 Name:           rpkg
 Version:        1.69
-Release:        2%{?dist}
+Release:        3%{?dist}
 
 Summary:        Python library for interacting with rpm+git
-# Automatically converted from old format: GPLv2+ and LGPLv2 - review is highly recommended.
-License:        GPL-2.0-or-later AND LicenseRef-Callaway-LGPLv2
+# Automatically converted from old format: GPLv2+ and LGPLv2 - reviewed
+# and converted to SPDX license expression
+License:        GPL-2.0-or-later AND LGPL-2.1-only
 URL:            https://pagure.io/rpkg
 BuildArch:      noarch
 Source0:        https://pagure.io/releases/rpkg/%{name}-%{version}.tar.gz
@@ -48,6 +49,8 @@ Patch1:         0001-Remove-Environment-Markers-syntax.patch
 %endif
 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
 
 %description
 Python library for interacting with rpm+git
@@ -278,6 +281,10 @@ example_cli_dir=$RPM_BUILD_ROOT%{_datadir}/%{name}/examples/cli
 
 
 %changelog
+* 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
+
 * Tue Nov 25 2025 Ondřej Nosek <onosek@redhat.com> - 1.69-2
 - Patch: Use ruff code checker instead of bandit
 

                 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=178639829271.1.15148462411503100811.rpms-rpkg-3ecb092e8a11@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