Skip to content

Commit 6c96568

Browse files
committed
Revert "Merge pull request matplotlib#30535 from LangQi99/fix/import"
Upstream has fixed PyGObject in 3.51.1. This reverts commit 75e7802, reversing changes made to 352b419.
1 parent 9da2022 commit 6c96568

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

lib/matplotlib/backends/backend_gtk3.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@
1818
# :raises ValueError: If module/version is already loaded, already
1919
# required, or unavailable.
2020
gi.require_version("Gtk", "3.0")
21-
# Also require GioUnix to avoid PyGIWarning when Gio is imported
22-
# GioUnix is platform-specific and may not be available on all systems
23-
try:
24-
gi.require_version("GioUnix", "2.0")
25-
except ValueError:
26-
# GioUnix is not available on this platform, which is fine
27-
pass
2821
except ValueError as e:
2922
# in this case we want to re-raise as ImportError so the
3023
# auto-backend selection logic correctly skips.

lib/matplotlib/backends/backend_gtk4.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,6 @@
1717
# :raises ValueError: If module/version is already loaded, already
1818
# required, or unavailable.
1919
gi.require_version("Gtk", "4.0")
20-
# Also require GioUnix to avoid PyGIWarning when Gio is imported
21-
# GioUnix is platform-specific and may not be available on all systems
22-
try:
23-
gi.require_version("GioUnix", "2.0")
24-
except ValueError:
25-
# GioUnix is not available on this platform, which is fine
26-
pass
2720
except ValueError as e:
2821
# in this case we want to re-raise as ImportError so the
2922
# auto-backend selection logic correctly skips.

0 commit comments

Comments
 (0)