-commit 8ac474c15199ca00c729a73af9c926172657b842
+commit fd020e783c0dacea3320225b4ddd57d6a0fce7ea
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date: Mon Feb 20 19:33:56 2012 +0100
+
+ Prepare 3.1.1 release
+
+ NEWS | 18 ++++++++++++++++++
+ 1 files changed, 18 insertions(+), 0 deletions(-)
+
+commit 99485d96811667ef7a7a393b68b7361733157d61
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date: Sat Feb 18 00:38:05 2012 +0100
+
+ Don't use C99 style
+
+ gi/pygi-cache.c | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 0739c39f6282d95fc17ee406fa1151d074b0450d
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date: Thu Feb 16 16:42:53 2012 +0100
+
+ Add test for GPtrArray with transfer full
+
+ This complements the already existing test for a "transfer container"
+ return
+ array. We can't verify the internal refcount as these arrays get
+ marshalled
+ internally, but at least we can verify that it does not crash due to
+ double-free.
+
+ tests/test_everything.py | 10 +++++++++-
+ 1 files changed, 9 insertions(+), 1 deletions(-)
+
+commit 087a104f66793a981a0c02f1c7ab9cc1cf659da3
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date: Wed Feb 15 13:36:39 2012 +0100
+
+ Drop obsolete g_thread_init()
+
+ Not necessary any more since glib 2.24, and we depend on 2.31.
+
+ gi/_glib/pyglib.c | 3 ---
+ 1 files changed, 0 insertions(+), 3 deletions(-)
+
+commit 66fb610e45912a7def29e5848577d280ef55643a
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date: Wed Feb 15 13:35:33 2012 +0100
+
+ Fix deprecated g_source_get_current_time()
+
+ Use g_get_real_time() instead as recommended by the
+ documentation. This also
+ simplifies the code.
+
+ gi/_glib/pygsource.c | 4 +---
+ 1 files changed, 1 insertions(+), 3 deletions(-)
+
+commit 18342edded05d3d9cccf648ed92bc1cac95c51eb
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date: Wed Feb 15 13:31:23 2012 +0100
+
+ Fix deprecated g_value_[gs]et_char()
+
+ Replace with _schar(). We depend on glib >= 2.31 already.
+
+ gi/_gobject/ffi-marshaller.c | 2 +-
+ gi/_gobject/pygtype.c | 6 +++---
+ gi/pygi-argument.c | 2 +-
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+commit 3dfb8dcbe7cf09dc170433fc48d3273c6ea9448e
+Author: Simon Schampijer <simon@schampijer.de>
+Date: Thu Feb 2 19:06:01 2012 +0100
+
+ Make pygiconvert.sh correctly convert gtk.gdk.x11_*
+
+ Looking at the gir file gtk.gdk.x11_* should get converted to
+ GdkX11.x11_*. Fixing pygiconvert.sh to do so.
+
+ pygi-convert.sh | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 3af5016978df598d5fd1c225cc49bb2c04dc4e35
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date: Fri Feb 10 13:29:41 2012 +0100
+
+ Raise required glib version to 2.31 because of g_value_(get|set)_schar
+
+ Commit ee62df4d2fc0cc63c2f29d3ad9b47b875dbd5f89 introduced both calls
+
+ configure.ac | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 50c3b1bad3ea79750649f4b48fce0adbfaba5268
+Author: Dieter Verfaillie <dieterv@optionexplicit.be>
+Date: Fri Feb 10 09:28:36 2012 +0100
+
+ Fix cset_first typo
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=649267
+
+ gi/_gobject/pygparamspec.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 6ab542fb3ec1031922ba65664d77bbaac0df453e
+Author: Bastian Winkler <buz@netbuz.org>
+Date: Mon Nov 14 14:41:08 2011 +0100
+
+ pygi-convert: Handle Clutter and Cogl
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=664496
+
+ pygi-convert.sh | 76
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 76 insertions(+), 0 deletions(-)
+
+commit 4aeb27efc43e131de5d0bc0f60dca7c1d34c3d45
+Author: Cédric Krier <cedric.krier@b2ck.com>
+Date: Fri Feb 10 09:04:18 2012 +0100
+
+ Provide access to gpointer struct values
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=668356
+
+ Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
+
+ gi/pygi-argument.c | 3 ++-
+ gi/pygi-info.c | 13 +++++++++++++
+ tests/test_everything.py | 21 +++++++++++++++++++++
+ 3 files changed, 36 insertions(+), 1 deletions(-)
+
+commit 5c0b20cc1a261cb7430a5251dffe60da698033b5
+Author: Paolo Borelli <pborelli@gnome.org>
+Date: Thu Feb 9 18:15:42 2012 +0100
+
+ Add some GType tests
+
+ Use what was recently added in g-i
+
+ tests/test_gi.py | 17 +++++++++++++++--
+ 1 files changed, 15 insertions(+), 2 deletions(-)
+
+commit ea7778f6f37a6fc38f88d89d4b6cae8be0ed9753
+Author: Paolo Borelli <pborelli@gnome.org>
+Date: Thu Feb 9 18:14:52 2012 +0100
+
+ Split GStrv and array variant tests in their own classes
+
+ Also tidy up the spacing a bit
+
+ tests/test_gi.py | 29 +++++++++++++++++++++++------
+ 1 files changed, 23 insertions(+), 6 deletions(-)
+
+commit db7f9be319d3cf52aef300fbac60cabb7ff57276
+Author: Paolo Borelli <pborelli@gnome.org>
+Date: Wed Feb 8 22:23:30 2012 +0100
+
+ Add unit test for builder's connect_after
+
+ tests/test_overrides.py | 8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+commit 671f9b0dd73ac41a84caf9d1f04cec351bc01b47
+Author: Ryan Lortie <desrt@desrt.ca>
+Date: Wed Feb 8 16:06:22 2012 -0500
+
+ fix GtkBuilder signal connection 'after' logic
+
+ All GtkBuilder signals are presently being connected 'after', ignoring
+ what is specified in the builder XML. This is due to an obvious logic
+ error.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=669705
+
+ gi/overrides/Gtk.py | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 1d23d8006be98b77a0134fddd23b76df05e489fa
+Author: Patrick Welche <prlw1@cam.ac.uk>
+Date: Tue Feb 7 11:49:58 2012 +0000
+
+ test(1) uses '=' to test if strings are identical
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=669598
+
+ m4/python.m4 | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 945fd18e531c2131440af93dcd89f6c63abbfd7c
+Author: Ryan Lortie <desrt@desrt.ca>
+Date: Tue Feb 7 13:42:19 2012 -0500
+
+ pygspawn: improve error checking
+
+ gspawn 'argv' and 'envp' parameters expect sequences of strings. This
+ is enforced by checking that the passed argument is a sequence
+ and that
+ each item returned from it is a string.
+
+ We do now, however, verify that each item can be successfully
+ taken from
+ the sequence. 'os.environ' is an example of an object that passes
+ PySequence_Check() but fails to return objects from PySequence_ITEM().
+
+ Add a simple NULL check to avoid the crash.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=669594
+
+ gi/_glib/pygspawn.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 8fc969c45d6d720400dc6c9ef391d0ca93f14b5a
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date: Mon Feb 6 19:15:53 2012 +0100
+
+ Post release version bump to 3.1.1
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit f76b2fe6d37be76bf129ee2adee90b2cc0eee56e
Author: Sebastian Pölsterl <sebp@k-d-w.org>
Date: Mon Feb 6 19:11:52 2012 +0100
NEWS | 34 ++++++++++++++++++++++++++++++++++
1 files changed, 34 insertions(+), 0 deletions(-)
-commit 18996ae455fb01a1e53a3826f0a1e79d06097c5b
+commit c09d0dffc5a570d5ae4df1ae07b2e5594c3ca1bf
Author: Sebastian Pölsterl <sebp@k-d-w.org>
Date: Mon Feb 6 19:04:41 2012 +0100
+3.1.1 20-Feb-2012
+ - Don't use C99 style (Sebastian Pölsterl)
+ - Add test for GPtrArray with transfer full (Martin Pitt)
+ - Drop obsolete g_thread_init() (Martin Pitt)
+ - Fix deprecated g_source_get_current_time() (Martin Pitt)
+ - Fix deprecated g_value_[gs]et_char() (Martin Pitt)
+ - Make pygiconvert.sh correctly convert gtk.gdk.x11_* (Simon Schampijer)
+ - Raise required glib version to 2.31 because of g_value_(get|set)_schar (Sebastian Pölsterl)
+ - Fix cset_first typo (Dieter Verfaillie)
+ - pygi-convert: Handle Clutter and Cogl (Bastian Winkler)
+ - Provide access to gpointer struct values (Cédric Krier)
+ - Add some GType tests (Paolo Borelli)
+ - Split GStrv and array variant tests in their own classes (Paolo Borelli)
+ - Add unit test for builder's connect_after (Paolo Borelli)
+ - fix GtkBuilder signal connection 'after' logic (Ryan Lortie)
+ - test(1) uses '=' to test if strings are identical (Patrick Welche)
+ - pygspawn: improve error checking (Ryan Lortie)
+
3.1.0 06-Feb-2012
- Updated DOAP file to only include people currently actively working on the project (Sebastian Pölsterl)
- Revert "Convert all strings to utf-8 encoding when retrieving from TreeModel" (Sebastian Pölsterl)
Metadata-Version: 1.0
Name: PyGObject
-Version: 3.1.0
+Version: 3.1.1
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.1/pygobject-3.1.0.tar.gz
+Download-url: ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/3.1/pygobject-3.1.1.tar.gz
Description: Python bindings for GLib and GObject
Platform: POSIX, Windows
Classifier: Development Status :: 5 - Production/Stable
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for pygobject 3.1.0.
+# Generated by GNU Autoconf 2.68 for pygobject 3.1.1.
#
# 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.1.0'
-PACKAGE_STRING='pygobject 3.1.0'
+PACKAGE_VERSION='3.1.1'
+PACKAGE_STRING='pygobject 3.1.1'
PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject'
PACKAGE_URL=''
# 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.1.0 to adapt to many kinds of systems.
+\`configure' configures pygobject 3.1.1 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.1.0:";;
+ short | recursive ) echo "Configuration of pygobject 3.1.1:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-pygobject configure 3.1.0
+pygobject configure 3.1.1
generated by GNU Autoconf 2.68
Copyright (C) 2010 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.1.0, which was
+It was created by pygobject $as_me 3.1.1, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
PYGOBJECT_MINOR_VERSION=1
-$as_echo "#define PYGOBJECT_MICRO_VERSION 0" >>confdefs.h
+$as_echo "#define PYGOBJECT_MICRO_VERSION 1" >>confdefs.h
-PYGOBJECT_MICRO_VERSION=0
+PYGOBJECT_MICRO_VERSION=1
ac_config_headers="$ac_config_headers config.h"
# Define the identity of the package.
PACKAGE='pygobject'
- VERSION='3.1.0'
+ VERSION='3.1.1'
cat >>confdefs.h <<_ACEOF
Report bugs to <bug-libtool@gnu.org>."
lt_cl_version="\
-pygobject config.lt 3.1.0
+pygobject config.lt 3.1.1
configured by $0, generated by GNU Autoconf 2.68.
Copyright (C) 2010 Free Software Foundation, Inc.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for headers required to compile python extensions" >&5
$as_echo_n "checking for headers required to compile python extensions... " >&6; }
-if test "x$PYTHON_INCLUDES" == x; then
+if test "x$PYTHON_INCLUDES" = x; then
PYTHON_CONFIG=`which $PYTHON`-config
if test -x "$PYTHON_CONFIG"; then
PYTHON_INCLUDES=`$PYTHON_CONFIG --includes 2>/dev/null`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libraries required to embed python" >&5
$as_echo_n "checking for libraries required to embed python... " >&6; }
py_exec_prefix=`$PYTHON -c "import sys; print(sys.exec_prefix)"`
-if test "x$PYTHON_LIBS" == x; then
+if test "x$PYTHON_LIBS" = x; then
PYTHON_LIBS="-L${py_prefix}/lib -lpython${PYTHON_VERSION}"
fi
-if test "x$PYTHON_LIB_LOC" == x; then
+if test "x$PYTHON_LIB_LOC" = x; then
PYTHON_LIB_LOC="${py_prefix}/lib"
fi
PKG_CONFIG=no
fi
- min_glib_version=2.24.0
+ min_glib_version=2.31.0
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB - version >= $min_glib_version" >&5
$as_echo_n "checking for GLIB - version >= $min_glib_version... " >&6; }
pkg_cv_GIO_CFLAGS="$GIO_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= 2.24.0\""; } >&5
- ($PKG_CONFIG --exists --print-errors "gio-2.0 >= 2.24.0") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= 2.31.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "gio-2.0 >= 2.31.0") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_GIO_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= 2.24.0" 2>/dev/null`
+ pkg_cv_GIO_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= 2.31.0" 2>/dev/null`
else
pkg_failed=yes
fi
pkg_cv_GIO_LIBS="$GIO_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= 2.24.0\""; } >&5
- ($PKG_CONFIG --exists --print-errors "gio-2.0 >= 2.24.0") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= 2.31.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "gio-2.0 >= 2.31.0") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_GIO_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= 2.24.0" 2>/dev/null`
+ pkg_cv_GIO_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= 2.31.0" 2>/dev/null`
else
pkg_failed=yes
fi
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- GIO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gio-2.0 >= 2.24.0" 2>&1`
+ GIO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gio-2.0 >= 2.31.0" 2>&1`
else
- GIO_PKG_ERRORS=`$PKG_CONFIG --print-errors "gio-2.0 >= 2.24.0" 2>&1`
+ GIO_PKG_ERRORS=`$PKG_CONFIG --print-errors "gio-2.0 >= 2.31.0" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$GIO_PKG_ERRORS" >&5
- as_fn_error $? "Package requirements (gio-2.0 >= 2.24.0) were not met:
+ as_fn_error $? "Package requirements (gio-2.0 >= 2.31.0) were not met:
$GIO_PKG_ERRORS
pkg_cv_GI_CFLAGS="$GI_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.24.0
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.31.0
gobject-introspection-1.0 >= 1.29.0
\""; } >&5
- ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.24.0
+ ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.31.0
gobject-introspection-1.0 >= 1.29.0
") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_GI_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.24.0
+ pkg_cv_GI_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.31.0
gobject-introspection-1.0 >= 1.29.0
" 2>/dev/null`
else
pkg_cv_GI_LIBS="$GI_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.24.0
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.31.0
gobject-introspection-1.0 >= 1.29.0
\""; } >&5
- ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.24.0
+ ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.31.0
gobject-introspection-1.0 >= 1.29.0
") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_GI_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.24.0
+ pkg_cv_GI_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.31.0
gobject-introspection-1.0 >= 1.29.0
" 2>/dev/null`
else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- GI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= 2.24.0
+ GI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= 2.31.0
gobject-introspection-1.0 >= 1.29.0
" 2>&1`
else
- GI_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= 2.24.0
+ GI_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= 2.31.0
gobject-introspection-1.0 >= 1.29.0
" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$GI_PKG_ERRORS" >&5
- as_fn_error $? "Package requirements (glib-2.0 >= 2.24.0
+ as_fn_error $? "Package requirements (glib-2.0 >= 2.31.0
gobject-introspection-1.0 >= 1.29.0
) were not met:
# 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.1.0, which was
+This file was extended by pygobject $as_me 3.1.1, which was
generated by GNU Autoconf 2.68. 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.1.0
+pygobject config.status 3.1.1
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
dnl the pygobject version number
m4_define(pygobject_major_version, 3)
m4_define(pygobject_minor_version, 1)
-m4_define(pygobject_micro_version, 0)
+m4_define(pygobject_micro_version, 1)
m4_define(pygobject_version, pygobject_major_version.pygobject_minor_version.pygobject_micro_version)
dnl versions of packages we require ...
m4_define(introspection_required_version, 1.29.0)
m4_define(py2cairo_required_version, 1.2.0)
m4_define(py3cairo_required_version, 1.10.0)
-m4_define(glib_required_version, 2.24.0)
-m4_define(gio_required_version, 2.24.0)
+m4_define(glib_required_version, 2.31.0)
+m4_define(gio_required_version, 2.31.0)
AC_INIT(pygobject, pygobject_version,
[http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject])
AC_SUBST(GI_DATADIR)
if test "$enable_cairo" != no; then
- if test $build_py3k = true; then
+ if test $build_py3k = true; then
PKG_CHECK_MODULES(PYCAIRO,
py3cairo >= py3cairo_required_version
)
return TRUE;
PyEval_InitThreads();
- if (!g_threads_got_initialized)
- g_thread_init(NULL);
-
_PyGLib_API->threads_enabled = TRUE;
pyglib_thread_state_tls_key = PyThread_create_key();
static PyObject *
pyg_source_get_current_time(PyGSource *self)
{
- GTimeVal timeval;
double ret;
CHECK_DESTROYED(self, NULL);
- g_source_get_current_time(self->source, &timeval);
- ret = (double)timeval.tv_sec + (double)timeval.tv_usec * 0.000001;
+ ret = g_get_real_time() * 0.000001;
return PyFloat_FromDouble(ret);
}
argv = g_new0(char *, len + 1);
for (i = 0; i < len; ++i) {
PyObject *tmp = PySequence_ITEM(pyargv, i);
- if (!PYGLIB_PyUnicode_Check(tmp)) {
+ if (tmp == NULL || !PYGLIB_PyUnicode_Check(tmp)) {
PyErr_SetString(PyExc_TypeError,
"gi._glib.spawn_async: "
"first argument must be a sequence of strings");
envp = g_new0(char *, len + 1);
for (i = 0; i < len; ++i) {
PyObject *tmp = PySequence_ITEM(pyenvp, i);
- if (!PYGLIB_PyUnicode_Check(tmp)) {
+ if (tmp == NULL || !PYGLIB_PyUnicode_Check(tmp)) {
PyErr_SetString(PyExc_TypeError,
"gi._glib.spawn_async: "
"second argument must be a sequence of strings");
g_value_set_string (gvalue, *(gchar**)value);
break;
case G_TYPE_CHAR:
- g_value_set_char (gvalue, *(gchar*)value);
+ g_value_set_schar (gvalue, *(gchar*)value);
break;
case G_TYPE_UCHAR:
g_value_set_uchar (gvalue, *(guchar*)value);
} else if (G_IS_PARAM_SPEC_STRING(pspec)) {
if (!strcmp(attr, "__members__")) {
return Py_BuildValue("[ssssssssssssss]", "__doc__", "__gtype__",
- "blurb", "cset_firth", "cset_nth", "default_value",
+ "blurb", "cset_first", "cset_nth", "default_value",
"ensure_non_null", "flags", "name", "nick",
"null_fold_if_empty", "owner_type", "substitutor",
"value_type");
case G_TYPE_CHAR:
#if PY_VERSION_HEX < 0x03000000
if (PyString_Check(obj)) {
- g_value_set_char(value, PyString_AsString(obj)[0]);
+ g_value_set_schar(value, PyString_AsString(obj)[0]);
} else
#endif
if (PyUnicode_Check(obj)) {
tmp = PyUnicode_AsUTF8String(obj);
- g_value_set_char(value, PYGLIB_PyBytes_AsString(tmp)[0]);
+ g_value_set_schar(value, PYGLIB_PyBytes_AsString(tmp)[0]);
Py_DECREF(tmp);
} else {
PyErr_Clear();
else
break;
case G_TYPE_CHAR: {
- gint8 val = g_value_get_char(value);
+ gint8 val = g_value_get_schar(value);
return PYGLIB_PyUnicode_FromStringAndSize((char *)&val, 1);
}
case G_TYPE_UCHAR: {
if not _callable(handler):
raise TypeError('Handler %s is not a method or function' % handler_name)
- after = flags or GObject.ConnectFlags.AFTER
+ after = flags & GObject.ConnectFlags.AFTER
if connect_obj is not None:
if after:
gobj.connect_object_after(signal_name, handler, connect_obj)
type_tag = g_type_info_get_tag (type_info);
switch (type_tag) {
case GI_TYPE_TAG_VOID:
- if (g_type_info_is_pointer (type_info)) {
+ if (g_type_info_is_pointer (type_info) &&
+ (arg->v_pointer != NULL)) {
/* Raw Python objects are passed to void* args */
g_warn_if_fail (transfer == GI_TRANSFER_NOTHING);
object = arg->v_pointer;
arg.v_uint = g_value_get_uint (value);
break;
case GI_TYPE_TAG_UNICHAR:
- arg.v_uint32 = g_value_get_char (value);
+ arg.v_uint32 = g_value_get_schar (value);
break;
case GI_TYPE_TAG_FLOAT:
arg.v_float = g_value_get_float (value);
_arg_name_list_generate (PyGICallableCache *callable_cache)
{
GSList * arg_name_list = NULL;
+ int i;
if (callable_cache->arg_name_hash == NULL) {
callable_cache->arg_name_hash = g_hash_table_new (g_str_hash, g_str_equal);
g_hash_table_remove_all (callable_cache->arg_name_hash);
}
- for (int i=0; i < callable_cache->n_args; i++) {
+ for (i=0; i < callable_cache->n_args; i++) {
PyGIArgCache *arg_cache = NULL;
arg_cache = callable_cache->args_cache[i];
}
g_base_info_unref (info);
+ } else if (g_type_info_is_pointer (field_type_info)
+ && g_type_info_get_tag (field_type_info) == GI_TYPE_TAG_VOID) {
+ int offset;
+
+ offset = g_field_info_get_offset ((GIFieldInfo *) self->info);
+ value = _pygi_argument_from_object (py_value, field_type_info, GI_TRANSFER_NOTHING);
+
+ Py_XDECREF(G_STRUCT_MEMBER (gpointer, pointer, offset));
+ G_STRUCT_MEMBER (gpointer, pointer, offset) = (gpointer)value.v_pointer;
+ Py_XINCREF(py_value);
+
+ retval = Py_None;
+ goto out;
}
value = _pygi_argument_from_object (py_value, field_type_info, GI_TRANSFER_EVERYTHING);
elif test -n "$runpath_var"; then
case "$perm_rpath " in
*" $libdir "*) ;;
- *) func_apped perm_rpath " $libdir" ;;
+ *) func_append perm_rpath " $libdir" ;;
esac
fi
done
[AC_REQUIRE([AM_PATH_PYTHON])
AC_MSG_CHECKING(for headers required to compile python extensions)
dnl deduce PYTHON_INCLUDES
-if test "x$PYTHON_INCLUDES" == x; then
+if test "x$PYTHON_INCLUDES" = x; then
PYTHON_CONFIG=`which $PYTHON`-config
if test -x "$PYTHON_CONFIG"; then
PYTHON_INCLUDES=`$PYTHON_CONFIG --includes 2>/dev/null`
AC_MSG_CHECKING(for libraries required to embed python)
dnl deduce PYTHON_LIBS
py_exec_prefix=`$PYTHON -c "import sys; print(sys.exec_prefix)"`
-if test "x$PYTHON_LIBS" == x; then
+if test "x$PYTHON_LIBS" = x; then
PYTHON_LIBS="-L${py_prefix}/lib -lpython${PYTHON_VERSION}"
fi
-if test "x$PYTHON_LIB_LOC" == x; then
+if test "x$PYTHON_LIB_LOC" = x; then
PYTHON_LIB_LOC="${py_prefix}/lib"
fi
AC_SUBST(PYTHON_LIBS)
sys.path.insert(0, "../")
from sys import getrefcount
+import copy
import cairo
from gi.repository import GObject
self.assertEqual(len(attr_list), len(set(attr_list)))
def test_ptrarray(self):
- self.assertEquals (Everything.test_garray_container_return(), ['regress'])
+ # transfer container
+ result = Everything.test_garray_container_return()
+ self.assertEquals (result, ['regress'])
+ result = None
+
+ # transfer full
+ result = Everything.test_garray_full_return()
+ self.assertEquals (result, ['regress'])
+ result = None
+
+ def test_struct_gpointer(self):
+ l1 = GLib.List()
+ self.assertEqual(l1.data, None)
+ init_refcount = getrefcount(l1)
+
+ l1.data = 'foo'
+ self.assertEqual(l1.data, 'foo')
+
+ l2 = l1
+ self.assertEqual(l1.data, l2.data)
+ self.assertEquals(getrefcount(l1), init_refcount+1)
+
+ l3 = copy.copy(l1)
+ l3.data = 'bar'
+ self.assertEqual(l1.data, 'foo')
+ self.assertEqual(l2.data, 'foo')
+ self.assertEqual(l3.data, 'bar')
+ self.assertEquals(getrefcount(l1), init_refcount+1)
+ self.assertEquals(getrefcount(l3), init_refcount)
class TestNullableArgs(unittest.TestCase):
def test_in_nullable_hash(self):
class TestGType(unittest.TestCase):
+ def test_gtype_name(self):
+ self.assertEquals("void", GObject.TYPE_NONE.name)
+ self.assertEquals("gchararray", GObject.TYPE_STRING.name)
+
+ def check_readonly(gtype):
+ gtype.name = "foo"
+
+ self.assertRaises(AttributeError, check_readonly, GObject.TYPE_NONE)
+ self.assertRaises(AttributeError, check_readonly, GObject.TYPE_STRING)
+
def test_gtype_return(self):
self.assertEquals(GObject.TYPE_NONE, GIMarshallingTests.gtype_return())
+ self.assertEquals(GObject.TYPE_STRING, GIMarshallingTests.gtype_string_return())
def test_gtype_in(self):
GIMarshallingTests.gtype_in(GObject.TYPE_NONE)
-
- self.assertRaises(TypeError, GIMarshallingTests.gtype_in, "GObject.TYPE_NONE")
+ GIMarshallingTests.gtype_string_in(GObject.TYPE_STRING)
+ self.assertRaises(TypeError, GIMarshallingTests.gtype_in, "foo")
+ self.assertRaises(TypeError, GIMarshallingTests.gtype_string_in, "foo")
def test_gtype_out(self):
self.assertEquals(GObject.TYPE_NONE, GIMarshallingTests.gtype_out())
+ self.assertEquals(GObject.TYPE_STRING, GIMarshallingTests.gtype_string_out())
def test_gtype_inout(self):
self.assertEquals(GObject.TYPE_INT, GIMarshallingTests.gtype_inout(GObject.TYPE_NONE))
def test_array_fixed_inout(self):
self.assertEquals([2, 1, 0, -1], GIMarshallingTests.array_fixed_inout([-1, 0, 1, 2]))
-
def test_array_return(self):
self.assertEquals([-1, 0, 1, 2], GIMarshallingTests.array_return())
def test_array_zero_terminated_inout(self):
self.assertEquals(['-1', '0', '1', '2'], GIMarshallingTests.array_zero_terminated_inout(['0', '1', '2']))
+
+class TestGStrv(unittest.TestCase):
+
def test_gstrv_return(self):
self.assertEquals(['0', '1', '2'], GIMarshallingTests.gstrv_return())
def test_gstrv_inout(self):
self.assertEquals(['-1', '0', '1', '2'], GIMarshallingTests.gstrv_inout(['0', '1', '2']))
-
+
+
+class TestArrayGVariant(unittest.TestCase):
+
def test_array_gvariant_none_in(self):
v = [GLib.Variant("i", 27), GLib.Variant("s", "Hello")]
returned = [GLib.Variant.unpack(r) for r in GIMarshallingTests.array_gvariant_none_in(v)]
self.assertEquals([27, "Hello"], returned)
-
+
def test_array_gvariant_container_in(self):
v = [GLib.Variant("i", 27), GLib.Variant("s", "Hello")]
returned = [GLib.Variant.unpack(r) for r in GIMarshallingTests.array_gvariant_none_in(v)]
self.assertEquals([27, "Hello"], returned)
-
+
def test_array_gvariant_full_in(self):
v = [GLib.Variant("i", 27), GLib.Variant("s", "Hello")]
returned = [GLib.Variant.unpack(r) for r in GIMarshallingTests.array_gvariant_none_in(v)]
v = GLib.Variant.new_bytestring(b"foo")
self.assertEquals(v.get_bytestring(), b"foo")
+
class TestGArray(unittest.TestCase):
def test_garray_int_none_return(self):
def test_garray_utf8_full_inout(self):
self.assertEquals(['-2', '-1','0', '1'], GIMarshallingTests.garray_utf8_full_inout(['0', '1', '2']))
+
class TestGPtrArray(unittest.TestCase):
def test_gptrarray_utf8_none_return(self):
def test_gptrarray_utf8_full_inout(self):
self.assertEquals(['-2', '-1','0', '1'], GIMarshallingTests.gptrarray_utf8_full_inout(['0', '1', '2']))
+
class TestGList(unittest.TestCase):
def test_glist_int_none_return(self):
value.set_int(42)
self.assertEquals('42', GIMarshallingTests.gvalue_inout(value))
+
class TestGClosure(unittest.TestCase):
def test_gclosure_in(self):
self.assertTrue(isinstance(flags, GIMarshallingTests.Flags))
self.assertEquals(flags, GIMarshallingTests.Flags.VALUE1)
+
class TestNoTypeFlags(unittest.TestCase):
def test_flags(self):
self.assertRaises(TypeError, GIMarshallingTests.SimpleStruct.method)
-
def test_pointer_struct(self):
self.assertTrue(issubclass(GIMarshallingTests.PointerStruct, GObject.GPointer))
self.assertRaises(TypeError, GIMarshallingTests.Union.method)
+
class TestGObject(unittest.TestCase):
def test_object(self):
self.assertRaises(TypeError, GIMarshallingTests.Object.method, GObject.GObject())
self.assertRaises(TypeError, GIMarshallingTests.Object.method)
-
def test_sub_object(self):
self.assertTrue(issubclass(GIMarshallingTests.SubObject, GIMarshallingTests.Object))
self.assertEquals(GIMarshallingTests.OverridesStruct.__module__, 'gi.overrides.GIMarshallingTests')
self.assertEquals(GObject.InitiallyUnowned.__module__, 'gi.repository.GObject')
+
class TestDir(unittest.TestCase):
def test_members_list(self):
list = dir(GIMarshallingTests)
#
# self.assertTrue('DoNotImportDummyTests' in list)
+
class TestGErrorArrayInCrash(unittest.TestCase):
# Previously there was a bug in invoke, in which C arrays were unwrapped
# from inside GArrays to be passed to the C function. But when a GError was
def test_gerror_array_in_crash(self):
self.assertRaises(GObject.GError, GIMarshallingTests.gerror_array_in, [1, 2, 3])
+
class TestGErrorOut(unittest.TestCase):
# See https://bugzilla.gnome.org/show_bug.cgi?id=666098
def test_gerror_out(self):
self.assertEquals(error.message, GIMarshallingTests.CONSTANT_GERROR_MESSAGE)
self.assertEquals(debug, GIMarshallingTests.CONSTANT_GERROR_DEBUG_MESSAGE)
+
class TestGErrorOutTransferNone(unittest.TestCase):
# See https://bugzilla.gnome.org/show_bug.cgi?id=666098
def test_gerror_out_transfer_none(self):
self.assertEquals(error.message, GIMarshallingTests.CONSTANT_GERROR_MESSAGE)
self.assertEquals(GIMarshallingTests.CONSTANT_GERROR_DEBUG_MESSAGE, debug)
+
class TestGErrorReturn(unittest.TestCase):
# See https://bugzilla.gnome.org/show_bug.cgi?id=666098
def test_return_gerror(self):
self.assertEquals(error.code, GIMarshallingTests.CONSTANT_GERROR_CODE)
self.assertEquals(error.message, GIMarshallingTests.CONSTANT_GERROR_MESSAGE)
+
class TestKeywordArgs(unittest.TestCase):
+
def test_calling(self):
kw_func = GIMarshallingTests.int_three_in_three_out
GIMarshallingTests.int_three_in_three_out(1, c=4, **d)
self.assertEqual(d, d2)
+
class TestPropertiesObject(unittest.TestCase):
def setUp(self):
class SignalCheck:
def __init__(self):
self.sentinel = 0
+ self.after_sentinel = 0;
def on_signal_1(self, *args):
self.sentinel += 1
+ self.after_sentinel += 1
def on_signal_3(self, *args):
self.sentinel += 3
+ def on_signal_after(self, *args):
+ if self.after_sentinel == 1:
+ self.after_sentinel += 1
+
signal_checker = SignalCheck()
builder = Gtk.Builder()
"""
<interface>
<object class="GIOverrideSignalTest" id="object1">
+ <signal name="test-signal" after="yes" handler="on_signal_after" />
<signal name="test-signal" handler="on_signal_1" />
</object>
</interface>
obj.emit('test-signal')
self.assertEquals(signal_checker.sentinel, 4)
+ self.assertEquals(signal_checker.after_sentinel, 2)
def test_dialogs(self):
self.assertEquals(Gtk.Dialog, overrides.Gtk.Dialog)