#3 Fix a ModuleNotFoundError when this package was imported on Python 3.12+
Merged 9 months ago by churchyard. Opened 9 months ago by churchyard.
rpms/ churchyard/python-straight-plugin python3.12  into  rawhide

@@ -0,0 +1,27 @@ 

+ From febce73af0b529b99b8e0e05c257ec1209e968c8 Mon Sep 17 00:00:00 2001

+ From: Toshio Kuratomi <a.badger@gmail.com>

+ Date: Sun, 12 Jun 2022 19:23:55 -0700

+ Subject: [PATCH] Remove the import of imp.find_module.

+ 

+ Usage of find_module has been replaced by importlib.

+ 

+ The imp module is going to be removed in python 3.12

+ ---

+  straight/plugin/loaders.py | 1 -

+  1 file changed, 1 deletion(-)

+ 

+ diff --git a/straight/plugin/loaders.py b/straight/plugin/loaders.py

+ index 8d628c2..1de996c 100644

+ --- a/straight/plugin/loaders.py

+ +++ b/straight/plugin/loaders.py

+ @@ -4,7 +4,6 @@ import sys

+  import os

+  

+  from importlib import import_module

+ -from imp import find_module

+  

+  from straight.plugin.manager import PluginManager

+  

+ -- 

+ 2.41.0

+ 

file modified
+12 -2
@@ -1,6 +1,6 @@ 

  Name:           python-straight-plugin

  Version:        1.5.0

- Release:        22%{?dist}

+ Release:        23%{?dist}

  Summary:        Python plugin loader

  

  License:        BSD
@@ -8,6 +8,12 @@ 

  

  Source0:        https://files.pythonhosted.org/packages/48/89/34ae6a87784d0b607af61c84a52c313c598f1d86ce5c1e9eb6da038fee5f/straight.plugin-%{version}.tar.gz

  

+ # Remove an unused import of imp.find_module

+ # The imp module was removed in Python 3.12

+ # Fixes https://bugzilla.redhat.com/2238632

+ # Rebased from https://github.com/ironfroggy/straight.plugin/pull/30

+ Patch:          Remove-the-import-of-imp.find_module.patch

+ 

  BuildArch:      noarch

  

  BuildRequires:  python3-devel
@@ -47,7 +53,7 @@ 

  the plugins in it for some particular purpose or intent.

  

  %prep

- %setup -q -n straight.plugin-%{version}

+ %autosetup -p1 -n straight.plugin-%{version}

  2to3 --write --nobackups .

  

  %build
@@ -64,6 +70,10 @@ 

  %{python3_sitelib}/straight*

  

  %changelog

+ * Tue Sep 12 2023 Miro Hrončok <mhroncok@redhat.com> - 1.5.0-23

+ - Fix a ModuleNotFoundError when this package was imported on Python 3.12+

+ - Fixes: rhbz#2238632

+ 

  * Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0-22

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

  

Pull-Request has been merged by churchyard

9 months ago

Building python-straight-plugin-1.5.0-23.fc40 for rawhide
Created task: 106122246
Task info: https://koji.fedoraproject.org/koji/taskinfo?taskID=106122246