public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Filipe Rosset <rosset.filipe@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/python-patch-manager] rawhide: Update to 0.2.0 + spec cleanup + add patch to fix the build with
Date: Sat, 08 Aug 2026 19:24:31 GMT	[thread overview]
Message-ID: <178621707114.1.9990243315871847100.rpms-python-patch-manager-a022d13c30c2@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/python-patch-manager
            Branch : rawhide
            Commit : a022d13c30c295e1699e3fb2488a95a350629f78
            Author : Filipe Rosset <rosset.filipe@gmail.com>
            Date   : 2026-08-08T15:27:09-03:00
            Stats  : +53/-14 in 4 file(s)
            URL    : https://src.fedoraproject.org/rpms/python-patch-manager/c/a022d13c30c295e1699e3fb2488a95a350629f78?branch=rawhide

            Log:
            Update to 0.2.0 + spec cleanup + add patch to fix the build with
Python 3.10 onwards

[PATCH] Fix asyncio event loop retrieval on Python 3.10+

---
diff --git a/.gitignore b/.gitignore
index a83c9a9..85b3532 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
-/patch-manager-0.0.6.tar.gz
+/patch_manager-*.tar.gz
+/patman-*.tar.gz

diff --git a/0001-Fix-asyncio-event-loop-retrieval-on-Python-3.10.patch b/0001-Fix-asyncio-event-loop-retrieval-on-Python-3.10.patch
new file mode 100644
index 0000000..16b4d42
--- /dev/null
+++ b/0001-Fix-asyncio-event-loop-retrieval-on-Python-3.10.patch
@@ -0,0 +1,38 @@
+[PATCH] Fix asyncio event loop retrieval on Python 3.10+
+
+This patch monkey-patches asyncio.get_event_loop to fallback to creating
+and setting a new event loop when one does not already exist, which preserves
+compatibility with Python 3.10+ and Python 3.15 where implicit event loops
+were deprecated and removed.
+
+---
+ patman/__init__.py | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/patman/__init__.py b/patman/__init__.py
+index 9239855..56d8123 100644
+--- a/patman/__init__.py
++++ b/patman/__init__.py
+@@ -1,5 +1,22 @@
+ # SPDX-License-Identifier: GPL-2.0+
+ 
++import asyncio
++
++_original_get_event_loop = asyncio.get_event_loop
++
++def _fixed_get_event_loop():
++    try:
++        return asyncio.get_running_loop()
++    except RuntimeError:
++        try:
++            return _original_get_event_loop()
++        except RuntimeError:
++            loop = asyncio.new_event_loop()
++            asyncio.set_event_loop(loop)
++            return loop
++
++asyncio.get_event_loop = _fixed_get_event_loop
++
+ __all__ = [
+     'checkpatch', 'cmdline', 'commit', 'control', 'cser_helper', 'cseries',
+     'database', 'func_test', 'get_maintainer', '__main__', 'patchstream',

diff --git a/python-patch-manager.spec b/python-patch-manager.spec
index 652b6aa..0071eae 100644
--- a/python-patch-manager.spec
+++ b/python-patch-manager.spec
@@ -1,19 +1,22 @@
+%global forgeurl https://github.com/nxtboot/patman
+Version:        0.2.0
+%forgemeta
+
 Name:           python-patch-manager
-Version:        0.0.6
 Release:        %autorelease
 Summary:        Patman patch manager
 
 License:        GPL-2.0-or-later
-URL:            https://docs.u-boot.org/en/latest/develop/patman.html
-Source:         %{pypi_source patch-manager}
+URL:            %{forgeurl}
+Source:         %{forgesource}
+
+# Fix asyncio event loop issues on Python 3.10+
+Patch:          0001-Fix-asyncio-event-loop-retrieval-on-Python-3.10.patch
 
 BuildArch:      noarch
 BuildRequires:  python3-devel
 BuildRequires:  sed
 
-BuildRequires:  python3dist(pygit2)
-BuildRequires:  python3dist(requests)
-
 %global _description %{expand:
 This package provides a tool intended to automate patch creation and make it a
 less error-prone process. It is useful for U-Boot and Linux work so far, since
@@ -24,16 +27,13 @@ they use the checkpatch.pl script.}
 %package -n     python3-patch-manager
 Summary:        %{summary}
 
-Requires:       python3dist(pygit2)
-Requires:       python3dist(requests)
-
 %description -n python3-patch-manager %_description
 
 %prep
-%autosetup -p1 -n patch-manager-%{version}
+%forgeautosetup -p1
 
 # Remove unnecessary shebangs
-sed -i "\|#!/usr/bin/env python3|d" src/patman/*.py
+sed -i "\|#!/usr/bin/env python3|d" patman/*.py u_boot_pylib/*.py
 
 %generate_buildrequires
 %pyproject_buildrequires
@@ -43,7 +43,7 @@ sed -i "\|#!/usr/bin/env python3|d" src/patman/*.py
 
 %install
 %pyproject_install
-%pyproject_save_files patman
+%pyproject_save_files patman u_boot_pylib
 
 %check
 %pyproject_check_import -e patman.setup

diff --git a/sources b/sources
index 981dc44..f784fbc 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (patch-manager-0.0.6.tar.gz) = 1d7409b8862787a8afe134235fa2edbf818396cac7166fb44f0562275a9b10274cb3d7c47642b8a91469317ef28865a1bf733142a781215a03ebe3cf9134c080
+SHA512 (patman-0.2.0.tar.gz) = 1753c22bfe2cf015e1fdad3f2466d7766dc007a8c503c40a37becbfd29ee6ed144403ab92531a60a10081a9a711fd75f89b5d63ec2847e1c8ab2e922257fda4a

                 reply	other threads:[~2026-08-08 19:24 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=178621707114.1.9990243315871847100.rpms-python-patch-manager-a022d13c30c2@fedoraproject.org \
    --to=rosset.filipe@gmail.com \
    --cc=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