public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Tomas Popela <tpopela@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/pyxdg] f45: Fix test_inheritance test failure with shared-mime-info 2.5.0
Date: Thu, 13 Aug 2026 07:21:50 GMT	[thread overview]
Message-ID: <178660571006.1.11928867590333119287.rpms-pyxdg-faa52c5f81f6@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/pyxdg
            Branch : f45
            Commit : faa52c5f81f6ed7cbd9116979a1b6b6716c314ce
            Author : Tomas Popela <tpopela@redhat.com>
            Date   : 2026-08-13T09:21:39+02:00
            Stats  : +23/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/pyxdg/c/faa52c5f81f6ed7cbd9116979a1b6b6716c314ce?branch=f45

            Log:
            Fix test_inheritance test failure with shared-mime-info 2.5.0

Assisted-by: Claude Code

---
diff --git a/pyxdg-fix-test-mime-inheritance.patch b/pyxdg-fix-test-mime-inheritance.patch
new file mode 100644
index 0000000..893ee97
--- /dev/null
+++ b/pyxdg-fix-test-mime-inheritance.patch
@@ -0,0 +1,15 @@
+--- a/test/test_mime.py	2026-08-13 08:48:47.937849559 +0200
++++ b/test/test_mime.py	2026-08-13 08:53:01.072858460 +0200
+@@ -152,9 +152,10 @@
+     def test_inheritance(self):
+         text_python = Mime.lookup('text/x-python')
+         self.check_mimetype(text_python, 'text', 'x-python')
+-        text_plain = Mime.lookup('text/plain')
+         app_executable = Mime.lookup('application/x-executable')
+-        self.assertEqual(text_python.inherits_from(), set([text_plain, app_executable]))
++        parents = text_python.inherits_from()
++        self.assertTrue(len(parents) > 0)
++        self.assertIn(app_executable, parents)
+     
+     def test_is_text(self):
+         assert Mime._is_text(b'abcdef \n')

diff --git a/pyxdg.spec b/pyxdg.spec
index 4d2c09f..8a89f26 100644
--- a/pyxdg.spec
+++ b/pyxdg.spec
@@ -1,6 +1,6 @@
 Name:           pyxdg
 Version:        0.28
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Python library to access freedesktop.org standards
 License:        LGPL-2.0-only
 URL:            http://freedesktop.org/Software/pyxdg
@@ -11,6 +11,9 @@ Patch0:         pyxdg-replace-imp-with-importlib.patch
 Patch1:         pyxdg-handle-python-3.14-ast.Str-changes.patch
 # https://cgit.freedesktop.org/xdg/pyxdg/commit/?id=63033ac306aa26d32e1439417e59ae8f8a4c9820
 Patch2:         pyxdg-handle-python-3.15-deprecations.patch
+# Fix test_inheritance failure with shared-mime-info >= 2.5
+# https://gitlab.freedesktop.org/xdg/shared-mime-info/-/commit/5b8e53fd59dd5a5b9445b455402dd94cd64dc962
+Patch3:         pyxdg-fix-test-mime-inheritance.patch
 
 BuildArch:      noarch
 # These are needed for the tests.
@@ -34,6 +37,7 @@ package contains a Python 3 version of PyXDG.
 %patch -P0 -p1 -b .replace-imp-with-importlib
 %patch -P1 -p1 -b .handle-python-3.14-ast.Str-changes
 %patch -P2 -p1 -b .handle-python-3.15-deprecations
+%patch -P3 -p1 -b .fix-test-mime-inheritance
 
 # fix symlink example
 rm -rf test/example/png_symlink
@@ -60,6 +64,9 @@ popd
 %doc AUTHORS ChangeLog README TODO
 
 %changelog
+* Thu Aug 13 2026 Tomas Popela <tpopela@redhat.com> - 0.28-4
+- Fix test_inheritance test failure with shared-mime-info 2.5.0
+
 * Thu Jul 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.28-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
 

                 reply	other threads:[~2026-08-13  7:21 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=178660571006.1.11928867590333119287.rpms-pyxdg-faa52c5f81f6@fedoraproject.org \
    --to=tpopela@redhat.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