Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-bottle for openSUSE:Factory 
checked in at 2023-10-19 22:47:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-bottle (Old)
 and      /work/SRC/openSUSE:Factory/.python-bottle.new.1945 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-bottle"

Thu Oct 19 22:47:18 2023 rev:27 rq:1118452 version:0.12.25

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-bottle/python-bottle.changes      
2023-09-07 21:13:38.375232628 +0200
+++ /work/SRC/openSUSE:Factory/.python-bottle.new.1945/python-bottle.changes    
2023-10-19 22:49:39.807532972 +0200
@@ -1,0 +2,8 @@
+Wed Oct 18 05:46:24 UTC 2023 - Steve Kowalik <steven.kowa...@suse.com>
+
+- Add patch update-module-loader.patch:
+  * Add find_spec to the magic bottle.ext loader, Python 3.12 no longer
+    calls find_module.
+- Switch to pyproject and autosetup macros.
+
+-------------------------------------------------------------------

New:
----
  update-module-loader.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-bottle.spec ++++++
--- /var/tmp/diff_new_pack.lwxY2Q/_old  2023-10-19 22:49:40.299550817 +0200
+++ /var/tmp/diff_new_pack.lwxY2Q/_new  2023-10-19 22:49:40.303550962 +0200
@@ -25,7 +25,11 @@
 URL:            https://bottlepy.org/
 Source:         
https://files.pythonhosted.org/packages/source/b/bottle/bottle-%{version}.tar.gz
 Source1:        http://bottlepy.org/docs/0.12/bottle-docs.pdf
+# PATCH-FIX-UPSTREAM 
gh#bottlepy/bottle#ca6762c559c5e71e0dff71dc97eb4c6b3ed9bbcd
+Patch0:         update-module-loader.patch
+BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module setuptools}
+BuildRequires:  %{python_module wheel}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 Requires(post): update-alternatives
@@ -56,15 +60,14 @@
 %endif
 
 %prep
-%setup -q -n bottle-%{version}
-
+%autosetup -p1 -n bottle-%{version}
 cp %{SOURCE1} .
 
 %build
-%python_build
+%pyproject_wheel
 
 %install
-%python_install
+%pyproject_install
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 %python_clone -a %{buildroot}%{_bindir}/bottle.py
 
@@ -83,7 +86,7 @@
 %python_alternative %{_bindir}/bottle.py
 %{python_sitelib}/bottle.py*
 %pycache_only %{python_sitelib}/__pycache__
-%{python_sitelib}/bottle-%{version}-py%{python_version}.egg-info
+%{python_sitelib}/bottle-%{version}.dist-info
 
 %if 0%{?suse_version} > 1500
 %files -n %{name}-doc

++++++ update-module-loader.patch ++++++
>From ca6762c559c5e71e0dff71dc97eb4c6b3ed9bbcd Mon Sep 17 00:00:00 2001
From: Marcel Hellkamp <m...@gsites.de>
Date: Sun, 12 Jun 2022 15:15:35 +0200
Subject: [PATCH] Fix #1378: Module loader should move from find_mdoule to
 find_spec.

---
 bottle.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Index: bottle-0.12.25/bottle.py
===================================================================
--- bottle-0.12.25.orig/bottle.py
+++ bottle-0.12.25/bottle.py
@@ -1803,10 +1803,15 @@ class _ImportRedirect(object):
                                     '__all__': [], '__loader__': self})
         sys.meta_path.append(self)
 
+    def find_spec(self, fullname, path, target=None):
+        if '.' not in fullname: return
+        if fullname.rsplit('.', 1)[0] != self.name: return
+        from importlib.util import spec_from_loader
+        return spec_from_loader(fullname, self)
+
     def find_module(self, fullname, path=None):
         if '.' not in fullname: return
-        packname = fullname.rsplit('.', 1)[0]
-        if packname != self.name: return
+        if fullname.rsplit('.', 1)[0] != self.name: return
         return self
 
     def load_module(self, fullname):

Reply via email to