{{ message }}
gtk: Add more explicit version requirements - #30533
Merged
Merged
Conversation
Member
Author
Contributor
|
What about try:
gi.require_version("GioUnix", "2.0")
except ValueError:
# GioUnix is not available on this platform, which is fine
passI tried it in #30535 |
QuLogic
force-pushed
the
gtk-require-version
branch
from
September 9, 2025 06:38
8a720cb to
93a5b91
Compare
Member
|
Sorry I was going down the issue list in order and merged #30535 before I got to this one. |
Member
Author
|
That is okay; this has turned into more of a cleanup on the tests a bit than fully fixing the original issue. |
QuLogic
force-pushed
the
gtk-require-version
branch
from
September 18, 2025 07:10
93a5b91 to
7d56088
Compare
Member
Author
Member
|
Is the test failure real? It's suspicious that a gtk test segfaults after this change. |
Member
Author
|
It does seem related, yes. Previously, GTK4 would never fully be hit by this test because GTK3 was already imported. How it manages to segfault though, I'm unsure just yet. |
tacaswell
reviewed
Sep 18, 2025
QuLogic
force-pushed
the
gtk-require-version
branch
from
September 19, 2025 02:52
7d56088 to
1ae4f92
Compare
Member
Author
QuLogic
force-pushed
the
gtk-require-version
branch
from
September 19, 2025 05:09
1ae4f92 to
34fb109
Compare
This adds requirements for all of Gdk/GdkPixbuf before using them, as we do for Gtk. Note that Gio/GLib/GObject are already accepted without version by PyGObject as they are tied to the version it's compiled against. Fixes matplotlib#30525
This test has been an expected failure since it was created, and in that time, `gtk_test_widget_send_key` was never made to work, nor was a replacement found. In GTK4, that API doesn't exist either.
For example, GTK3 and GTK4 conflict, and which one is tested depends on which one loads first. Running in a subprocess ensures that both work, but we only do that for backends as adding ~100 more subprocesses is overkill.
QuLogic
force-pushed
the
gtk-require-version
branch
from
October 22, 2025 23:43
34fb109 to
996736d
Compare
timhoffm
approved these changes
Oct 23, 2025
ksunden
approved these changes
Dec 11, 2025
andreas16700
added a commit
to andreas16700/matplotlib
that referenced
this pull request
Jan 29, 2026
…rsion BASELINE RUN for Linux (ubuntu-22.04) and Windows (windows-latest) variants. Upstream changes: - backend_gtk3.py: Replace GioUnix with Gdk require_version - backend_gtk4.py: Add Gdk and GdkPixbuf require_version - test_backend_gtk3.py: Remove flaky test_correct_key test Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

PR summary
This adds requirements for all of Gdk/GdkPixbuf
/Gio/GLib/GObjectbefore using them, as we do for Gtk.Note, Gdk is bunded with Gtk, so it's the only one that changes versions depending on backend.
Fixes #30525
PR checklist