public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Gwyn Ciesla <gwync@protonmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/python-klein] epel10.2: Work around imp removal
Date: Tue, 06 Oct 2026 01:15:11 GMT [thread overview]
Message-ID: <179124931159.1.17725705256033715136.rpms-python-klein-d8fe93de1cf9@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/python-klein
Branch : epel10.2
Commit : d8fe93de1cf917f0ac2ad8c380bdcec427cd0678
Author : Gwyn Ciesla <gwync@protonmail.com>
Date : 2023-07-05T14:40:34-05:00
Stats : +29/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-klein/c/d8fe93de1cf917f0ac2ad8c380bdcec427cd0678?branch=epel10.2
Log:
Work around imp removal
---
diff --git a/imp-removal.patch b/imp-removal.patch
new file mode 100644
index 0000000..1a921e0
--- /dev/null
+++ b/imp-removal.patch
@@ -0,0 +1,27 @@
+--- docs/conf.py~ 2023-05-02 12:50:37.000000000 -0500
++++ docs/conf.py 2023-07-05 14:33:26.804404828 -0500
+@@ -1,12 +1,22 @@
+-import imp
++import importlib.util
++import importlib.machinery
+ import os
+ import sys
+
++def load_source(modname, filename):
++ loader = importlib.machinery.SourceFileLoader(modname, filename)
++ spec = importlib.util.spec_from_file_location(modname, filename, loader=loader)
++ module = importlib.util.module_from_spec(spec)
++ # The module is always executed and not cached in sys.modules.
++ # Uncomment the following line to cache the module.
++ # sys.modules[module.__name__] = module
++ loader.exec_module(module)
++ return module
+
+ # Add the extensions folder...
+ sys.path.insert(0, os.path.abspath("./_extensions"))
+
+-_version = imp.load_source("setup", "../src/klein/_version.py")
++_version = load_source("setup", "../src/klein/_version.py")
+
+ extensions = []
+ templates_path = ["_templates"]
diff --git a/python-klein.spec b/python-klein.spec
index 7cf8810..00d1f7d 100644
--- a/python-klein.spec
+++ b/python-klein.spec
@@ -9,6 +9,7 @@ License: MIT
URL: https://github.com/twisted/klein
Source0: %{pypi_source}
BuildArch: noarch
+Patch0: imp-removal.patch
BuildRequires: python3-devel
BuildRequires: python3dist(attrs)
@@ -40,7 +41,7 @@ Summary: klein documentation
Documentation for klein
%prep
-%autosetup -n %{pypi_name}-%{version}
+%autosetup -n %{pypi_name}-%{version} -p0
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
reply other threads:[~2026-10-06 1:15 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=179124931159.1.17725705256033715136.rpms-python-klein-d8fe93de1cf9@fedoraproject.org \
--to=gwync@protonmail.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