From: DongHun Kwak Date: Tue, 11 Jul 2017 23:38:36 +0000 (+0900) Subject: Imported Upstream version 3.1.1 X-Git-Tag: upstream/3.9.92~81 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F47%2F138247%2F1;p=platform%2Fupstream%2Fpygobject2.git Imported Upstream version 3.1.1 Change-Id: I9fcc2f2973769a7b4834618364ba228c93885a4d Signed-off-by: DongHun Kwak --- diff --git a/ChangeLog b/ChangeLog index a02ea05..8cfa866 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,225 @@ -commit 8ac474c15199ca00c729a73af9c926172657b842 +commit fd020e783c0dacea3320225b4ddd57d6a0fce7ea +Author: Sebastian Pölsterl +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 + + 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 +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 +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 +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 +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 +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 +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 +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 Date: Mon Feb 6 19:11:52 2012 +0100 @@ -7,7 +228,7 @@ 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 Date: Mon Feb 6 19:04:41 2012 +0100 diff --git a/NEWS b/NEWS index afb1181..d60bda3 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,21 @@ +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) diff --git a/PKG-INFO b/PKG-INFO index 3bc50b1..f5054ca 100644 --- a/PKG-INFO +++ b/PKG-INFO @@ -1,6 +1,6 @@ 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 @@ -8,7 +8,7 @@ Author-email: james@daa.com.au 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 diff --git a/configure b/configure index 5e92327..6544749 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /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 . # @@ -571,8 +571,8 @@ MAKEFLAGS= # 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='' @@ -1359,7 +1359,7 @@ if test "$ac_init_help" = "long"; then # 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]... @@ -1429,7 +1429,7 @@ fi 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 @@ -1554,7 +1554,7 @@ fi 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. @@ -1832,7 +1832,7 @@ cat >config.log <<_ACEOF 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 $@ @@ -2196,9 +2196,9 @@ $as_echo "#define PYGOBJECT_MINOR_VERSION 1" >>confdefs.h 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" @@ -2682,7 +2682,7 @@ fi # Define the identity of the package. PACKAGE='pygobject' - VERSION='3.1.0' + VERSION='3.1.1' cat >>confdefs.h <<_ACEOF @@ -12018,7 +12018,7 @@ Usage: $0 [OPTIONS] Report bugs to ." 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. @@ -14914,7 +14914,7 @@ $as_echo "$am_cv_python_pyexecdir" >&6; } { $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` @@ -14951,10 +14951,10 @@ if test "x$os_win32" = "xyes"; then { $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 @@ -15283,7 +15283,7 @@ 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; } @@ -15629,12 +15629,12 @@ if test -n "$GIO_CFLAGS"; then 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 @@ -15645,12 +15645,12 @@ if test -n "$GIO_LIBS"; then 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 @@ -15670,14 +15670,14 @@ else _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 @@ -15729,16 +15729,16 @@ if test -n "$GI_CFLAGS"; then 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 @@ -15751,16 +15751,16 @@ if test -n "$GI_LIBS"; then 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 @@ -15782,18 +15782,18 @@ 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: @@ -16727,7 +16727,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # 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 @@ -16793,7 +16793,7 @@ _ACEOF 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\\" diff --git a/configure.ac b/configure.ac index d7fb8a8..6e4adc1 100644 --- a/configure.ac +++ b/configure.ac @@ -12,15 +12,15 @@ m4_define(python3_min_ver, 3.1) 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]) @@ -199,7 +199,7 @@ GI_DATADIR=$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0) 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 ) diff --git a/gi/_glib/pyglib.c b/gi/_glib/pyglib.c index 40df53b..a077779 100644 --- a/gi/_glib/pyglib.c +++ b/gi/_glib/pyglib.c @@ -153,9 +153,6 @@ pyglib_enable_threads(void) 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(); diff --git a/gi/_glib/pygsource.c b/gi/_glib/pygsource.c index 60fb6d6..6c290a8 100644 --- a/gi/_glib/pygsource.c +++ b/gi/_glib/pygsource.c @@ -244,13 +244,11 @@ pyg_source_remove_poll(PyGSource *self, PyObject *args, PyObject *kwargs) 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); } diff --git a/gi/_glib/pygspawn.c b/gi/_glib/pygspawn.c index 309b83d..cfa5555 100644 --- a/gi/_glib/pygspawn.c +++ b/gi/_glib/pygspawn.c @@ -150,7 +150,7 @@ pyglib_spawn_async(PyObject *object, PyObject *args, PyObject *kwargs) 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"); @@ -175,7 +175,7 @@ pyglib_spawn_async(PyObject *object, PyObject *args, PyObject *kwargs) 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"); diff --git a/gi/_gobject/ffi-marshaller.c b/gi/_gobject/ffi-marshaller.c index 60cfc34..39ebe16 100644 --- a/gi/_gobject/ffi-marshaller.c +++ b/gi/_gobject/ffi-marshaller.c @@ -102,7 +102,7 @@ g_value_from_ffi_type (GValue *gvalue, gpointer *value) 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); diff --git a/gi/_gobject/pygparamspec.c b/gi/_gobject/pygparamspec.c index 7743629..94f1dbb 100644 --- a/gi/_gobject/pygparamspec.c +++ b/gi/_gobject/pygparamspec.c @@ -320,7 +320,7 @@ pyg_param_spec_getattr(PyGParamSpec *self, const gchar *attr) } 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"); diff --git a/gi/_gobject/pygtype.c b/gi/_gobject/pygtype.c index ffd99a5..79e9dc6 100644 --- a/gi/_gobject/pygtype.c +++ b/gi/_gobject/pygtype.c @@ -768,12 +768,12 @@ pyg_value_from_pyobject(GValue *value, PyObject *obj) 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(); @@ -1027,7 +1027,7 @@ pyg_value_as_pyobject(const GValue *value, gboolean copy_boxed) 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: { diff --git a/gi/overrides/Gtk.py b/gi/overrides/Gtk.py index 1d0cb49..2b44282 100644 --- a/gi/overrides/Gtk.py +++ b/gi/overrides/Gtk.py @@ -350,7 +350,7 @@ class Builder(Gtk.Builder): 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) diff --git a/gi/pygi-argument.c b/gi/pygi-argument.c index 9d99c35..4cfacfc 100644 --- a/gi/pygi-argument.c +++ b/gi/pygi-argument.c @@ -1330,7 +1330,8 @@ _pygi_argument_to_object (GIArgument *arg, 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; @@ -1838,7 +1839,7 @@ _pygi_argument_from_g_value(const GValue *value, 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); diff --git a/gi/pygi-cache.c b/gi/pygi-cache.c index 5dc811a..5b107e1 100644 --- a/gi/pygi-cache.c +++ b/gi/pygi-cache.c @@ -1219,6 +1219,7 @@ static void _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); @@ -1226,7 +1227,7 @@ _arg_name_list_generate (PyGICallableCache *callable_cache) 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]; diff --git a/gi/pygi-info.c b/gi/pygi-info.c index bf3af58..d3adacc 100644 --- a/gi/pygi-info.c +++ b/gi/pygi-info.c @@ -1371,6 +1371,19 @@ _wrap_g_field_info_set_value (PyGIBaseInfo *self, } 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); diff --git a/ltmain.sh b/ltmain.sh index aa5624c..78cf017 100755 --- a/ltmain.sh +++ b/ltmain.sh @@ -8050,7 +8050,7 @@ EOF elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; - *) func_apped perm_rpath " $libdir" ;; + *) func_append perm_rpath " $libdir" ;; esac fi done diff --git a/m4/python.m4 b/m4/python.m4 index 7c90275..3cfb9e2 100644 --- a/m4/python.m4 +++ b/m4/python.m4 @@ -43,7 +43,7 @@ AC_DEFUN([AM_CHECK_PYTHON_HEADERS], [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` @@ -76,10 +76,10 @@ AC_DEFUN([AM_CHECK_PYTHON_LIBS], 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) diff --git a/tests/test_everything.py b/tests/test_everything.py index 82edfcf..05fce88 100644 --- a/tests/test_everything.py +++ b/tests/test_everything.py @@ -8,6 +8,7 @@ import sys sys.path.insert(0, "../") from sys import getrefcount +import copy import cairo from gi.repository import GObject @@ -159,7 +160,35 @@ class TestEverything(unittest.TestCase): 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): diff --git a/tests/test_gi.py b/tests/test_gi.py index b066626..f762f74 100644 --- a/tests/test_gi.py +++ b/tests/test_gi.py @@ -598,16 +598,29 @@ class TestDouble(unittest.TestCase): 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)) @@ -670,7 +683,6 @@ class TestArray(unittest.TestCase): 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()) @@ -758,6 +770,9 @@ class TestArray(unittest.TestCase): 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()) @@ -772,17 +787,20 @@ class TestArray(unittest.TestCase): 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)] @@ -792,6 +810,7 @@ class TestArray(unittest.TestCase): 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): @@ -835,6 +854,7 @@ class TestGArray(unittest.TestCase): 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): @@ -867,6 +887,7 @@ class TestGPtrArray(unittest.TestCase): 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): @@ -1025,6 +1046,7 @@ class TestGValue(unittest.TestCase): value.set_int(42) self.assertEquals('42', GIMarshallingTests.gvalue_inout(value)) + class TestGClosure(unittest.TestCase): def test_gclosure_in(self): @@ -1190,6 +1212,7 @@ class TestGFlags(unittest.TestCase): self.assertTrue(isinstance(flags, GIMarshallingTests.Flags)) self.assertEquals(flags, GIMarshallingTests.Flags.VALUE1) + class TestNoTypeFlags(unittest.TestCase): def test_flags(self): @@ -1300,7 +1323,6 @@ class TestStructure(unittest.TestCase): self.assertRaises(TypeError, GIMarshallingTests.SimpleStruct.method) - def test_pointer_struct(self): self.assertTrue(issubclass(GIMarshallingTests.PointerStruct, GObject.GPointer)) @@ -1425,6 +1447,7 @@ class TestStructure(unittest.TestCase): self.assertRaises(TypeError, GIMarshallingTests.Union.method) + class TestGObject(unittest.TestCase): def test_object(self): @@ -1454,7 +1477,6 @@ class TestGObject(unittest.TestCase): 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)) @@ -1799,6 +1821,7 @@ class TestOverrides(unittest.TestCase): 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) @@ -1823,6 +1846,7 @@ class TestDir(unittest.TestCase): # # 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 @@ -1832,6 +1856,7 @@ class TestGErrorArrayInCrash(unittest.TestCase): 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): @@ -1843,6 +1868,7 @@ class TestGErrorOut(unittest.TestCase): 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): @@ -1854,6 +1880,7 @@ class TestGErrorOutTransferNone(unittest.TestCase): 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): @@ -1864,7 +1891,9 @@ class TestGErrorReturn(unittest.TestCase): 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 @@ -1922,6 +1951,7 @@ class TestKeywordArgs(unittest.TestCase): GIMarshallingTests.int_three_in_three_out(1, c=4, **d) self.assertEqual(d, d2) + class TestPropertiesObject(unittest.TestCase): def setUp(self): diff --git a/tests/test_overrides.py b/tests/test_overrides.py index ea74fb3..e64c099 100644 --- a/tests/test_overrides.py +++ b/tests/test_overrides.py @@ -666,13 +666,19 @@ class TestGtk(unittest.TestCase): 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() @@ -681,6 +687,7 @@ class TestGtk(unittest.TestCase): """ + @@ -714,6 +721,7 @@ class TestGtk(unittest.TestCase): 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)