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 698366 - TreeIter.userdata cannot handle value 0
TreeIter.userdata cannot handle value 0
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: general
3.8.x
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
: 700094 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-04-19 14:27 UTC by Jussi Kukkonen
Modified: 2013-05-12 00:08 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jussi Kukkonen 2013-04-19 14:27:27 UTC
I have a custom TreeModel that stores the row index in TreeIter.user_data.

In 3.8.1 (at least) it is no longer possible to store the value 0 in user_data: it will become None. This is unexpected and used to work in 3.2 at least.

I believe my use case of saving a row index in user_data is fairly common.


Here's a test case:

---
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk

iter = Gtk.TreeIter()
iter.user_data = 0
if (iter.user_data != 0):
  print "oops, unexpected user_data value '%s'" % iter.user_data
---
Comment 1 Simon Feltman 2013-04-22 10:53:32 UTC
Will also push to 3.8 branch.
Comment 3 Simon Feltman 2013-05-12 00:08:54 UTC
*** Bug 700094 has been marked as a duplicate of this bug. ***