-
Notifications
You must be signed in to change notification settings - Fork 383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GTK: Migrate to GTK4 #1211
Comments
Issue #1161 may occur due to the use of depreciated function Gdk.Device.grab() |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Since basically all of Gdk.Screen is depreciated with Gdk.Display, I'm hoping that focusing on that class first will improve Wayland usability. |
Comment 1Yeah, this is much easier with compiled languages. Here we can only see the deprecations through at runtime. But you should not need to switch to GTK 4, you should be able to enable the deprecation warnings (silenced by default) with the following patch: --- a/mypaint.py
+++ b/mypaint.py
@@ -26,6 +26,9 @@ import os.path
from os.path import join, isdir, dirname, abspath
import re
import logging
+import warnings
+import gi
+warnings.simplefilter('default', gi.PyGIDeprecationWarning)
logger = logging.getLogger('mypaint')
if sys.version_info >= (3,): There are also some deprecations which need to be enabled with (Though for some reason I am not getting all the warnings I would expect. Edit: asked on pygobject chat.) There was a feature request for mypy to find deprecations using static analysis but it fizzled out due to a lack of standard deprecation markings. Looks like those has been accepted since in PEP-0702 but it will take time until they are recognized by tooling. And since we do not do static analysis currently, we would need to start first. Also since the bindings are generated at runtime, we would need to employ pygobject/pygobject-stubs#165. Comment 2Quoting Neui from the GNOME Python chat:
|
It's about time, isn't it?
I'll update this issue as I better understand the codebase and libraries. For now, we're starting with the guide found in GTK's documentation.
Tasks
The text was updated successfully, but these errors were encountered: