On Tue, Sep 11, 2012 at 02:53:30PM -0000, Michal Hruby wrote:
> Thanks for these
>
> 8 - self.set_schema_full (tuple(args), len(args))
> 9 + self.set_schema_full (tuple(args))
>
> Would be nice if pygobject didn't change something every other version :( Ideally there should be a way to make it work with new as well as old pygobject (doesn't pygobject provide it's version in some prop?)
Since recently there is a gi.version_info that could be used, but its
not available on precsie and I don't know when exactly it was added
(nor when exactly the bindings broke).
So I think there these options:
- simply require latest python-gi and change unconditionally
- I could do a try/except AttributeError but that carries the risk that
it shadows other errors so I'm not really advocating it.
On Tue, Sep 11, 2012 at 02:53:30PM -0000, Michal Hruby wrote: schema_ full (tuple(args), len(args)) schema_ full (tuple(args))
> Thanks for these
>
> 8 - self.set_
> 9 + self.set_
>
> Would be nice if pygobject didn't change something every other version :( Ideally there should be a way to make it work with new as well as old pygobject (doesn't pygobject provide it's version in some prop?)
Since recently there is a gi.version_info that could be used, but its
not available on precsie and I don't know when exactly it was added
(nor when exactly the bindings broke).
So I think there these options:
- simply require latest python-gi and change unconditionally
- I could do a try/except AttributeError but that carries the risk that
it shadows other errors so I'm not really advocating it.
- Something like: python/ Dee.py' python/ Dee.py 2012-09-11 14:41:44 +0000 python/ Dee.py 2012-09-12 10:36:47 +0000
=== modified file 'bindings/
--- bindings/
+++ bindings/
@@ -1,3 +1,4 @@
+import gi
from gi.overrides import override
from gi.importer import modules
@@ -40,7 +41,12 @@
Dee.Model. __init_ _(self)
def set_schema (self, *args): schema_ full (tuple(args)) gi.version_ info, None) schema_ full (tuple(args)) schema_ full (tuple(args), len(args))
- self.set_
+ version = getattr(
+ # mvo: I don't know when *exactly* this changed
+ if version and version[0] > 3 and version[1] > 3:
+ self.set_
+ else:
+ self.set_
def _build_row (self, args):
result = []