public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-sphinxcontrib-spelling] rawhide: Fix the test failing with newer pbr
@ 2026-11-15  5:33 Karolina Surma
  0 siblings, 0 replies; only message in thread
From: Karolina Surma @ 2026-11-15  5:33 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/python-sphinxcontrib-spelling
            Branch : rawhide
            Commit : 3eb7c15b1ad115d374f710e2fe85ffe8ca96f53d
            Author : Karolina Surma <ksurma@redhat.com>
            Date   : 2026-11-05T13:29:04+01:00
            Stats  : +27/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/python-sphinxcontrib-spelling/c/3eb7c15b1ad115d374f710e2fe85ffe8ca96f53d?branch=rawhide

            Log:
            Fix the test failing with newer pbr

Assisted-By: Claude Sonnet 5.5

---
diff --git a/python-sphinxcontrib-spelling.spec b/python-sphinxcontrib-spelling.spec
index 4f31f65..cb03dfc 100644
--- a/python-sphinxcontrib-spelling.spec
+++ b/python-sphinxcontrib-spelling.spec
@@ -11,13 +11,16 @@ misspelled words.
 
 Name:           python-%{pypi_name}
 Version:        7.3.3
-Release:        19%{?dist}
+Release:        20%{?dist}
 Summary:        %{sum}
 
 # Automatically converted from old format: BSD - review is highly recommended.
 License:        LicenseRef-Callaway-BSD
 URL:            https://github.com/sphinx-contrib/spelling
 Source0:        %{pypi_source}
+# Trap SystemExit when searching for importable modules
+# Backport of https://github.com/sphinx-contrib/spelling/commit/36e365848a3a
+Patch:          trap-systemexit-in-importable-module-filter.patch
 BuildArch:      noarch
 
 %if 0%{?with_python3}
@@ -122,6 +125,9 @@ rm -rf %{pypi_name}.egg-info
 
 
 %changelog
+* Thu Nov 05 2026 Karolina Surma <ksurma@redhat.com> - 7.3.3-20
+- Fix test failure with newer pbr
+
 * Thu Jul 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 7.3.3-19
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
 

diff --git a/trap-systemexit-in-importable-module-filter.patch b/trap-systemexit-in-importable-module-filter.patch
new file mode 100644
index 0000000..15c23bd
--- /dev/null
+++ b/trap-systemexit-in-importable-module-filter.patch
@@ -0,0 +1,20 @@
+Trap SystemExit raised while searching for importable modules
+
+Backport of upstream commit 36e365848a3a (sphinx-contrib/spelling#180).
+Importing a module that exits on import (e.g. setup.py with
+a newer pbr) otherwise aborts the spell check; treat it as "module not found".
+Only the filters.py hunk is backported, the upstream tests are not.
+
+--- sphinxcontrib/spelling/filters.py
++++ sphinxcontrib/spelling/filters.py
+@@ -209,8 +209,8 @@
+             self.sought_modules.add(word)
+             try:
+                 mod = importlib.util.find_spec(word)
+-            except Exception as err:
+-                # This could be an ImportError, some more detailed
++            except BaseException as err:
++                # This could be an ImportError, SystemExit, some more detailed
+                 # error out of distutils, or something else triggered
+                 # by failing to be able to import a parent package to
+                 # use the metadata to search for a subpackage.

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-15  5:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-15  5:33 [rpms/python-sphinxcontrib-spelling] rawhide: Fix the test failing with newer pbr Karolina Surma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox