Hello community, here is the log from the commit of package python-gobject for openSUSE:Factory checked in at 2013-09-12 16:46:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-gobject (Old) and /work/SRC/openSUSE:Factory/.python-gobject.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-gobject" Changes: -------- --- /work/SRC/openSUSE:Factory/python-gobject/python-gobject.changes 2013-08-20 11:38:54.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-gobject.new/python-gobject.changes 2013-09-12 16:46:20.000000000 +0200 @@ -1,0 +2,21 @@ +Thu Sep 12 09:04:15 UTC 2013 - [email protected] + +- Drop pygtkcompat subpackage: the compatibility layer is no longer + used and causes adverse side-effects (like pulling in Gtk2, + which is not corectly introspectable, causing all kind of other + weird issues). + +------------------------------------------------------------------- +Mon Sep 2 13:34:14 UTC 2013 - [email protected] + +- Update to version 3.9.91: + + Fix GObject signal methods to work with new annotations + (bgo#707280). + + Fix build on C89 Compilers (bgo#707264). + + Change boxed type checking in marshaling to use __gtype__ + attribute bgo#707140). + + Use G_IS_VALUE for checking return values in closure marshaling + (bgo#707170). + + Fix PEP-8 errors in propertyhelper.py (bgo#706319). + +------------------------------------------------------------------- python3-gobject.changes: same change Old: ---- pygobject-3.9.90.tar.xz New: ---- pygobject-3.9.91.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-gobject.spec ++++++ --- /var/tmp/diff_new_pack.fbSKc5/_old 2013-09-12 16:46:21.000000000 +0200 +++ /var/tmp/diff_new_pack.fbSKc5/_new 2013-09-12 16:46:21.000000000 +0200 @@ -37,7 +37,7 @@ Summary: Python bindings for GObject License: LGPL-2.1+ Group: Development/Libraries/Python -Version: 3.9.90 +Version: 3.9.91 Release: 0 Url: http://ftp.gnome.org/pub/GNOME/sources/pygobject/ Source: http://download.gnome.org/sources/pygobject/3.9/%{_name}-%{version}.tar.xz @@ -76,18 +76,6 @@ This package contains the Python Cairo bindings for GObject. -%package pygtkcompat -Summary: Python bindings for GObject -- PyGTK Backwards Compatibility -Group: Development/Libraries/Python -Requires: %{name} = %{version} - -%description pygtkcompat -Pygobjects is an extension module for python that gives you access to -GLib's GObjects. - -This package contains a module providing backwards compatibility to -pygtk. - %package -n libpyglib-gi-2_0-python%{local_lib_ver} Summary: Python Gobject Introspeciton binding Group: System/Libraries @@ -131,6 +119,9 @@ rm -r %{buildroot}%{_includedir}/pygobject-3.0/pygobject.h rm %{buildroot}%{_libdir}/pkgconfig/pygobject-3.0.pc %endif +# Drop pygtkcompat layer.it's useless and we lack other stuff for it to work +rm %{buildroot}%{local_py_sitedir}/gi/pygtkcompat.py +rm -r %{buildroot}%{local_py_sitedir}/pygtkcompat/ rm examples/Makefile* %fdupes $RPM_BUILD_ROOT @@ -148,8 +139,6 @@ %{local_py_sitedir}/*.egg-info # Lives in cairo subpackage %exclude %{local_py_sitedir}/gi/_gi_cairo*.so -# Lives in pygtkcompat subpackage -%exclude %{local_py_sitedir}/gi/pygtkcompat.py %files -n libpyglib-gi-2_0-python%{local_lib_ver} %defattr(-, root, root) @@ -159,11 +148,6 @@ %defattr(-,root,root) %{local_py_sitedir}/gi/_gi_cairo*.so -%files pygtkcompat -%defattr(-,root,root) -%{local_py_sitedir}/gi/pygtkcompat.py -%{local_py_sitedir}/pygtkcompat/ - %files devel %defattr(-,root,root) %{_libdir}/*.so python3-gobject.spec: same change ++++++ pygobject-3.9.90.tar.xz -> pygobject-3.9.91.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pygobject-3.9.90/ChangeLog new/pygobject-3.9.91/ChangeLog --- old/pygobject-3.9.90/ChangeLog 2013-08-19 17:11:17.000000000 +0200 +++ new/pygobject-3.9.91/ChangeLog 2013-09-02 14:39:02.000000000 +0200 @@ -1,3 +1,101 @@ +commit ad8b7d1a89eb2d030a504d521f7589a4c1d835fb +Author: Martin Pitt <[email protected]> +Date: Mon Sep 2 14:38:41 2013 +0200 + + release 3.9.91 + + NEWS | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +commit 9df8eb79929025f12d51bc7f79b1d160156c2755 +Author: Simon Feltman <[email protected]> +Date: Mon Sep 2 04:19:35 2013 -0700 + + Fix GObject signal methods to work with new annotations + + Add conditional support for signal methods annotated as gpointer + or GObject.Object. This is needed to work with newer versions of + glib which changed annotations to GObject.Object (bug #685387). + + https://bugzilla.gnome.org/show_bug.cgi?id=707280 + + gi/overrides/GObject.py | 106 + ++++++++++++++++++++++++++++++------------------ + 1 file changed, 66 insertions(+), 40 deletions(-) + +commit 9b6b6c7ee6a621cba99f51857eadd622a1535118 +Author: Chun-wei Fan <[email protected]> +Date: Thu Aug 15 14:41:40 2013 +0800 + + Fix build on C89 Compilers + + Avoid a variable declaration at the middle of the block + + https://bugzilla.gnome.org/show_bug.cgi?id=707264 + + gi/pygi-closure.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 19c1a2dfb91a83a6fb0ca76b9c95c42a49a3736e +Author: Simon Feltman <[email protected]> +Date: Sun Sep 1 20:44:26 2013 -0700 + + Change boxed type checking in marshaling to use __gtype__ attribute + + Replace usage of pyg_boxed_check(pyboxed) with g_type_is_a and + pyg_type_from_object. This has the effect of using the __gtype__ + attribute stashed on object class instead of the PyGBoxed + internally held gtype. This fixes type descrepencies for objects + marshaled into overridden signal class closures and passed back + to functions taking an alias their type. + + https://bugzilla.gnome.org/show_bug.cgi?id=707140 + + gi/pygi-marshal-from-py.c | 8 +++++++- + tests/test_overrides_gtk.py | 34 ++++++++++++++++++++++++++++++++++ + 2 files changed, 41 insertions(+), 1 deletion(-) + +commit dab0c09f1996e124ca98334e5aea0852904b44b5 +Author: Simon Feltman <[email protected]> +Date: Sun Sep 1 17:49:09 2013 -0700 + + Use G_IS_VALUE for checking return values in closure marshaling + + Replace return_value argument NULL checks in GClosureMarshal + implementations with G_IS_VALUE. This checks both NULL and + validity of the value (!= G_TYPE_INVALID). This is needed + because GLib can pass either NULL or an invalid value based + on whether or not G_ENABLE_DEBUG is set. + See: https://bugzilla.gnome.org/show_bug.cgi?id=707249 + + https://bugzilla.gnome.org/show_bug.cgi?id=707170 + + gi/_gobject/pygtype.c | 4 ++-- + gi/pygi-signal-closure.c | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +commit c7b75a8c250078ac8ea28752f087ed687bd20edd +Author: Yanko Kaneti <[email protected]> +Date: Wed Aug 21 08:53:07 2013 +0200 + + Fix PEP-8 errors in propertyhelper.py + + https://bugzilla.gnome.org/show_bug.cgi?id=706319 + + Signed-off-by: Martin Pitt <[email protected]> + + gi/_gobject/propertyhelper.py | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +commit 6fdd58404103596accb6ab04d4de33846d853c58 +Author: Martin Pitt <[email protected]> +Date: Mon Aug 19 17:13:30 2013 +0200 + + configure.ac: post-release bump to 3.9.91 + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + commit 6fbe2580deda215896e9583b418b8bc1aceb2f96 Author: Martin Pitt <[email protected]> Date: Mon Aug 19 17:10:52 2013 +0200 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pygobject-3.9.90/NEWS new/pygobject-3.9.91/NEWS --- old/pygobject-3.9.90/NEWS 2013-08-19 17:09:48.000000000 +0200 +++ new/pygobject-3.9.91/NEWS 2013-09-02 14:38:21.000000000 +0200 @@ -1,3 +1,13 @@ +3.9.91 02-Sep-2013 + - Fix GObject signal methods to work with new annotations + (Simon Feltman) (#707280) + - Fix build on C89 Compilers (Chun-wei Fan) (#707264) + - Change boxed type checking in marshaling to use __gtype__ attribute + (Simon Feltman) (#707140) + - Use G_IS_VALUE for checking return values in closure marshaling + (Simon Feltman) (#707170) + - Fix PEP-8 errors in propertyhelper.py (Yanko Kaneti) (#706319) + 3.9.90 19-Aug-2013 - Create GLib.Pid in the same way on python 2 and 3 (Benjamin Berg) (#705451) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pygobject-3.9.90/PKG-INFO new/pygobject-3.9.91/PKG-INFO --- old/pygobject-3.9.90/PKG-INFO 2013-08-19 08:44:25.000000000 +0200 +++ new/pygobject-3.9.91/PKG-INFO 2013-09-02 14:26:17.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: PyGObject -Version: 3.9.90 +Version: 3.9.91 Summary: Python bindings for GObject Home-page: http://www.pygtk.org/ Author: James Henstridge @@ -8,7 +8,7 @@ Maintainer: Johan Dahlin Maintainer-email: [email protected] License: GNU LGPL -Download-url: ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/3.9/pygobject-3.9.90.tar.gz +Download-url: ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/3.9/pygobject-3.9.91.tar.gz Description: Python bindings for GLib and GObject Platform: POSIX, Windows Classifier: Development Status :: 5 - Production/Stable diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pygobject-3.9.90/configure new/pygobject-3.9.91/configure --- old/pygobject-3.9.90/configure 2013-08-19 08:44:16.000000000 +0200 +++ new/pygobject-3.9.91/configure 2013-09-02 14:26:08.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for pygobject 3.9.90. +# Generated by GNU Autoconf 2.69 for pygobject 3.9.91. # # Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject>. # @@ -591,8 +591,8 @@ # Identity of this package. PACKAGE_NAME='pygobject' PACKAGE_TARNAME='pygobject' -PACKAGE_VERSION='3.9.90' -PACKAGE_STRING='pygobject 3.9.90' +PACKAGE_VERSION='3.9.91' +PACKAGE_STRING='pygobject 3.9.91' PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject' PACKAGE_URL='https://live.gnome.org/PyGObject/' @@ -1395,7 +1395,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures pygobject 3.9.90 to adapt to many kinds of systems. +\`configure' configures pygobject 3.9.91 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1465,7 +1465,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of pygobject 3.9.90:";; + short | recursive ) echo "Configuration of pygobject 3.9.91:";; esac cat <<\_ACEOF @@ -1602,7 +1602,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -pygobject configure 3.9.90 +pygobject configure 3.9.91 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1880,7 +1880,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by pygobject $as_me 3.9.90, which was +It was created by pygobject $as_me 3.9.91, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2244,9 +2244,9 @@ PYGOBJECT_MINOR_VERSION=9 -$as_echo "#define PYGOBJECT_MICRO_VERSION 90" >>confdefs.h +$as_echo "#define PYGOBJECT_MICRO_VERSION 91" >>confdefs.h -PYGOBJECT_MICRO_VERSION=90 +PYGOBJECT_MICRO_VERSION=91 ac_config_headers="$ac_config_headers config.h" @@ -2766,7 +2766,7 @@ # Define the identity of the package. PACKAGE='pygobject' - VERSION='3.9.90' + VERSION='3.9.91' cat >>confdefs.h <<_ACEOF @@ -15332,7 +15332,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by pygobject $as_me 3.9.90, which was +This file was extended by pygobject $as_me 3.9.91, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15399,7 +15399,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -pygobject config.status 3.9.90 +pygobject config.status 3.9.91 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pygobject-3.9.90/configure.ac new/pygobject-3.9.91/configure.ac --- old/pygobject-3.9.90/configure.ac 2013-08-19 08:44:03.000000000 +0200 +++ new/pygobject-3.9.91/configure.ac 2013-08-19 17:13:17.000000000 +0200 @@ -18,7 +18,7 @@ dnl the pygobject version number m4_define(pygobject_major_version, 3) m4_define(pygobject_minor_version, 9) -m4_define(pygobject_micro_version, 90) +m4_define(pygobject_micro_version, 91) m4_define(pygobject_version, pygobject_major_version.pygobject_minor_version.pygobject_micro_version) dnl versions of packages we require ... diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pygobject-3.9.90/gi/_gobject/propertyhelper.py new/pygobject-3.9.91/gi/_gobject/propertyhelper.py --- old/pygobject-3.9.90/gi/_gobject/propertyhelper.py 2013-07-05 07:51:22.000000000 +0200 +++ new/pygobject-3.9.91/gi/_gobject/propertyhelper.py 2013-08-21 08:52:06.000000000 +0200 @@ -185,16 +185,16 @@ if minimum is not None: if minimum < self._get_minimum(): raise TypeError( - "Minimum for type %s cannot be lower than %d" % ( - self.type, self._get_minimum())) + "Minimum for type %s cannot be lower than %d" % + (self.type, self._get_minimum())) else: minimum = self._get_minimum() self.minimum = minimum if maximum is not None: if maximum > self._get_maximum(): raise TypeError( - "Maximum for type %s cannot be higher than %d" % ( - self.type, self._get_maximum())) + "Maximum for type %s cannot be higher than %d" % + (self.type, self._get_maximum())) else: maximum = self._get_maximum() self.maximum = maximum @@ -393,8 +393,8 @@ raise TypeError( "GObject subclass %r defines do_get/set_property" " and it also uses a property with a custom setter" - " or getter. This is not allowed" % ( - cls.__name__,)) + " or getter. This is not allowed" % + (cls.__name__,)) def obj_get_property(self, pspec): name = pspec.name.replace('-', '_') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pygobject-3.9.90/gi/_gobject/pygtype.c new/pygobject-3.9.91/gi/_gobject/pygtype.c --- old/pygobject-3.9.90/gi/_gobject/pygtype.c 2013-07-26 06:02:17.000000000 +0200 +++ new/pygobject-3.9.91/gi/_gobject/pygtype.c 2013-09-02 08:25:01.000000000 +0200 @@ -1362,7 +1362,7 @@ goto out; } - if (return_value && pyg_value_from_pyobject(return_value, ret) != 0) { + if (G_IS_VALUE(return_value) && pyg_value_from_pyobject(return_value, ret) != 0) { /* If we already have an exception set, use that, otherwise set a * generic one */ if (!PyErr_Occurred()) @@ -1543,7 +1543,7 @@ } Py_DECREF(method); Py_DECREF(params); - if (return_value) + if (G_IS_VALUE(return_value)) pyg_value_from_pyobject(return_value, ret); Py_DECREF(ret); pyglib_gil_state_release(state); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pygobject-3.9.90/gi/overrides/GObject.py new/pygobject-3.9.91/gi/overrides/GObject.py --- old/pygobject-3.9.90/gi/overrides/GObject.py 2013-07-26 06:02:17.000000000 +0200 +++ new/pygobject-3.9.91/gi/overrides/GObject.py 2013-09-02 14:22:34.000000000 +0200 @@ -425,20 +425,21 @@ __all__.append('signal_query') +# Check needed for glib versions which annotate signal related methods +# with a void pointer instead of GObject.Object. +# See: https://bugzilla.gnome.org/show_bug.cgi?id=685387 +_is_first_signal_arg_void = GObjectModule.signal_stop_emission.get_arguments()[0].get_pytype_hint() == 'void' + + def _get_instance_for_signal(obj): - if isinstance(obj, GObjectModule.Object): + if not _is_first_signal_arg_void: + return obj + elif isinstance(obj, GObjectModule.Object): return obj.__gpointer__ else: raise TypeError('Unsupported object "%s" for signal function' % obj) -def _wrap_signal_func(func): - @functools.wraps(func) - def wrapper(obj, *args, **kwargs): - return func(_get_instance_for_signal(obj), *args, **kwargs) - return wrapper - - class _HandlerBlockManager(object): def __init__(self, obj, handler_id): self.obj = obj @@ -466,32 +467,47 @@ __all__.append('signal_handler_block') -# The following functions wrap GI functions but coerce the first arg into -# something compatible with gpointer - -signal_handler_unblock = _wrap_signal_func(GObjectModule.signal_handler_unblock) -signal_handler_disconnect = _wrap_signal_func(GObjectModule.signal_handler_disconnect) -signal_handler_is_connected = _wrap_signal_func(GObjectModule.signal_handler_is_connected) -signal_stop_emission = _wrap_signal_func(GObjectModule.signal_stop_emission) -signal_stop_emission_by_name = _wrap_signal_func(GObjectModule.signal_stop_emission_by_name) -signal_has_handler_pending = _wrap_signal_func(GObjectModule.signal_has_handler_pending) -signal_get_invocation_hint = _wrap_signal_func(GObjectModule.signal_get_invocation_hint) -signal_connect_closure = _wrap_signal_func(GObjectModule.signal_connect_closure) -signal_connect_closure_by_id = _wrap_signal_func(GObjectModule.signal_connect_closure_by_id) -signal_handler_find = _wrap_signal_func(GObjectModule.signal_handler_find) -signal_handlers_destroy = _wrap_signal_func(GObjectModule.signal_handlers_destroy) -signal_handlers_block_matched = _wrap_signal_func(GObjectModule.signal_handlers_block_matched) -signal_handlers_unblock_matched = _wrap_signal_func(GObjectModule.signal_handlers_unblock_matched) -signal_handlers_disconnect_matched = _wrap_signal_func(GObjectModule.signal_handlers_disconnect_matched) - -__all__ += ['signal_handler_unblock', - 'signal_handler_disconnect', 'signal_handler_is_connected', - 'signal_stop_emission', 'signal_stop_emission_by_name', - 'signal_has_handler_pending', 'signal_get_invocation_hint', - 'signal_connect_closure', 'signal_connect_closure_by_id', - 'signal_handler_find', 'signal_handlers_destroy', - 'signal_handlers_block_matched', 'signal_handlers_unblock_matched', - 'signal_handlers_disconnect_matched'] +if _is_first_signal_arg_void: + # The following functions wrap GI functions but coerce the first arg into + # something compatible with gpointer + + def _wrap_signal_func(func): + @functools.wraps(func) + def wrapper(obj, *args, **kwargs): + return func(_get_instance_for_signal(obj), *args, **kwargs) + return wrapper + + signal_handler_unblock = _wrap_signal_func(GObjectModule.signal_handler_unblock) + signal_handler_disconnect = _wrap_signal_func(GObjectModule.signal_handler_disconnect) + signal_handler_is_connected = _wrap_signal_func(GObjectModule.signal_handler_is_connected) + signal_stop_emission = _wrap_signal_func(GObjectModule.signal_stop_emission) + signal_stop_emission_by_name = _wrap_signal_func(GObjectModule.signal_stop_emission_by_name) + signal_has_handler_pending = _wrap_signal_func(GObjectModule.signal_has_handler_pending) + signal_get_invocation_hint = _wrap_signal_func(GObjectModule.signal_get_invocation_hint) + signal_connect_closure = _wrap_signal_func(GObjectModule.signal_connect_closure) + signal_connect_closure_by_id = _wrap_signal_func(GObjectModule.signal_connect_closure_by_id) + signal_handler_find = _wrap_signal_func(GObjectModule.signal_handler_find) + signal_handlers_destroy = _wrap_signal_func(GObjectModule.signal_handlers_destroy) + signal_handlers_block_matched = _wrap_signal_func(GObjectModule.signal_handlers_block_matched) + signal_handlers_unblock_matched = _wrap_signal_func(GObjectModule.signal_handlers_unblock_matched) + signal_handlers_disconnect_matched = _wrap_signal_func(GObjectModule.signal_handlers_disconnect_matched) + + __all__ += ['signal_handler_unblock', + 'signal_handler_disconnect', 'signal_handler_is_connected', + 'signal_stop_emission', 'signal_stop_emission_by_name', + 'signal_has_handler_pending', 'signal_get_invocation_hint', + 'signal_connect_closure', 'signal_connect_closure_by_id', + 'signal_handler_find', 'signal_handlers_destroy', + 'signal_handlers_block_matched', 'signal_handlers_unblock_matched', + 'signal_handlers_disconnect_matched'] +else: + # First signal arg is GObject.Object but we need these as globals for + # our GObject.Object class override below + signal_handler_disconnect = GObjectModule.signal_handler_disconnect + signal_handler_unblock = GObjectModule.signal_handler_unblock + signal_handler_disconnect = GObjectModule.signal_handler_disconnect + signal_handler_is_connected = GObjectModule.signal_handler_is_connected + signal_stop_emission_by_name = GObjectModule.signal_stop_emission_by_name def signal_parse_name(detailed_signal, itype, force_detail_quark): @@ -556,6 +572,16 @@ self.obj.thaw_notify() +def _signalmethod(func): + # Function wrapper for signal functions used as instance methods. + # This is needed when the signal functions come directly from GI. + # (they are not already wrapped) + @functools.wraps(func) + def meth(*args, **kwargs): + return func(*args, **kwargs) + return meth + + class Object(GObjectModule.Object): def _unsupported_method(self, *args, **kargs): raise RuntimeError('This method is currently unsupported.') @@ -635,12 +661,12 @@ # Aliases # - disconnect = signal_handler_disconnect - handler_block = signal_handler_block - handler_unblock = signal_handler_unblock - handler_disconnect = signal_handler_disconnect - handler_is_connected = signal_handler_is_connected - stop_emission_by_name = signal_stop_emission_by_name + disconnect = _signalmethod(signal_handler_disconnect) + handler_block = _signalmethod(signal_handler_block) + handler_unblock = _signalmethod(signal_handler_unblock) + handler_disconnect = _signalmethod(signal_handler_disconnect) + handler_is_connected = _signalmethod(signal_handler_is_connected) + stop_emission_by_name = _signalmethod(signal_stop_emission_by_name) # # Deprecated Methods diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pygobject-3.9.90/gi/pygi-closure.c new/pygobject-3.9.91/gi/pygi-closure.c --- old/pygobject-3.9.90/gi/pygi-closure.c 2013-07-29 10:45:12.000000000 +0200 +++ new/pygobject-3.9.91/gi/pygi-closure.c 2013-09-02 09:23:12.000000000 +0200 @@ -33,10 +33,11 @@ GITransfer transfer) { GIArgument arg = _pygi_argument_from_object (object, type_info, transfer); + GITypeTag type_tag; if (PyErr_Occurred ()) return; - GITypeTag type_tag = g_type_info_get_tag (type_info); + type_tag = g_type_info_get_tag (type_info); if (retval == NULL) return; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pygobject-3.9.90/gi/pygi-marshal-from-py.c new/pygobject-3.9.91/gi/pygi-marshal-from-py.c --- old/pygobject-3.9.90/gi/pygi-marshal-from-py.c 2013-07-29 08:58:06.000000000 +0200 +++ new/pygobject-3.9.91/gi/pygi-marshal-from-py.c 2013-09-02 08:25:01.000000000 +0200 @@ -1827,7 +1827,13 @@ } if (g_type_is_a (g_type, G_TYPE_BOXED)) { - if (pyg_boxed_check (py_arg, g_type)) { + /* Use pyg_type_from_object to pull the stashed __gtype__ attribute + * off of the input argument instead of checking PyGBoxed.gtype + * with pyg_boxed_check. This is needed to work around type discrepancies + * in cases with aliased (typedef) types. e.g. GtkAllocation, GdkRectangle. + * See: https://bugzilla.gnomethere are .org/show_bug.cgi?id=707140 + */ + if (g_type_is_a (pyg_type_from_object (py_arg), g_type)) { arg->v_pointer = pyg_boxed_get (py_arg, void); if (transfer == GI_TRANSFER_EVERYTHING) { arg->v_pointer = g_boxed_copy (g_type, arg->v_pointer); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pygobject-3.9.90/gi/pygi-signal-closure.c new/pygobject-3.9.91/gi/pygi-signal-closure.c --- old/pygobject-3.9.90/gi/pygi-signal-closure.c 2013-07-05 07:51:22.000000000 +0200 +++ new/pygobject-3.9.91/gi/pygi-signal-closure.c 2013-09-02 08:25:01.000000000 +0200 @@ -155,7 +155,7 @@ goto out; } - if (return_value && pyg_value_from_pyobject(return_value, ret) != 0) { + if (G_IS_VALUE(return_value) && pyg_value_from_pyobject(return_value, ret) != 0) { PyErr_SetString(PyExc_TypeError, "can't convert return value to desired type"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pygobject-3.9.90/tests/test_overrides_gtk.py new/pygobject-3.9.91/tests/test_overrides_gtk.py --- old/pygobject-3.9.90/tests/test_overrides_gtk.py 2013-07-29 06:37:00.000000000 +0200 +++ new/pygobject-3.9.91/tests/test_overrides_gtk.py 2013-09-02 08:25:01.000000000 +0200 @@ -590,6 +590,40 @@ @unittest.skipUnless(Gtk, 'Gtk not available') +class TestSignals(unittest.TestCase): + class WindowWithSizeAllocOverride(Gtk.ScrolledWindow): + __gsignals__ = {'size-allocate': 'override'} + + def __init__(self): + Gtk.ScrolledWindow.__init__(self) + self._alloc_called = False + self._alloc_value = None + self._alloc_error = None + + def do_size_allocate(self, alloc): + self._alloc_called = True + self._alloc_value = alloc + + try: + Gtk.ScrolledWindow.do_size_allocate(self, alloc) + except Exception as e: + self._alloc_error = e + + def test_class_closure_override_with_aliased_type(self): + win = self.WindowWithSizeAllocOverride() + rect = Gdk.Rectangle() + rect.width = 100 + rect.height = 100 + + with realized(win): + win.show() + win.size_allocate(rect) + self.assertTrue(win._alloc_called) + self.assertIsInstance(win._alloc_value, Gdk.Rectangle) + self.assertTrue(win._alloc_error is None, win._alloc_error) + + [email protected](Gtk, 'Gtk not available') class TestBuilder(unittest.TestCase): class SignalTest(GObject.GObject): __gtype_name__ = "GIOverrideSignalTest" -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
