+3.30.3 - 2018-11-27
+-------------------
+
+* GValue: fall back to the custom C marshaller to support fundamental types.
+ This makes GValue work with GstFraction. :issue:`280`
+* GValue: Work around wrong annotations for GVariant
+* Fix GObject attribute access during instance init which can lead to errors
+ with __getattr__ implementations of subclasses. This lead to criticals when
+ instantiating Gio.DBusProxy. :issue:`267`
+
+
3.30.2 - 2018-11-11
-------------------
}
/* XXX: used for Gtk.Template */
- if (PyObject_HasAttrString (wrapper, "__dontuse_ginstance_init__")) {
+ if (PyObject_HasAttrString ((PyObject*) Py_TYPE (wrapper), "__dontuse_ginstance_init__")) {
result = PyObject_CallMethod (wrapper, "__dontuse_ginstance_init__", NULL);
if (result == NULL)
PyErr_Print ();
elif gtype == TYPE_PYOBJECT:
self.set_boxed(py_value)
else:
- raise TypeError("Unknown value type %s" % gtype)
+ # Fall back to _gvalue_set which handles some more cases
+ # like fundamentals for which a converter is registered
+ _gi._gvalue_set(self, py_value)
def get_value(self):
gtype = self.g_type
elif gtype == TYPE_GTYPE:
return self.get_gtype()
elif gtype == TYPE_VARIANT:
- return self.get_variant()
+ # get_variant was missing annotations
+ # https://gitlab.gnome.org/GNOME/glib/merge_requests/492
+ return self.dup_variant()
elif gtype == TYPE_PYOBJECT:
- pass
- else:
+ return self.get_boxed()
+ elif gtype == _gi.TYPE_INVALID:
return None
+ else:
+ return _gi._gvalue_get(self)
def __repr__(self):
return '<Value (%s) %s>' % (self.g_type.name, self.get_value())
project('pygobject', 'c',
- version : '3.30.2',
+ version : '3.30.3',
meson_version : '>= 0.46.0',
default_options : [ 'warning_level=1',
'buildtype=debugoptimized'])
from distutils.spawn import find_executable
-PYGOBJECT_VERISON = "3.30.2"
+PYGOBJECT_VERISON = "3.30.3"
GLIB_VERSION_REQUIRED = "2.38.0"
GI_VERSION_REQUIRED = "1.46.0"
PYCAIRO_VERSION_REQUIRED = "1.11.1"
self.assertTrue(isinstance(data['error'], Exception))
self.assertTrue('InvalidArgs' in str(data['error']), str(data['error']))
+
+ def test_instantiate_custom_proxy(self):
+ class SomeProxy(Gio.DBusProxy):
+ def __init__(self):
+ Gio.DBusProxy.__init__(self)
+
+ SomeProxy()