+commit 6fbe2580deda215896e9583b418b8bc1aceb2f96
+Author: Martin Pitt <martinpitt@gnome.org>
+Date: Mon Aug 19 17:10:52 2013 +0200
+
+ release 3.9.90
+
+ NEWS | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+commit a8d5da559ef088b05062681206758d2718946269
+Author: Martin Pitt <martinpitt@gnome.org>
+Date: Mon Aug 19 11:38:31 2013 +0200
+
+ NEWS: retroactively fix last version number
+
+ NEWS | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit aba45eb2617c4b35168089bc9028f351732a617f
+Author: Benjamin Berg <benjamin@sipsolutions.net>
+Date: Tue Aug 6 00:41:52 2013 +0200
+
+ Create GLib.Pid in the same way on python 2 and 3
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=705451
+
+ gi/_glib/pygspawn.c | 8 --------
+ 1 file changed, 8 deletions(-)
+
+commit 2d203b7529c95ba4461a5a6d4c6b67169fabc4cf
+Author: Benjamin Berg <benjamin@sipsolutions.net>
+Date: Mon Aug 5 17:04:15 2013 +0200
+
+ Use PyLong_Type.tp_new for GLib.Pid
+
+ For GLib.Pid the original implementation for __new__ needs to be used,
+ as it is able to initialize the integer correctly.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=705451
+
+ gi/_glib/pygspawn.c | 1 +
+ tests/test_subprocess.py | 1 +
+ 2 files changed, 2 insertions(+)
+
+commit c32793dafbd52eab87b14ca064b47f5a4fb9000b
+Author: Simon Feltman <sfeltman@src.gnome.org>
+Date: Mon Aug 5 14:40:38 2013 -0700
+
+ Add accumulator and accu_data arguments to GObject.Signal decorator
+
+ Update __init__, __call__, and copy methods to accept and pass
+ accumulators and associated user data through them. Update
+ accumulator unittests to use Signal decorators for testing accumulator
+ pass throughs. Verified the __gsignals__ dictionary accepts None
+ as valid values for accumulator and accu_data so specialization
+ for these arguments is not necessary.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=705533
+
+ gi/_gobject/signalhelper.py | 17 ++++++++++-----
+ tests/test_signal.py | 52
+ ++++++++++++++++++++++++---------------------
+ 2 files changed, 40 insertions(+), 29 deletions(-)
+
+commit 78f72654f5cb6c06e76ed9a532fc1ee328b60e50
+Author: Simon Feltman <sfeltman@src.gnome.org>
+Date: Mon Aug 5 14:12:24 2013 -0700
+
+ Pass return values through the GObject.Signal.emit wrapper
+
+ Return the result of GObject.emit from the Signal decorators wrapping.
+ Update unittest for decorated return type to use skipUnless for
+ Python 3.
+ Add test for Signal decorator return type.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=705530
+
+ gi/_gobject/signalhelper.py | 2 +-
+ tests/test_signal.py | 37 +++++++++++++++++++++----------------
+ 2 files changed, 22 insertions(+), 17 deletions(-)
+
+commit 08cc206afeaefd1ce50ecfd1411807225a11c8f8
+Author: Simon Feltman <sfeltman@src.gnome.org>
+Date: Mon Jul 29 03:33:40 2013 -0700
+
+ configure.ac: post-release bump to 3.9.90
+
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
commit 2d8f5490cdc078b3e56a92deb9eca71b3fc5ef17
Author: Simon Feltman <sfeltman@src.gnome.org>
Date: Mon Jul 29 02:23:02 2013 -0700
-# Makefile.in generated by automake 1.13.2 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
-3.9.3 29-Jul-2013
+3.9.90 19-Aug-2013
+ - Create GLib.Pid in the same way on python 2 and 3 (Benjamin Berg)
+ (#705451)
+ - Use PyLong_Type.tp_new for GLib.Pid (Benjamin Berg) (#705451)
+ - Add accumulator and accu_data arguments to GObject.Signal decorator
+ (Simon Feltman) (#705533)
+ - Pass return values through the GObject.Signal.emit wrapper
+ (Simon Feltman) (#705530)
+
+3.9.5 29-Jul-2013
- Ensure exceptions set in closure out argument marshaling are printed
(Simon Feltman) (#705064)
- Always raise OverflowError for marshaling integers from Python
Metadata-Version: 1.0
Name: PyGObject
-Version: 3.9.5
+Version: 3.9.90
Summary: Python bindings for GObject
Home-page: http://www.pygtk.org/
Author: James Henstridge
Maintainer: Johan Dahlin
Maintainer-email: johan@gnome.org
License: GNU LGPL
-Download-url: ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/3.9/pygobject-3.9.5.tar.gz
+Download-url: ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/3.9/pygobject-3.9.90.tar.gz
Description: Python bindings for GLib and GObject
Platform: POSIX, Windows
Classifier: Development Status :: 5 - Production/Stable
-# generated automatically by aclocal 1.13.2 -*- Autoconf -*-
+# generated automatically by aclocal 1.13.3 -*- Autoconf -*-
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
[am__api_version='1.13'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.13.2], [],
+m4_if([$1], [1.13.3], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.13.2])dnl
+[AM_AUTOMAKE_VERSION([1.13.3])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# Attempt to guess a canonical system name.
# Copyright 1992-2013 Free Software Foundation, Inc.
-timestamp='2013-05-16'
+timestamp='2013-06-10'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
ppc:Linux:*:*)
echo powerpc-unknown-linux-${LIBC}
exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-${LIBC}
+ exit ;;
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-${LIBC}
+ exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
# Configuration validation subroutine script.
# Copyright 1992-2013 Free Software Foundation, Inc.
-timestamp='2013-04-24'
+timestamp='2013-08-10'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
| avr | avr32 \
| be32 | be64 \
| bfin \
- | c4x | clipper \
+ | c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \
| epiphany \
| fido | fr30 | frv \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
- | clipper-* | craynv-* | cydra-* \
+ | c8051-* | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
os=-mingw64
;;
mingw32)
- basic_machine=i386-pc
+ basic_machine=i686-pc
os=-mingw32
;;
mingw32ce)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
msys)
- basic_machine=i386-pc
+ basic_machine=i686-pc
os=-msys
;;
mvs)
c4x-* | tic4x-*)
os=-coff
;;
+ c8051-*)
+ os=-elf
+ ;;
hexagon-*)
os=-elf
;;
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for pygobject 3.9.5.
+# Generated by GNU Autoconf 2.69 for pygobject 3.9.90.
#
# Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject>.
#
# Identity of this package.
PACKAGE_NAME='pygobject'
PACKAGE_TARNAME='pygobject'
-PACKAGE_VERSION='3.9.5'
-PACKAGE_STRING='pygobject 3.9.5'
+PACKAGE_VERSION='3.9.90'
+PACKAGE_STRING='pygobject 3.9.90'
PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject'
PACKAGE_URL='https://live.gnome.org/PyGObject/'
# 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.5 to adapt to many kinds of systems.
+\`configure' configures pygobject 3.9.90 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of pygobject 3.9.5:";;
+ short | recursive ) echo "Configuration of pygobject 3.9.90:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-pygobject configure 3.9.5
+pygobject configure 3.9.90
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
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.5, which was
+It was created by pygobject $as_me 3.9.90, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
PYGOBJECT_MINOR_VERSION=9
-$as_echo "#define PYGOBJECT_MICRO_VERSION 5" >>confdefs.h
+$as_echo "#define PYGOBJECT_MICRO_VERSION 90" >>confdefs.h
-PYGOBJECT_MICRO_VERSION=5
+PYGOBJECT_MICRO_VERSION=90
ac_config_headers="$ac_config_headers config.h"
# Define the identity of the package.
PACKAGE='pygobject'
- VERSION='3.9.5'
+ VERSION='3.9.90'
cat >>confdefs.h <<_ACEOF
# 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.5, which was
+This file was extended by pygobject $as_me 3.9.90, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
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.5
+pygobject config.status 3.9.90
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
dnl the pygobject version number
m4_define(pygobject_major_version, 3)
m4_define(pygobject_minor_version, 9)
-m4_define(pygobject_micro_version, 5)
+m4_define(pygobject_micro_version, 90)
m4_define(pygobject_version, pygobject_major_version.pygobject_minor_version.pygobject_micro_version)
dnl versions of packages we require ...
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
-scriptversion=2012-10-18.11; # UTC
+scriptversion=2013-05-30.07; # UTC
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
G
p
}' >> "$depfile"
+ echo >> "$depfile" # make sure the fragment doesn't end with a backslash
rm -f "$tmpdepfile"
;;
-# Makefile.in generated by automake 1.13.2 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
-# Makefile.in generated by automake 1.13.2 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
-# Makefile.in generated by automake 1.13.2 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
PyObject *
pyg_pid_new(GPid pid)
{
- PYGLIB_PyLongObject *pygpid;
-
-#if PY_VERSION_HEX >= 0x03000000
return PyObject_CallMethod((PyObject*)&PyGPid_Type, "__new__", "Oi",
&PyGPid_Type, pid);
-#else
- pygpid = PyObject_NEW(PyIntObject, &PyGPid_Type);
- pygpid->ob_ival = pid;
-#endif
- return (PyObject *) pygpid;
}
static void
PyGPid_Type.tp_methods = pyg_pid_methods;
PyGPid_Type.tp_init = pyg_pid_tp_init;
PyGPid_Type.tp_free = (freefunc)pyg_pid_free;
+ PyGPid_Type.tp_new = PYGLIB_PyLong_Type.tp_new;
PYGLIB_REGISTER_TYPE(d, PyGPid_Type, "Pid");
}
-# Makefile.in generated by automake 1.13.2 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
def emit(self, *args, **kargs):
"""Same as GObject.GObject.emit except there is no need to specify
the signal name."""
- self.gobj.emit(str(self), *args, **kargs)
+ return self.gobj.emit(str(self), *args, **kargs)
def __new__(cls, name='', *args, **kargs):
if callable(name):
return str.__new__(cls, name)
def __init__(self, name='', func=None, flags=_gobject.SIGNAL_RUN_FIRST,
- return_type=None, arg_types=None, doc=''):
+ return_type=None, arg_types=None, doc='', accumulator=None, accu_data=None):
"""
@param name: name of signal or closure method when used as direct decorator.
@type name: string or callable
@type arg_types: None
@param doc: documentation of signal object
@type doc: string
+ @param accumulator: accumulator method with the signature:
+ func(ihint, return_accu, handler_return, accu_data) -> boolean
+ @type accumulator: function
+ @param accu_data: user data passed to the accumulator
+ @type accu_data: object
"""
if func and not name:
name = func.__name__
self.return_type = return_type
self.arg_types = arg_types
self.__doc__ = doc
+ self.accumulator = accumulator
+ self.accu_data = accu_data
def __get__(self, instance, owner=None):
"""Returns a BoundSignal when accessed on an object instance."""
# Return a new value of this type since it is based on an immutable string.
return type(self)(name=name, func=obj, flags=self.flags,
return_type=self.return_type, arg_types=self.arg_types,
- doc=self.__doc__)
+ doc=self.__doc__, accumulator=self.accumulator, accu_data=self.accu_data)
def copy(self, newName=None):
"""Returns a renamed copy of the Signal."""
newName = self.name
return type(self)(name=newName, func=self.func, flags=self.flags,
return_type=self.return_type, arg_types=self.arg_types,
- doc=self.__doc__)
+ doc=self.__doc__, accumulator=self.accumulator, accu_data=self.accu_data)
def get_signal_args(self):
- """Returns a tuple of: (flags, return_type, arg_types)"""
- return (self.flags, self.return_type, self.arg_types)
+ """Returns a tuple of: (flags, return_type, arg_types, accumulator, accu_data)"""
+ return (self.flags, self.return_type, self.arg_types, self.accumulator, self.accu_data)
class SignalOverride(Signal):
-# Makefile.in generated by automake 1.13.2 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
-# Makefile.in generated by automake 1.13.2 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
-# Makefile.in generated by automake 1.13.2 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
-# Makefile.in generated by automake 1.13.2 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
class Foo(GObject.GObject):
- __gsignals__ = {
- 'my-acc-signal': (GObject.SignalFlags.RUN_LAST, GObject.TYPE_INT,
- (), my_accumulator, "accum data"),
- 'my-other-acc-signal': (GObject.SignalFlags.RUN_LAST, GObject.TYPE_BOOLEAN,
- (), GObject.signal_accumulator_true_handled),
- 'my-acc-first-wins': (GObject.SignalFlags.RUN_LAST, GObject.TYPE_BOOLEAN,
- (), GObject.signal_accumulator_first_wins)
- }
+ my_acc_signal = GObject.Signal(return_type=GObject.TYPE_INT,
+ flags=GObject.SignalFlags.RUN_LAST,
+ accumulator=my_accumulator,
+ accu_data="accum data")
+
+ my_other_acc_signal = GObject.Signal(return_type=GObject.TYPE_BOOLEAN,
+ flags=GObject.SignalFlags.RUN_LAST,
+ accumulator=GObject.signal_accumulator_true_handled)
+
+ my_acc_first_wins = GObject.Signal(return_type=GObject.TYPE_BOOLEAN,
+ flags=GObject.SignalFlags.RUN_LAST,
+ accumulator=GObject.signal_accumulator_first_wins)
class TestAccumulator(unittest.TestCase):
def test_accumulator(self):
inst = Foo()
- inst.connect("my-acc-signal", lambda obj: 1)
- inst.connect("my-acc-signal", lambda obj: 2)
+ inst.my_acc_signal.connect(lambda obj: 1)
+ inst.my_acc_signal.connect(lambda obj: 2)
## the value returned in the following handler will not be
## considered, because at this point the accumulator already
## reached its limit.
- inst.connect("my-acc-signal", lambda obj: 3)
- retval = inst.emit("my-acc-signal")
+ inst.my_acc_signal.connect(lambda obj: 3)
+ retval = inst.my_acc_signal.emit()
self.assertEqual(retval, 3)
def test_accumulator_true_handled(self):
inst = Foo()
- inst.connect("my-other-acc-signal", self._true_handler1)
- inst.connect("my-other-acc-signal", self._true_handler2)
+ inst.my_other_acc_signal.connect(self._true_handler1)
+ inst.my_other_acc_signal.connect(self._true_handler2)
## the following handler will not be called because handler2
## returns True, so it should stop the emission.
- inst.connect("my-other-acc-signal", self._true_handler3)
+ inst.my_other_acc_signal.connect(self._true_handler3)
self.__true_val = None
- inst.emit("my-other-acc-signal")
+ inst.my_other_acc_signal.emit()
self.assertEqual(self.__true_val, 2)
def test_accumulator_first_wins(self):
# First signal hit will always win
inst = Foo()
- inst.connect("my-acc-first-wins", self._true_handler3)
- inst.connect("my-acc-first-wins", self._true_handler1)
- inst.connect("my-acc-first-wins", self._true_handler2)
+ inst.my_acc_first_wins.connect(self._true_handler3)
+ inst.my_acc_first_wins.connect(self._true_handler1)
+ inst.my_acc_first_wins.connect(self._true_handler2)
self.__true_val = None
- inst.emit("my-acc-first-wins")
+ inst.my_acc_first_wins.emit()
self.assertEqual(self.__true_val, 3)
def _true_handler1(self, obj):
def test_get_signal_args(self):
self.assertEqual(self.Decorated.pushed.get_signal_args(),
- (GObject.SignalFlags.RUN_FIRST, None, tuple()))
+ (GObject.SignalFlags.RUN_FIRST, None, tuple(), None, None))
self.assertEqual(self.Decorated.pulled.get_signal_args(),
- (GObject.SignalFlags.RUN_LAST, None, tuple()))
+ (GObject.SignalFlags.RUN_LAST, None, tuple(), None, None))
self.assertEqual(self.Decorated.stomped.get_signal_args(),
- (GObject.SignalFlags.RUN_FIRST, None, (int,)))
+ (GObject.SignalFlags.RUN_FIRST, None, (int,), None, None))
def test_closures_called(self):
decorated = self.Decorated()
"""
+@unittest.skipUnless(sys.version_info >= (3, 0),
+ 'Argument annotations require Python 3')
class TestPython3Signals(unittest.TestCase):
AnnotatedClass = None
def setUp(self):
- if sys.version_info >= (3, 0):
- exec(annotated_class_code, globals(), globals())
- self.assertTrue('AnnotatedSignalClass' in globals())
- self.AnnotatedClass = globals()['AnnotatedSignalClass']
+ exec(annotated_class_code, globals(), globals())
+ self.assertTrue('AnnotatedSignalClass' in globals())
+ self.AnnotatedClass = globals()['AnnotatedSignalClass']
def test_annotations(self):
- if self.AnnotatedClass:
- self.assertEqual(signalhelper.get_signal_annotations(self.AnnotatedClass.sig1.func),
- (None, (int, float)))
- self.assertEqual(signalhelper.get_signal_annotations(self.AnnotatedClass.sig2_with_return.func),
- (str, (int, float)))
-
- self.assertEqual(self.AnnotatedClass.sig2_with_return.get_signal_args(),
- (GObject.SignalFlags.RUN_LAST, str, (int, float)))
- self.assertEqual(self.AnnotatedClass.sig2_with_return.arg_types,
- (int, float))
- self.assertEqual(self.AnnotatedClass.sig2_with_return.return_type,
- str)
+ self.assertEqual(signalhelper.get_signal_annotations(self.AnnotatedClass.sig1.func),
+ (None, (int, float)))
+ self.assertEqual(signalhelper.get_signal_annotations(self.AnnotatedClass.sig2_with_return.func),
+ (str, (int, float)))
+
+ self.assertEqual(self.AnnotatedClass.sig2_with_return.get_signal_args(),
+ (GObject.SignalFlags.RUN_LAST, str, (int, float), None, None))
+ self.assertEqual(self.AnnotatedClass.sig2_with_return.arg_types,
+ (int, float))
+ self.assertEqual(self.AnnotatedClass.sig2_with_return.return_type,
+ str)
+
+ def test_emit_return(self):
+ obj = self.AnnotatedClass()
+ self.assertEqual(obj.sig2_with_return.emit(1, 2.0),
+ 'test')
class TestSignalModuleLevelFunctions(unittest.TestCase):
self.assertEqual(stdin, None)
self.assertEqual(stdout, None)
self.assertEqual(stderr, None)
+ self.assertNotEqual(pid, 0)
pid.close()
id = GLib.child_watch_add(GLib.PRIORITY_HIGH, pid, cb, 12345)
self.assertEqual(self.loop.get_context().find_source_by_id(id).priority,