After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 671318 - Draw signal not working with Python 3
Draw signal not working with Python 3
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: general
3.1.x
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2012-03-04 19:25 UTC by Osmo Salomaa
Modified: 2012-04-22 18:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Draw signal test case (435 bytes, text/x-python)
2012-03-04 19:25 UTC, Osmo Salomaa
Details

Description Osmo Salomaa 2012-03-04 19:25:32 UTC
Created attachment 208963 [details]
Draw signal test case

I'm porting code to Python 3, GTK 3 and PyGI. Documentation [1] tells me that "The GtkWidget 'expose-event' signal has been replaced by a new 'draw' signal". However, when I try connecting to this signal, it doesn't work as expected.

I'll attach a simple test case, which should just print to stdout, when the callback is called. For me, it (1) prints nothing, like the callback doesn't get called at all and (2) it will hang after I close the window, i.e. Gtk.main_quit, which should be called on delete-event doesn't fully exit. Commenting out the "draw" signal connection makes problem (2) go away. The problem exists only with Python 3, if I try the same test case with Python 2, it works as expected.

I'm using Python 3.2.2, PyGobject 3.1.0 and GTK+ 3.2.3.

[1] http://developer.gnome.org/gtk3/3.3/ch25s02.html
Comment 1 Paolo Borelli 2012-03-05 22:18:49 UTC
The testcase works for me with the python3 and the pygobject shipped on fedora 16
Comment 2 Martin Pitt 2012-04-22 15:46:23 UTC
This also works for me, using current pygobject 3.2 from either upstream, Debian, and Ubuntu.
Comment 3 Osmo Salomaa 2012-04-22 18:00:22 UTC
The test case works for me know.

I had not noticed a transition from python3-gobject to python3-gi in Debian unstable. Either my installation was broken or the bug was fixed with pygobject 3.2, which I just now installed.
Comment 4 Martin Pitt 2012-04-22 18:09:24 UTC
Thanks for checking! I'll close this report then.