pygobject issueshttps://gitlab.gnome.org/GNOME/pygobject/-/issues2021-09-20T07:14:15Zhttps://gitlab.gnome.org/GNOME/pygobject/-/issues/487AttributeError: module 'socket' has no attribute 'socketpair'2021-09-20T07:14:15ZFranz UlenaersAttributeError: module 'socket' has no attribute 'socketpair'my python source program = hello.py contains following lines :
```python
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
window = Gtk.Window(title="Hello World")
window.show()
window.connect("destroy", Gtk.mai...my python source program = hello.py contains following lines :
```python
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
window = Gtk.Window(title="Hello World")
window.show()
window.connect("destroy", Gtk.main_quit)
Gtk.main()
```
i have following problem when i run this python program :
python3.9 hello.py
```python
Traceback (most recent call last):
File "/data/py/hello.py", line 8, in <module>
Gtk.main()
File "/usr/lib/python3/dist-packages/gi/overrides/Gtk.py", line 1648, in main
with wakeup_on_signal():
File "/usr/lib/python3.9/contextlib.py", line 117, in __enter__
return next(self.gen)
File "/usr/lib/python3/dist-packages/gi/_ossighelper.py", line 76, in wakeup_on_signal
read_socket, write_socket = socket.socketpair()
AttributeError: module 'socket' has no attribute 'socketpair'
```
Any idea how to solve this problem ?
```
Operating System: Debian GNU/Linux 11 (bullseye)
Kernel: Linux 5.10.0-8-amd64
Architecture: x86-64
```https://gitlab.gnome.org/GNOME/pygobject/-/issues/486Make "Getting Started" docs for Windows mention to run MSYS2.EXE as admin2021-09-19T19:13:41ZDimi MikiMake "Getting Started" docs for Windows mention to run MSYS2.EXE as adminOn Windoww, just run MSYS2.exe as an administrator to avoid pacman update errors due to database lock. Should be mentioned on the msys2 installation guide to save hours of pointless trying for so many users!On Windoww, just run MSYS2.exe as an administrator to avoid pacman update errors due to database lock. Should be mentioned on the msys2 installation guide to save hours of pointless trying for so many users!https://gitlab.gnome.org/GNOME/pygobject/-/issues/485Gtk.Window.set_skip_taskbar_hint seems to be broken2021-09-08T07:51:08ZMick KrippendorfGtk.Window.set_skip_taskbar_hint seems to be brokenThe following problem is the same in Python 2.7.18 and 3.9.7. OS is Solus Linux 4.3 Fortitude with Budgie, GNOME version is 40.4.0, PyGObject is 3.40.0, Terminator is 2.1.1.
I've been using Terminator for more that a year now and since ...The following problem is the same in Python 2.7.18 and 3.9.7. OS is Solus Linux 4.3 Fortitude with Budgie, GNOME version is 40.4.0, PyGObject is 3.40.0, Terminator is 2.1.1.
I've been using Terminator for more that a year now and since yesterday - after playing around with its config file - its hide_from_taskbar flag doesn't work anymore, the application icon is shown in the task list regardless of the setting. I was able to trace this (lack of) behavior back to the place in the code where Terminator calls Gtk.Window.set_skip_taskbar_hint(value), and whatever value I provide, the result is the same, the application icon doesn't go away. It looks like I'm not the only one with this problem, see https://github.com/gnome-terminator/terminator/issues/475. As is mentioned there, the Terminator code that handles hide_from_taskbar hasn't been changed for years. Next, I'm gonna try and write a minimal program that shows this behavior. I'll post a link here.https://gitlab.gnome.org/GNOME/pygobject/-/issues/484GTK4 FileChooser(Dialog|Native) don't fully support parent argument2023-10-09T10:55:29ZElliott Sales de AndradeGTK4 FileChooser(Dialog|Native) don't fully support parent argumentThere is a `parent` argument to [`gtk_file_chooser_dialog_new`](https://docs.gtk.org/gtk4/ctor.FileChooserDialog.new.html) and [`gtk_file_chooser_native_new`](https://docs.gtk.org/gtk4/ctor.FileChooserNative.new.html), but pygobject does...There is a `parent` argument to [`gtk_file_chooser_dialog_new`](https://docs.gtk.org/gtk4/ctor.FileChooserDialog.new.html) and [`gtk_file_chooser_native_new`](https://docs.gtk.org/gtk4/ctor.FileChooserNative.new.html), but pygobject does not support it on either.
Using the following code:
```python
import gi
gi.require_version('Gtk', '4.0')
from gi.repository import Gtk, Gio # noqa
app = Gtk.Application.new('com.example.Example',
Gio.ApplicationFlags.NON_UNIQUE)
app.connect('activate', lambda *args, **kwargs: None)
app.register()
win = Gtk.Window()
app.add_window(win)
win.show()
#
# Create dialog here.
#
dialog = ...
dialog.show()
app.run()
```
Then, creating a `FileChooserDialog` with `new`:
```python
dialog = Gtk.FileChooserDialog.new(title='Foo', parent=win,
action=Gtk.FileChooserAction.SAVE)
```
fails entirely:
```
Traceback (most recent call last):
File "gtk4-test.py", line 15, in <module>
dialog = Gtk.FileChooserDialog.new(title='Foo', parent=win,
TypeError: Dialog constructor cannot be used to create instances of a subclass FileChooserDialog
```
Passing it to the class directly:
```python
dialog = Gtk.FileChooserDialog(title='Foo', parent=win,
action=Gtk.FileChooserAction.SAVE)
```
warns from both sides:
```
/usr/lib/python3.9/site-packages/gi/overrides/Gtk.py:522: Warning: g_object_new_is_valid_property: property 'parent' of object class 'GtkFileChooserDialog' is not writable
_window_init(self, *args, **kwargs)
Gtk-Message: 01:50:45.646: GtkDialog mapped without a transient parent. This is discouraged.
```
though it does appear.
Creating a native file chooser using the class name:
```python
native = Gtk.FileChooserNative(title='Foo', parent=win,
action=Gtk.FileChooserAction.SAVE)
```
fails and doesn't run:
```
Traceback (most recent call last):
File "/home/elliott/code/matplotlib/gtk4-test.py", line 23, in <module>
native = Gtk.FileChooserNative(title='Foo', parent=win,
TypeError: gobject `GtkFileChooserNative' doesn't support property `parent'
```
Using `new` instead does appear to work?
```python
native = Gtk.FileChooserNative.new(title='Foo', parent=win,
action=Gtk.FileChooserAction.SAVE)
```
but the inspector says it doesn't have a parent. I'm not sure if that's the correct way to check that.https://gitlab.gnome.org/GNOME/pygobject/-/issues/483EventController.get_current_event() causes SEGFAULT2023-10-23T19:39:54ZArjan Molenaaramolenaar@gnome.orgEventController.get_current_event() causes SEGFAULTWhile porting some code from GTK+ 3 to GTK 4 I ran into the following issue: calling EventController.get_current_event in a controller signal handler causes the application to crash.
Minimal example:
```python
"""
This little program ...While porting some code from GTK+ 3 to GTK 4 I ran into the following issue: calling EventController.get_current_event in a controller signal handler causes the application to crash.
Minimal example:
```python
"""
This little program shows how one can crasg a PyGObject
application by simply requesting the latest event from
a controller.
1. Start this script
2. Click on the window
"""
import gi
gi.require_version("Gtk", '4.0')
from gi.repository import Gtk
def on_pressed(ctrl, n_press, x, y):
# This will cause a SEGFAULT:
print(ctrl.get_current_event())
def window():
ctrl = Gtk.GestureClick()
ctrl.connect("pressed", on_pressed)
w = Gtk.Window.new()
w.add_controller(ctrl)
w.show()
return w
def main():
app = Gtk.Application.new("org.gaphor.gaphas.ClickTest", 0)
def activate(app):
win = window()
app.add_window(win)
app.connect("activate", activate)
app.run()
if __name__ == "__main__":
main()
```
Output:
```
/home/arjan/Development/gaphas/test_get_current_event.py:19: Warning: g_object_get_qdata: assertion 'G_IS_OBJECT (object)' failed
print(ctrl.get_current_event())
/home/arjan/Development/gaphas/test_get_current_event.py:19: Warning: g_object_is_floating: assertion 'G_IS_OBJECT (object)' failed
print(ctrl.get_current_event())
/home/arjan/Development/gaphas/test_get_current_event.py:19: Warning: g_object_ref_sink: assertion 'G_IS_OBJECT (object)' failed
print(ctrl.get_current_event())
** (python:27655): CRITICAL **: 16:13:08.868: pygobject_register_wrapper: assertion 'PyObject_TypeCheck(self, &PyGObject_Type)' failed
<gi.repository.Gdk.ButtonEvent object at 0x7f5594557ee0>
[1] 27655 segmentation fault (core dumped) python test_get_current_event.py
```https://gitlab.gnome.org/GNOME/pygobject/-/issues/482More high-level documentation for individual projects like GOA?2021-08-11T15:58:13ZElsie HuppMore high-level documentation for individual projects like GOA?> Note: I'm changing this issue to better reflect the problem I'm having.
Right now there doesn't seem to be any sort of Python wrapper for [Gnome Online Accounts](https://gitlab.gnome.org/GNOME/gnome-online-accounts). Would it be withi...> Note: I'm changing this issue to better reflect the problem I'm having.
Right now there doesn't seem to be any sort of Python wrapper for [Gnome Online Accounts](https://gitlab.gnome.org/GNOME/gnome-online-accounts). Would it be within scope for this to be added to PyGObject? Or would it be better for it to be a separate package on [PyPI](https://pypi.org/)?
FWIW there's [a Rust wrapper for GOA](https://crates.io/crates/goa) on crates.io, but it hasn't been updated in two years.https://gitlab.gnome.org/GNOME/pygobject/-/issues/481test_overrides_gtk.py::test_menu_popup crashes because of a Gdk warning2023-10-26T15:25:12ZAleksandr Mezintest_overrides_gtk.py::test_menu_popup crashes because of a Gdk warningWhen I try to run tests locally:
```
tests/test_overrides_gtk.py .Gdk-Message: 19:57:21.930: Window 0x5555562fe1a0 is a temporary window without parent, application will not be able to position it on screen.
(moo:755748): Gdk-WARNING *...When I try to run tests locally:
```
tests/test_overrides_gtk.py .Gdk-Message: 19:57:21.930: Window 0x5555562fe1a0 is a temporary window without parent, application will not be able to position it on screen.
(moo:755748): Gdk-WARNING **: 19:57:21.930: Couldn't map as window 0x5555562fe1a0 as popup because it doesn't have a parent
Thread 1 "python" received signal SIGTRAP, Trace/breakpoint trap.
g_log_writer_default (log_level=<optimized out>, fields=0x7fffffff6a40, n_fields=6, user_data=0x0) at ../glib/glib/gmessages.c:556
556 G_BREAKPOINT ();
(gdb) bt
#0 g_log_writer_default (log_level=<optimized out>, fields=0x7fffffff6a40, n_fields=6, user_data=0x0) at ../glib/glib/gmessages.c:556
#1 0x00007ffff6705c25 in g_log_structured_array (n_fields=6, fields=0x7fffffff6a40, log_level=G_LOG_LEVEL_WARNING) at ../glib/glib/gmessages.c:1964
#2 g_log_structured_array (log_level=G_LOG_LEVEL_WARNING, fields=0x7fffffff6a40, n_fields=6) at ../glib/glib/gmessages.c:1937
#3 0x00007ffff6705e25 in g_log_structured_standard (log_domain=0x7ffff56a9014 "Gdk", log_level=G_LOG_LEVEL_WARNING, file=<optimized out>, line=<optimized out>, func=<optimized out>, message_format=<optimized out>)
at ../glib/glib/gmessages.c:2021
#4 0x00007ffff567ab95 in () at /usr/lib/libgdk-3.so.0
#5 0x00007ffff564d528 in () at /usr/lib/libgdk-3.so.0
#6 0x00007ffff34b77a3 in () at /usr/lib/libgtk-3.so.0
#7 0x00007ffff667faf6 in _g_closure_invoke_va (param_types=0x0, n_params=0, args=0x7fffffff7250, instance=0x555555969230, return_value=<optimized out>, closure=<optimized out>) at ../glib/gobject/gclosure.c:873
#8 g_signal_emit_valist (instance=0x555555969230, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffff7250) at ../glib/gobject/gsignal.c:3406
#9 0x00007ffff667fc64 in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at ../glib/gobject/gsignal.c:3553
#10 0x00007ffff349c0b9 in gtk_widget_map () at /usr/lib/libgtk-3.so.0
#11 0x00007ffff34bc2de in () at /usr/lib/libgtk-3.so.0
#15 0x00007ffff667fc64 in <emit signal ??? on instance 0x555555969230 [GtkWindow]> (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at ../glib/gobject/gsignal.c:3553
#12 0x00007ffff6661ebf in g_closure_invoke (closure=0x5555559b27e0, return_value=0x0, n_param_values=1, param_values=0x7fffffff7500, invocation_hint=0x7fffffff7480) at ../glib/gobject/gclosure.c:810
#13 0x00007ffff667dc2f in signal_emit_unlocked_R
(node=node@entry=0x5555559b73a0, detail=detail@entry=0, instance=instance@entry=0x555555969230, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffff7500)
at ../glib/gobject/gsignal.c:3671
#14 0x00007ffff667fa07 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffff76b0) at ../glib/gobject/gsignal.c:3497
#16 0x00007ffff349c797 in gtk_widget_show () at /usr/lib/libgtk-3.so.0
#17 0x00007ffff334eabf in () at /usr/lib/libgtk-3.so.0
#18 0x00007ffff6649acd in () at /usr/lib/libffi.so.7
#19 0x00007ffff664903a in () at /usr/lib/libffi.so.7
#20 0x00007ffff6809097 in pygi_invoke_c_callable (function_cache=0x55555626db40, state=<optimized out>, py_args=<optimized out>, py_kwargs=<optimized out>) at gi/pygi-invoke.c:684
#21 0x00007ffff67fefa8 in pygi_function_cache_invoke (function_cache=<optimized out>, py_args=py_args@entry=0x7ffff2189cf0, py_kwargs=py_kwargs@entry=0x0) at gi/pygi-cache.c:862
#22 0x00007ffff6809876 in pygi_callable_info_invoke (user_data=0x0, cache=<optimized out>, kwargs=0x0, py_args=0x7ffff2189cf0, info=<optimized out>) at gi/pygi-invoke.c:727
#23 0x00007ffff6803a4e in _callable_info_call (kwargs=0x0, args=0x7ffff2125fa0, self=0x7ffff077bcf0) at gi/pygi-info.c:580
#24 _callable_info_call (self=0x7ffff077bcf0, args=0x7ffff2125fa0, kwargs=0x0) at gi/pygi-info.c:557
#25 0x00007ffff7d04813 in _PyObject_MakeTpCall () at /usr/lib/libpython3.9.so.1.0
#26 0x00007ffff7d006f5 in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.9.so.1.0
#27 0x00007ffff7d0be3b in _PyFunction_Vectorcall () at /usr/lib/libpython3.9.so.1.0
#28 0x00007ffff7cfba5b in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.9.so.1.0
#29 0x00007ffff7d0be3b in _PyFunction_Vectorcall () at /usr/lib/libpython3.9.so.1.0
#30 0x00007ffff7cfe3d1 in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.9.so.1.0
#31 0x00007ffff7cfa489 in () at /usr/lib/libpython3.9.so.1.0
#32 0x00007ffff7d0c05e in _PyFunction_Vectorcall () at /usr/lib/libpython3.9.so.1.0
#33 0x00007ffff7cfe3d1 in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.9.so.1.0
#34 0x00007ffff7cfa489 in () at /usr/lib/libpython3.9.so.1.0
#35 0x00007ffff7d0c05e in _PyFunction_Vectorcall () at /usr/lib/libpython3.9.so.1.0
#36 0x00007ffff7cfc65a in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.9.so.1.0
#37 0x00007ffff7cfa489 in () at /usr/lib/libpython3.9.so.1.0
#38 0x00007ffff7d0c05e in _PyFunction_Vectorcall () at /usr/lib/libpython3.9.so.1.0
#39 0x00007ffff7d00107 in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.9.so.1.0
#40 0x00007ffff7d0be3b in _PyFunction_Vectorcall () at /usr/lib/libpython3.9.so.1.0
#41 0x00007ffff7d1ade4 in () at /usr/lib/libpython3.9.so.1.0
#42 0x00007ffff7d00107 in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.9.so.1.0
#43 0x00007ffff7cfa489 in () at /usr/lib/libpython3.9.so.1.0
#44 0x00007ffff7d0c05e in _PyFunction_Vectorcall () at /usr/lib/libpython3.9.so.1.0
#45 0x00007ffff7d04218 in _PyObject_FastCallDictTstate () at /usr/lib/libpython3.9.so.1.0
```
- PyGObject - git master
- gobject-introspection - 1.68.0
- glib - 2.68.3
- gtk3 - 3.24.30
- Arch Linux, Gnome Shell on Wayland (if it matters).
Tried running tests under xvfb-run - same issue.https://gitlab.gnome.org/GNOME/pygobject/-/issues/480Are dispose and unroot vfuncs exposed?2021-07-11T13:56:13ZMaximilianoAre dispose and unroot vfuncs exposed?When overriding the methods
```
def do_unroot(self):
print("unrooted")
Gtk.Widget.do_unroot(self)
def do_dispose(self):
print("Disposed")
```
They do not seem to be executed when widgets are removed or...When overriding the methods
```
def do_unroot(self):
print("unrooted")
Gtk.Widget.do_unroot(self)
def do_dispose(self):
print("Disposed")
```
They do not seem to be executed when widgets are removed or when windows are closed. Looking at gtk4-rs it seems these should be executed.https://gitlab.gnome.org/GNOME/pygobject/-/issues/479Support PEP 3622021-07-14T00:18:46ZAleksandr MezinSupport PEP 362https://www.python.org/dev/peps/pep-0362/
`__signature__` is almost the same as current `__doc__`, but structured, instead of a plain string. And `__doc__` currently isn't correct for functions returning tuples.
`inspect.signature()` s...https://www.python.org/dev/peps/pep-0362/
`__signature__` is almost the same as current `__doc__`, but structured, instead of a plain string. And `__doc__` currently isn't correct for functions returning tuples.
`inspect.signature()` support for all functions/methods should allow writing a fairly trivial `.pyi` stub generator.https://gitlab.gnome.org/GNOME/pygobject/-/issues/478Not possible to implement Gdk.Paintable2021-08-17T09:53:14ZMaximilianoNot possible to implement Gdk.PaintableWhen trying to do
```python
from gi.repository import, Gtk, Gdk
class Paintable(Gtk.Widget, Gdk.Paintable):
def do_snapshot(self, snapshot, width, height):
return
```
One gets an error
```
TypeError: Method do_snap...When trying to do
```python
from gi.repository import, Gtk, Gdk
class Paintable(Gtk.Widget, Gdk.Paintable):
def do_snapshot(self, snapshot, width, height):
return
```
One gets an error
```
TypeError: Method do_snapshot() on class Gtk.Widget is ambiguous with methods in base classes Gtk.Widget and Gdk.Paintable
```https://gitlab.gnome.org/GNOME/pygobject/-/issues/477Meson error with option pycairo disabled2023-07-03T06:13:46ZChris DuncanMeson error with option pycairo disabledWhen building with -Dpycairo=disabled, the following error occurs:
../tests/meson.build:124:15: ERROR: Unknown variable "pycairo_dep"
The tests meson.build is checking a pycairo_dep object which has not been created due to the clause i...When building with -Dpycairo=disabled, the following error occurs:
../tests/meson.build:124:15: ERROR: Unknown variable "pycairo_dep"
The tests meson.build is checking a pycairo_dep object which has not been created due to the clause in the root meson.build: `if not with_pycairo.disabled()`https://gitlab.gnome.org/GNOME/pygobject/-/issues/476DynamicImporter needs to implement find_spec() for Python 3.102021-09-19T19:14:15ZMichał GórnyDynamicImporter needs to implement find_spec() for Python 3.10Lack of `find_spec()` method on `DynamicImporter` causes Python 3.10 to emit a `ImportWarning`. Since many pytest-based packages use `-Werror`, they effectively tend to error out on this warning if pygobject happens to be installed.
Un...Lack of `find_spec()` method on `DynamicImporter` causes Python 3.10 to emit a `ImportWarning`. Since many pytest-based packages use `-Werror`, they effectively tend to error out on this warning if pygobject happens to be installed.
Unfortunately, I don't really know what it should do.
```python
$ python3.10 -Werror
Python 3.10.0b3 (default, Jun 18 2021, 05:50:25) [GCC 11.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import importlib
>>> importlib.import_module('gi.repository.Gtk')
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 939, in _find_spec
AttributeError: 'DynamicImporter' object has no attribute 'find_spec'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1002, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 941, in _find_spec
File "<frozen importlib._bootstrap>", line 914, in _find_spec_legacy
ImportWarning: DynamicImporter.find_spec() not found; falling back to find_module()
```https://gitlab.gnome.org/GNOME/pygobject/-/issues/475Some Gdk class methods requires arguments even they dont2022-12-25T22:01:09ZDave Patrick CabertoSome Gdk class methods requires arguments even they dontI'm not sure if I am doing it correctly, but classes such as Seat, Monitor, Display requires arguments even if they shouldn't in pygobjectI'm not sure if I am doing it correctly, but classes such as Seat, Monitor, Display requires arguments even if they shouldn't in pygobjecthttps://gitlab.gnome.org/GNOME/pygobject/-/issues/474Gtk.BindingArg: Missing wrapper for d union2021-05-22T13:49:19ZJohn DoeGtk.BindingArg: Missing wrapper for d unionHello,
I am trying to use the function [`Gtk.BindingEntry.add_signall()`](https://lazka.github.io/pgi-docs/#Gtk-3.0/classes/BindingEntry.html#Gtk.BindingEntry.add_signall) the last argument to that function is `binding_args` which is a ...Hello,
I am trying to use the function [`Gtk.BindingEntry.add_signall()`](https://lazka.github.io/pgi-docs/#Gtk-3.0/classes/BindingEntry.html#Gtk.BindingEntry.add_signall) the last argument to that function is `binding_args` which is a list of [`Gtk.BindingArg`](https://lazka.github.io/pgi-docs/Gtk-3.0/classes/BindingArg.html#Gtk.BindingArg) arguments. From reading the gtk+3.0 C code, I assume that the `Gtk.BindingArg` type is supposed to wrap [`struct GtkBindingArg`](https://developer.gnome.org/gtk3/stable/gtk3-Bindings.html#GtkBindingArg) which is defined as follows:
```C
struct GtkBindingArg {
GType arg_type;
union {
glong long_data;
gdouble double_data;
gchar *string_data;
} d;
};
```
Apart from the `arg_type`, it also contains a named union `d`, which contains value fields which are accessed according to `arg_type`. However, from the Python perspective there doesn't seem to be any way to access the `d` union. So either the documentation for `Gtk.BindingArg` is unclear or the `Gtk.BindingArg` type is missing a wrapper for the union. In any case, it seems to me that it is currently impossible to use the `Gtk.BindingEntry.add_signall()` and other functions which rely on `Gtk.BindingArg` directly.https://gitlab.gnome.org/GNOME/pygobject/-/issues/473Python 3.10 warning: DynamicImporter.find_spec() not found; falling back to f...2021-09-19T20:17:40ZKalev LemberPython 3.10 warning: DynamicImporter.find_spec() not found; falling back to find_module()With Python 3.10.0b1, pygobject emits the following warning:
```
ImportWarning: DynamicImporter.find_spec() not found; falling back to find_module()
```
https://docs.python.org/3.10/whatsnew/3.10.html#deprecated explains:
Starting in ...With Python 3.10.0b1, pygobject emits the following warning:
```
ImportWarning: DynamicImporter.find_spec() not found; falling back to find_module()
```
https://docs.python.org/3.10/whatsnew/3.10.html#deprecated explains:
Starting in this release, there will be a concerted effort to begin cleaning up old import semantics that were kept for Python 2.7 compatibility. Specifically, find_loader()/find_module() (superseded by find_spec()), load_module() (superseded by exec_module()), module_repr() (which the import system takes care of for you), the __package__ attribute (superseded by __spec__.parent), the __loader__ attribute (superseded by __spec__.loader), and the __cached__ attribute (superseded by __spec__.cached) will slowly be removed (as well as other classes and methods in importlib). ImportWarning and/or DeprecationWarning will be raised as appropriate to help identify code which needs updating during this transition.https://gitlab.gnome.org/GNOME/pygobject/-/issues/472Crashes when testing fuzzer2021-06-02T15:45:02ZRafał MikrutCrashes when testing fuzzerHi, when I installed PyGobject and run https://github.com/qarmin/GtkFuzzer(simple one script), then I got crash with `Segmentation fault (core dumped)`
I opened GTK issue about it - https://gitlab.gnome.org/GNOME/gtk/-/issues/3952 - but...Hi, when I installed PyGobject and run https://github.com/qarmin/GtkFuzzer(simple one script), then I got crash with `Segmentation fault (core dumped)`
I opened GTK issue about it - https://gitlab.gnome.org/GNOME/gtk/-/issues/3952 - but I think that this is partially caused by bugs in Gobject/PyGobject.
I will appreciate any help in developing the project, since I'm only beginner in Python and GTK.https://gitlab.gnome.org/GNOME/pygobject/-/issues/471GTK4 Creating a Gsk.RenderNode* does not return a GObject2023-10-24T09:13:23ZJackCasualGTK4 Creating a Gsk.RenderNode* does not return a GObjectTrying to append a RenderNode to a snapshot.
According to documentation it should accept the given type.
https://docs.gtk.org/gtk4/method.Snapshot.append_node.html
But it does not. Thanks for your work :)
```
ViewMath.py:42: Warning: g_...Trying to append a RenderNode to a snapshot.
According to documentation it should accept the given type.
https://docs.gtk.org/gtk4/method.Snapshot.append_node.html
But it does not. Thanks for your work :)
```
ViewMath.py:42: Warning: g_object_get_qdata: assertion 'G_IS_OBJECT (object)' failed`
node = Gsk.TextNode.new()
ViewMath.py:42: Warning: g_object_is_floating: assertion 'G_IS_OBJECT (object)' failed
node = Gsk.TextNode.new()
** (python3:26120): CRITICAL **: 00:00:11.077: pygobject_register_wrapper: assertion 'PyObject_TypeCheck(self, &PyGObject_Type)' failed
Traceback (most recent call last):
File "ViewMath.py", line 44, in do_snapshot
snapshot.append_node(node)
TypeError: expected GObject but got <gi.repository.Gsk.TextNode object at 0x7fc019fd3130>
Segmentation fault (core dumped)
```https://gitlab.gnome.org/GNOME/pygobject/-/issues/470Expose GObject.Object.run_dispose()2021-05-05T13:33:12ZChristoph ReiterExpose GObject.Object.run_dispose()With Gtk.Widget.destroy() gone we need a way to break cycles (remove signal handlers etc.).
Maybe GObject.Object.run_dispose() would help there.With Gtk.Widget.destroy() gone we need a way to break cycles (remove signal handlers etc.).
Maybe GObject.Object.run_dispose() would help there.https://gitlab.gnome.org/GNOME/pygobject/-/issues/469"TypeError: constructor returned NULL" when constructor can return NULL per d...2021-04-26T22:26:08ZNeui"TypeError: constructor returned NULL" when constructor can return NULL per documentation[`Gdk.Cursor.new_for_display()`](https://lazka.github.io/pgi-docs/Gdk-3.0/classes/Cursor.html#Gdk.Cursor.new_for_display)/[`gdk_cursor_new_for_display()`](https://developer.gnome.org/gdk3/stable/gdk3-Cursors.html#gdk-cursor-new-for-displ...[`Gdk.Cursor.new_for_display()`](https://lazka.github.io/pgi-docs/Gdk-3.0/classes/Cursor.html#Gdk.Cursor.new_for_display)/[`gdk_cursor_new_for_display()`](https://developer.gnome.org/gdk3/stable/gdk3-Cursors.html#gdk-cursor-new-for-display) can according to the documentation return `None`/`NULL`. However, it seems PyGObject doesn't like that:
```
Traceback (most recent call last):
File "/app/lib/python3.8/site-packages/GTG/gtk/editor/taskview.py", line 616, in on_mouse_move
cursor = Gdk.Cursor.new_for_display(window.get_display(),
TypeError: constructor returned NULL
```
(From https://github.com/getting-things-gnome/gtg/issues/621#issuecomment-827155121)
While possibly valid (when preferring exceptions over return values), it doesn't match with the documentation.
I'm not sure whenever it is intentional or not.https://gitlab.gnome.org/GNOME/pygobject/-/issues/468Gdk.FileList is not usable2021-10-08T11:19:17ZRomain VigierGdk.FileList is not usableHello!
When using a `Gtk.DropTarget` with the `Gdk.FileList` type, when dropping files, I get a `Gdk.FileList`. However, nothing can be done with it.
[According to Matthias Clasen](https://discourse.gnome.org/t/drag-dropping-files-with...Hello!
When using a `Gtk.DropTarget` with the `Gdk.FileList` type, when dropping files, I get a `Gdk.FileList`. However, nothing can be done with it.
[According to Matthias Clasen](https://discourse.gnome.org/t/drag-dropping-files-with-gtk4/6084/2), it is a GSlist of GFiles, so, [according to the documentation](https://pygobject.readthedocs.io/en/latest/guide/api/basic_types.html#other-types), it should be available as a List.
Am I doing something wrong or is it not implemented?
---
The code I'm using:
```python
def on_drop(
widget: Gtk.DropTarget,
value: Any,
x: int,
y: int):
if isinstance(value, Gdk.FileList):
print(dir(value))
drop_target = Gtk.DropTarget.new(Gdk.FileList, Gdk.DragAction.COPY)
drop_target.connect("drop", on_drop)
widget.add_controller(drop_target)
```
Result of `print(dir(value))`:
```
['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__gtype__', '__hash__', '__info__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_clear_boxed', 'copy']
```