public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/pygobject3] rawhide: Avoid deprecation warnings raised on import
@ 2026-06-04 10:37 Karolina Surma
0 siblings, 0 replies; only message in thread
From: Karolina Surma @ 2026-06-04 10:37 UTC (permalink / raw)
To: git-commits
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}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-04 10:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-04 10:37 [rpms/pygobject3] rawhide: Avoid deprecation warnings raised on import Karolina Surma
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox