Bug#743208: python3-gi: Ctrl-C does not abort Gtk.main()

Roland Koebler r.koebler at yahoo.de
Mon Mar 31 13:49:38 UTC 2014


Package: python3-gi
Version: 3.2.2-2
Severity: important
Tags: upstream

Dear Maintainer,

when starting a Python-GTK+-program from a terminal, pressing Ctrl-C
does nothing. Usually, Ctrl-C aborts programs, and it did with older
PyGTK-versions, but it doesn't with python3-gi; the same applies to
python-gi, and it probably also applies to upstream.

It looks like KeyboardInterrupt or SIGINT is catched in Gtk.main(),
which is a very bad idea, and results in totally unexpected behaviour,
making it impossible to abort a program with Ctrl-C.

Example:

- normal behaviour of Ctrl-C in Python:

  $ python
  >>> while(1): pass
  ...
  ^CTraceback (most recent call last):
    File "<stdin>", line 1, in <module>
   KeyboardInterrupt

- python3-gi/python-gi behaviour:

  $ python
  >>> from gi.repository import Gtk
  >>> Gtk.main()
  ^C^C^C^C^C^C^C^C^C^C

- So, to stop Gtk.main(), I would manually have to kill Python:

  ^Z
  [1]+  Stopped                 python
  $ ps |grep python
  12517 pts/35   00:00:01 python
  $ kill 12517
  $ fg
  python
  Terminated
  $

This not only applies to running GTK+ in the interactive Python-interpreter,
but to all Python-GTK+-programs.


-- System Information:
Debian Release: 7.4
  APT prefers stable-updates
  APT policy: (990, 'stable-updates'), (990, 'stable'), (160, 'testing'), (150, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python3-gi depends on:
ii  gir1.2-glib-2.0        1.32.1-1
ii  libc6                  2.13-38+deb7u1
ii  libffi5                3.0.10-3
ii  libgirepository-1.0-1  1.32.1-1
ii  libglib2.0-0           2.33.12+really2.32.4-5
ii  python3                3.2.3-6

python3-gi recommends no packages.

python3-gi suggests no packages.

-- no debconf information




More information about the pkg-gnome-maintainers mailing list