public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Karolina Surma <ksurma@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/pygobject3] rawhide: Avoid deprecation warnings raised on import
Date: Thu, 04 Jun 2026 10:37:58 GMT	[thread overview]
Message-ID: <178056947805.1.1792336260255665872.rpms-pygobject3-82e0e272a7ff@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/pygobject3
            Branch : rawhide
            Commit : 82e0e272a7ff92f8973305c8450081f88baf170b
            Author : Karolina Surma <ksurma@redhat.com>
            Date   : 2026-06-04T11:34:19+02:00
            Stats  : +49/-0 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/pygobject3/c/82e0e272a7ff92f8973305c8450081f88baf170b?branch=rawhide

            Log:
            Avoid deprecation warnings raised on import

This fixes the matplotlib's test_correct_key which has started failing
due to DeprecationWarning from this package treated as errors.

---
diff --git a/545.patch b/545.patch
new file mode 100644
index 0000000..171e358
--- /dev/null
+++ b/545.patch
@@ -0,0 +1,47 @@
+From a538585ebb562bbf9c52587f0d4210029687e6e0 Mon Sep 17 00:00:00 2001
+From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
+Date: Wed, 6 May 2026 22:43:52 -0400
+Subject: [PATCH] De-duplicate deprecations of module attributes
+
+This allows generically deprecating a set of symbols (e.g., everything
+in `GLibUnix` that's in `GLib`) and then providing a more-specific
+deprecation for special symbols (e.g., `GLib.unix_signal_add_full`),
+without triggering a deprecation from the first when making the second.
+---
+ gi/overrides/__init__.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/gi/overrides/__init__.py b/gi/overrides/__init__.py
+index c475b3953..bc2b3eec6 100644
+--- a/gi/overrides/__init__.py
++++ b/gi/overrides/__init__.py
+@@ -14,7 +14,7 @@ from pkgutil import extend_path
+ __path__ = extend_path(__path__, __name__)
+ 
+ 
+-# namespace -> (attr, replacement)
++# namespace -> {attr -> replacement}
+ _deprecated_attrs = {}
+ 
+ 
+@@ -154,7 +154,7 @@ def load_overrides(introspection_module):
+ 
+     # Replace deprecated module level attributes with a descriptor
+     # which emits a warning when accessed.
+-    for attr, replacement in _deprecated_attrs.pop(namespace, []):
++    for attr, replacement in _deprecated_attrs.pop(namespace, {}).items():
+         try:
+             value = getattr(proxy, attr)
+         except AttributeError:
+@@ -252,7 +252,7 @@ def deprecated_attr(namespace, attr, replacement):
+     :param str replacement:
+         The replacement text which will be included in the warning.
+     """
+-    _deprecated_attrs.setdefault(namespace, []).append((attr, replacement))
++    _deprecated_attrs.setdefault(namespace, {})[attr] = replacement
+ 
+ 
+ def deprecated_init(
+-- 
+GitLab
+

diff --git a/pygobject3.spec b/pygobject3.spec
index 30bcd77..e07ecdd 100644
--- a/pygobject3.spec
+++ b/pygobject3.spec
@@ -13,6 +13,8 @@ Summary:        Python bindings for GObject Introspection
 License:        LGPL-2.1-or-later
 URL:            https://wiki.gnome.org/Projects/PyGObject
 Source0:        https://download.gnome.org/sources/pygobject/%{major_minor_version}/pygobject-%{version}.tar.gz
+# Don't raise GLib.unix_signal_add_full deprecation warnings on import (merged upstream)
+Patch:          https://gitlab.gnome.org/GNOME/pygobject/-/merge_requests/545.patch
 
 BuildRequires:  pkgconfig(cairo-gobject)
 BuildRequires:  pkgconfig(girepository-2.0) >= %{glib2_version}

                 reply	other threads:[~2026-06-04 10:37 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=178056947805.1.1792336260255665872.rpms-pygobject3-82e0e272a7ff@fedoraproject.org \
    --to=ksurma@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