+commit ca6918747214484a429c039caed02dd858c307fe
+Author: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Sat Mar 17 18:46:05 2018 +0100
+
+ release
+
+ NEWS | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+commit ab470a4f02b294ec8f1f11ea30c9ed4625490a52
+Author: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Fri Mar 16 23:48:20 2018 +0100
+
+ tests: fix glib tests with newest glib
+
+ g_filename_from_utf8() was recently fixed to return filenames
+ instead of bytes.
+ See https://bugzilla.gnome.org/show_bug.cgi?id=756128
+
+ tests/test_glib.py | 21 ++++++++++++++++++++-
+ 1 file changed, 20 insertions(+), 1 deletion(-)
+
+commit 76d4503ff856d7cc6e15d45bb82d79c17bda69f7
+Author: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Fri Mar 16 15:17:37 2018 +0100
+
+ setup.py: don't install tests
+
+ Now that the tests directory has a __init__.py and is a Python package
+ find_packages() returns it and setup() will install it.
+
+ Instead of using find_packages() hardcode the list of included
+ packages.
+
+ setup.py | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+commit f6c17c998e12a38bbc1c14e43fa969f01fbac46b
+Author: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Wed Mar 14 12:31:28 2018 +0100
+
+ pyg_flags_get_value_names: fix a leak
+
+ PyList_Append() is transfer-none for the value
+
+ gi/pygflags.c | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+commit 9b4a056bbd7003bdb12f3eaf30524caa8747adb1
+Author: Mathieu Duponchelle <mathieu@centricular.com>
+Date: Tue Mar 13 19:41:20 2018 +0100
+
+ all around: Fix some assumptions about the size of long
+
+ This was creating various issues on 64-bit Windows, where sizeof(long)
+ is usually 4.
+
+ gi/pygi-basictype.c | 6 +++---
+ gi/pygi-closure.c | 10 +++++-----
+ gi/pygi-value.c | 2 +-
+ 3 files changed, 9 insertions(+), 9 deletions(-)
+
+commit b8bffa925566e561bb6270db5aecbe2b7b70d178
+Author: Mathieu Duponchelle <mathieu@centricular.com>
+Date: Tue Mar 13 19:12:23 2018 +0100
+
+ GValue override: chain up __del__
+
+ This was added in d08e244d , which was recently reverted, that
+ specific bit was however unrelated and still relevant.
+
+ Fix #176
+
+ gi/overrides/GObject.py | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit 48171470feccca4c5595a5f28adf6630fca66515
+Author: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Thu Mar 1 16:07:10 2018 +0100
+
+ gitlab-ci: add Python 3.7.0b2 job
+
+ .gitlab-ci.yml | 5 +++++
+ .gitlab-ci/Dockerfile | 1 +
+ .gitlab-ci/run-docker.sh | 2 ++
+ 3 files changed, 8 insertions(+)
+
+commit a0b633185d1dbb2cfef46f85b6b593c0c296e6f7
+Author: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Sat Mar 10 20:03:33 2018 +0100
+
+ marshal-cleanup: save and restore exception around cleanup
+
+ With Python 3.7 some Python API in the cleanup path clears exceptions
+ which makes us return NULL in the end without an error set.
+
+ Make if safe to call the cleanup functions with an error set by
+ saving and restoring exceptions.
+
+ gi/pygi-marshal-cleanup.c | 24 ++++++++++++++++++++++++
+ 1 file changed, 24 insertions(+)
+
+commit 8eee391694e657a79281707e476b1950a87f4d29
+Author: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Sun Mar 11 13:13:30 2018 +0100
+
+ _struct_dealloc: handle being called with an error set
+
+ With Python 3.7 it gets called with an error set and tp_dealloc
+ implementations need to handle that.
+ Fix by saving and restoring the error.
+
+ gi/pygi-struct.c | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+commit 7a1b725805b97a037f38c844d107644c780d87b6
+Author: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Sat Mar 10 18:54:28 2018 +0100
+
+ IntrospectionModule: __path__ should be List[str] and not str
+
+ This fixes a crash when calling help() on the module which got
+ stricter with
+ Python 3.7.
+
+ It's a bit questionable why the type has __path__ in the first
+ place as
+ that's only meant for packages. But let's leave that for now.
+
+ gi/module.py | 5 +++--
+ tests/test_gi.py | 6 ++++--
+ 2 files changed, 7 insertions(+), 4 deletions(-)
+
+commit 2386fb7070dcde591313abb10f3e65d7cef7364f
+Author: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Sat Mar 10 18:04:14 2018 +0100
+
+ tests_gi: Use capture_output() context manager instead of manually
+ mocking stdout
+
+ tests/helper.py | 2 +-
+ tests/test_gi.py | 14 +++-----------
+ 2 files changed, 4 insertions(+), 12 deletions(-)
+
+commit e0b92c65f4af126f1ba9c924e8e71b958a280a6e
+Author: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Mon Mar 12 13:18:34 2018 +0100
+
+ version bump
+
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
commit dde2f66f9d95f4da81230b11317207a1ac08d84e
Author: Christoph Reiter <reiter.christoph@gmail.com>
Date: Mon Mar 12 08:36:14 2018 +0100
+3.28.1 - 2018-03-17
+-------------------
+
+* Fix a GValue leak (regression). :issue:`176`
+ (:user:`Mathieu Duponchelle<mathieudu>`)
+* setup.py: don't install the tests package
+* Various fixes for 64bit Windows. :mr:`34`
+ (:user:`Mathieu Duponchelle<mathieudu>`)
+* Fix tests with glib 2.56.0
+* Various fixes for Python 3.7. :issue:`170` :mr:`28`
+
+
3.28.0 - 2018-03-12
-------------------
Metadata-Version: 1.0
Name: PyGObject
-Version: 3.28.0
+Version: 3.28.1
Summary: Python bindings for GObject Introspection
Home-page: https://pygobject.readthedocs.io
Author: James Henstridge
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for pygobject 3.28.0.
+# Generated by GNU Autoconf 2.69 for pygobject 3.28.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.28.0'
-PACKAGE_STRING='pygobject 3.28.0'
+PACKAGE_VERSION='3.28.1'
+PACKAGE_STRING='pygobject 3.28.1'
PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject'
PACKAGE_URL='https://wiki.gnome.org/Projects/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.28.0 to adapt to many kinds of systems.
+\`configure' configures pygobject 3.28.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.28.0:";;
+ short | recursive ) echo "Configuration of pygobject 3.28.1:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-pygobject configure 3.28.0
+pygobject configure 3.28.1
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.28.0, which was
+It was created by pygobject $as_me 3.28.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
PYGOBJECT_MINOR_VERSION=28
-$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.28.0'
+ VERSION='3.28.1'
cat >>confdefs.h <<_ACEOF
#include <stdlib.h>
int
-main ()
+main (void)
{
unsigned int major, minor, micro;
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #ifndef __cplusplus
+ #error "no C++"
+ #endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ax_compiler_cxx=yes;
+else
+ ax_compiler_cxx=no;
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
# Always pass -Werror=unknown-warning-option to get Clang to fail on bad
# flags, otherwise they are always appended to the warn_cflags variable, and
# Clang warns on them for every compilation unit.
-for flag in -Wall -Wextra -Wundef -Wnested-externs -Wwrite-strings -Wpointer-arith -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wno-unused-parameter -Wno-missing-field-initializers -Wdeclaration-after-statement -Wformat=2 -Wold-style-definition -Wcast-align -Wformat-nonliteral -Wformat-security -Wsign-compare -Wstrict-aliasing -Wshadow -Winline -Wpacked -Wmissing-format-attribute -Wmissing-noreturn -Winit-self -Wredundant-decls -Wmissing-include-dirs -Wunused-but-set-variable -Warray-bounds -Wimplicit-function-declaration -Wreturn-type -Wswitch-enum -Wswitch-default ; do
+for flag in -Wall -Wextra -Wundef -Wwrite-strings -Wpointer-arith -Wmissing-declarations -Wredundant-decls -Wno-unused-parameter -Wno-missing-field-initializers -Wformat=2 -Wcast-align -Wformat-nonliteral -Wformat-security -Wsign-compare -Wstrict-aliasing -Wshadow -Winline -Wpacked -Wmissing-format-attribute -Wmissing-noreturn -Winit-self -Wredundant-decls -Wmissing-include-dirs -Wunused-but-set-variable -Warray-bounds -Wreturn-type -Wswitch-enum -Wswitch-default -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wrestrict -Wnull-dereference -Wdouble-promotion ; do
as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_compiler_flags_test_$flag" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
done
+ if test "$ax_compiler_cxx" = "no" ; then
+ # C-only flags. Warn in C++
+
+
+
+
+for flag in -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wdeclaration-after-statement -Wimplicit-function-declaration -Wold-style-definition -Wjump-misses-init ; do
+ as_CACHEVAR=`$as_echo "ax_cv_check_cflags_$ax_compiler_flags_test_$flag" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
+$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
+if eval \${$as_CACHEVAR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ ax_check_save_flags=$CFLAGS
+ CFLAGS="$CFLAGS $ax_compiler_flags_test $flag"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_CACHEVAR=yes"
+else
+ eval "$as_CACHEVAR=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS=$ax_check_save_flags
+fi
+eval ac_res=\$$as_CACHEVAR
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
+
+if ${WARN_CFLAGS+:} false; then :
+
+ case " $WARN_CFLAGS " in #(
+ *" $flag "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS already contains \$flag"; } >&5
+ (: WARN_CFLAGS already contains $flag) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append WARN_CFLAGS " $flag"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5
+ (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ WARN_CFLAGS=$flag
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5
+ (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+else
+ :
+fi
+
+done
+
+ fi
fi
if test "$ax_enable_compile_warnings" = "error"; then :
fi
- # macOS linker does not have --as-needed
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,--as-needed" >&5
+$as_echo_n "checking whether the linker accepts -Wl,--as-needed... " >&6; }
+if ${ax_cv_check_ldflags___Wl___as_needed+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ ax_check_save_flags=$LDFLAGS
+ LDFLAGS="$LDFLAGS -Wl,--as-needed"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ax_cv_check_ldflags___Wl___as_needed=yes
+else
+ ax_cv_check_ldflags___Wl___as_needed=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$ax_check_save_flags
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Wl___as_needed" >&5
+$as_echo "$ax_cv_check_ldflags___Wl___as_needed" >&6; }
+if test "x$ax_cv_check_ldflags___Wl___as_needed" = xyes; then :
+
+
+
+
+
+for flag in -Wl,--as-needed; do
+ as_CACHEVAR=`$as_echo "ax_cv_check_ldflags_$ax_compiler_flags_test_$flag" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts $flag" >&5
+$as_echo_n "checking whether the linker accepts $flag... " >&6; }
+if eval \${$as_CACHEVAR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ ax_check_save_flags=$LDFLAGS
+ LDFLAGS="$LDFLAGS $ax_compiler_flags_test $flag"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$as_CACHEVAR=yes"
+else
+ eval "$as_CACHEVAR=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$ax_check_save_flags
+fi
+eval ac_res=\$$as_CACHEVAR
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
+
+if ${AM_LDFLAGS+:} false; then :
+
+ case " $AM_LDFLAGS " in #(
+ *" $flag "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS already contains \$flag"; } >&5
+ (: AM_LDFLAGS already contains $flag) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append AM_LDFLAGS " $flag"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS=\"\$AM_LDFLAGS\""; } >&5
+ (: AM_LDFLAGS="$AM_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ AM_LDFLAGS=$flag
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS=\"\$AM_LDFLAGS\""; } >&5
+ (: AM_LDFLAGS="$AM_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+else
+ :
+fi
+
+done
+
+
+else
+ :
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,-z,relro" >&5
+$as_echo_n "checking whether the linker accepts -Wl,-z,relro... " >&6; }
+if ${ax_cv_check_ldflags___Wl__z_relro+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ ax_check_save_flags=$LDFLAGS
+ LDFLAGS="$LDFLAGS -Wl,-z,relro"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ax_cv_check_ldflags___Wl__z_relro=yes
+else
+ ax_cv_check_ldflags___Wl__z_relro=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$ax_check_save_flags
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Wl__z_relro" >&5
+$as_echo "$ax_cv_check_ldflags___Wl__z_relro" >&6; }
+if test "x$ax_cv_check_ldflags___Wl__z_relro" = xyes; then :
+
+
+
+
+
+for flag in -Wl,-z,relro; do
+ as_CACHEVAR=`$as_echo "ax_cv_check_ldflags_$ax_compiler_flags_test_$flag" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts $flag" >&5
+$as_echo_n "checking whether the linker accepts $flag... " >&6; }
+if eval \${$as_CACHEVAR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ ax_check_save_flags=$LDFLAGS
+ LDFLAGS="$LDFLAGS $ax_compiler_flags_test $flag"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$as_CACHEVAR=yes"
+else
+ eval "$as_CACHEVAR=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$ax_check_save_flags
+fi
+eval ac_res=\$$as_CACHEVAR
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
+
+if ${AM_LDFLAGS+:} false; then :
+
+ case " $AM_LDFLAGS " in #(
+ *" $flag "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS already contains \$flag"; } >&5
+ (: AM_LDFLAGS already contains $flag) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append AM_LDFLAGS " $flag"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS=\"\$AM_LDFLAGS\""; } >&5
+ (: AM_LDFLAGS="$AM_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ AM_LDFLAGS=$flag
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS=\"\$AM_LDFLAGS\""; } >&5
+ (: AM_LDFLAGS="$AM_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+else
+ :
+fi
+
+done
+
+
+else
+ :
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,-z,now" >&5
+$as_echo_n "checking whether the linker accepts -Wl,-z,now... " >&6; }
+if ${ax_cv_check_ldflags___Wl__z_now+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ ax_check_save_flags=$LDFLAGS
+ LDFLAGS="$LDFLAGS -Wl,-z,now"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ax_cv_check_ldflags___Wl__z_now=yes
+else
+ ax_cv_check_ldflags___Wl__z_now=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$ax_check_save_flags
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Wl__z_now" >&5
+$as_echo "$ax_cv_check_ldflags___Wl__z_now" >&6; }
+if test "x$ax_cv_check_ldflags___Wl__z_now" = xyes; then :
+
+
+
+
+
+for flag in -Wl,-z,now; do
+ as_CACHEVAR=`$as_echo "ax_cv_check_ldflags_$ax_compiler_flags_test_$flag" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts $flag" >&5
+$as_echo_n "checking whether the linker accepts $flag... " >&6; }
+if eval \${$as_CACHEVAR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ ax_check_save_flags=$LDFLAGS
+ LDFLAGS="$LDFLAGS $ax_compiler_flags_test $flag"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$as_CACHEVAR=yes"
+else
+ eval "$as_CACHEVAR=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$ax_check_save_flags
+fi
+eval ac_res=\$$as_CACHEVAR
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
+
+if ${AM_LDFLAGS+:} false; then :
+
+ case " $AM_LDFLAGS " in #(
+ *" $flag "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS already contains \$flag"; } >&5
+ (: AM_LDFLAGS already contains $flag) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append AM_LDFLAGS " $flag"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS=\"\$AM_LDFLAGS\""; } >&5
+ (: AM_LDFLAGS="$AM_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ AM_LDFLAGS=$flag
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS=\"\$AM_LDFLAGS\""; } >&5
+ (: AM_LDFLAGS="$AM_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+else
+ :
+fi
+
+done
+
+
+else
+ :
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,-z,noexecstack" >&5
+$as_echo_n "checking whether the linker accepts -Wl,-z,noexecstack... " >&6; }
+if ${ax_cv_check_ldflags___Wl__z_noexecstack+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ ax_check_save_flags=$LDFLAGS
+ LDFLAGS="$LDFLAGS -Wl,-z,noexecstack"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ax_cv_check_ldflags___Wl__z_noexecstack=yes
+else
+ ax_cv_check_ldflags___Wl__z_noexecstack=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$ax_check_save_flags
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Wl__z_noexecstack" >&5
+$as_echo "$ax_cv_check_ldflags___Wl__z_noexecstack" >&6; }
+if test "x$ax_cv_check_ldflags___Wl__z_noexecstack" = xyes; then :
+
+
+
+
+
+for flag in -Wl,-z,noexecstack; do
+ as_CACHEVAR=`$as_echo "ax_cv_check_ldflags_$ax_compiler_flags_test_$flag" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts $flag" >&5
+$as_echo_n "checking whether the linker accepts $flag... " >&6; }
+if eval \${$as_CACHEVAR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ ax_check_save_flags=$LDFLAGS
+ LDFLAGS="$LDFLAGS $ax_compiler_flags_test $flag"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$as_CACHEVAR=yes"
+else
+ eval "$as_CACHEVAR=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$ax_check_save_flags
+fi
+eval ac_res=\$$as_CACHEVAR
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
+
+if ${AM_LDFLAGS+:} false; then :
+
+ case " $AM_LDFLAGS " in #(
+ *" $flag "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS already contains \$flag"; } >&5
+ (: AM_LDFLAGS already contains $flag) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append AM_LDFLAGS " $flag"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS=\"\$AM_LDFLAGS\""; } >&5
+ (: AM_LDFLAGS="$AM_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ AM_LDFLAGS=$flag
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS=\"\$AM_LDFLAGS\""; } >&5
+ (: AM_LDFLAGS="$AM_LDFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+else
+ :
+fi
+
+done
+
+
+else
+ :
+fi
+
+ # textonly, retpolineplt not yet
+
+ # macOS and cygwin linker do not have --as-needed
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,--no-as-needed" >&5
$as_echo_n "checking whether the linker accepts -Wl,--no-as-needed... " >&6; }
if ${ax_cv_check_ldflags___Wl___no_as_needed+:} false; then :
# 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.28.0, which was
+This file was extended by pygobject $as_me 3.28.1, 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.28.0
+pygobject config.status 3.28.1
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, 28)
-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 ...
self._version = version
self.__name__ = 'gi.repository.' + namespace
- self.__path__ = repository.get_typelib_path(self._namespace)
+ path = repository.get_typelib_path(self._namespace)
+ self.__path__ = [path]
if _have_py3:
# get_typelib_path() delivers bytes, not a string
- self.__path__ = self.__path__.decode('UTF-8')
+ self.__path__ = [path.decode('UTF-8')]
if self._version is None:
self._version = repository.get_version(self._namespace)
if self._free_on_dealloc and self.g_type != TYPE_INVALID:
self.unset()
+ # We must call base class __del__() after unset.
+ super(Value, self).__del__()
+
def set_boxed(self, boxed):
# Workaround the introspection marshalers inability to know
# these methods should be marshaling boxed types. This is because
g_assert(G_IS_FLAGS_CLASS(flags_class));
retval = PyList_New(0);
- for (i = 0; i < flags_class->n_values; i++)
- if ((PYGLIB_PyLong_AsUnsignedLong(self) & flags_class->values[i].value) == flags_class->values[i].value)
- PyList_Append(retval, PYGLIB_PyUnicode_FromString(flags_class->values[i].value_name));
+ for (i = 0; i < flags_class->n_values; i++) {
+ PyObject *value_name;
+
+ if ((PYGLIB_PyLong_AsUnsignedLong (self) & flags_class->values[i].value) == flags_class->values[i].value) {
+ value_name = PYGLIB_PyUnicode_FromString (flags_class->values[i].value_name);
+ PyList_Append (retval, value_name);
+ Py_DECREF (value_name);
+ }
+ }
g_type_class_unref(flags_class);
_pygi_marshal_from_py_gtype (PyObject *py_arg,
GIArgument *arg)
{
- long type_ = pyg_type_from_object (py_arg);
+ GType type_ = pyg_type_from_object (py_arg);
if (type_ == 0) {
PyErr_Format (PyExc_TypeError, "Must be gobject.GType, not %s",
return FALSE;
}
- arg->v_long = type_;
+ arg->v_size = type_;
return TRUE;
}
return PyFloat_FromDouble (arg->v_double);
case GI_TYPE_TAG_GTYPE:
- return pyg_type_wrapper_new ( (GType) arg->v_long);
+ return pyg_type_wrapper_new ( (GType) arg->v_size);
case GI_TYPE_TAG_UNICHAR:
return _pygi_marshal_to_py_unichar (arg);
*((gdouble *) retval) = arg->v_double;
break;
case GI_TYPE_TAG_GTYPE:
- *((ffi_arg *) retval) = arg->v_ulong;
+ *((ffi_arg *) retval) = arg->v_size;
break;
case GI_TYPE_TAG_UNICHAR:
*((ffi_arg *) retval) = arg->v_uint32;
*((gint64 *) out_arg) = arg->v_int64;
break;
case GI_TYPE_TAG_UINT64:
- *((glong *) out_arg) = arg->v_uint64;
+ *((guint64 *) out_arg) = arg->v_uint64;
break;
case GI_TYPE_TAG_FLOAT:
*((gfloat *) out_arg) = arg->v_float;
*((gdouble *) out_arg) = arg->v_double;
break;
case GI_TYPE_TAG_GTYPE:
- *((gulong *) out_arg) = arg->v_ulong;
+ *((GType *) out_arg) = arg->v_size;
break;
case GI_TYPE_TAG_UNICHAR:
*((guint32 *) out_arg) = arg->v_uint32;
state[i].arg_value.v_uint32 = * (guint32 *) arg_pointer;
break;
case GI_TYPE_TAG_INT64:
- state[i].arg_value.v_int64 = * (glong *) arg_pointer;
+ state[i].arg_value.v_int64 = * (gint64 *) arg_pointer;
break;
case GI_TYPE_TAG_UINT64:
- state[i].arg_value.v_uint64 = * (glong *) arg_pointer;
+ state[i].arg_value.v_uint64 = * (guint64 *) arg_pointer;
break;
case GI_TYPE_TAG_FLOAT:
state[i].arg_value.v_float = * (gfloat *) arg_pointer;
PyGICallableCache *cache)
{
gssize i;
+ PyObject *error_type, *error_value, *error_traceback;
+ gboolean have_error = !!PyErr_Occurred ();
+
+ if (have_error)
+ PyErr_Fetch (&error_type, &error_value, &error_traceback);
for (i = 0; (gsize)i < _pygi_callable_cache_args_len (cache); i++) {
PyGIArgCache *arg_cache = _pygi_callable_cache_get_arg (cache, i);
state->args[i].arg_cleanup_data = NULL;
}
}
+
+ if (have_error)
+ PyErr_Restore (error_type, error_value, error_traceback);
}
void
{
GSList *cache_item;
guint i = 0;
+ PyObject *error_type, *error_value, *error_traceback;
+ gboolean have_error = !!PyErr_Occurred ();
+
+ if (have_error)
+ PyErr_Fetch (&error_type, &error_value, &error_traceback);
/* clean up the return if available */
if (cache->return_cache != NULL) {
i++;
cache_item = cache_item->next;
}
+
+ if (have_error)
+ PyErr_Restore (error_type, error_value, error_traceback);
}
void
gssize failed_arg_index)
{
gssize i;
+ PyObject *error_type, *error_value, *error_traceback;
+ gboolean have_error = !!PyErr_Occurred ();
+
+ if (have_error)
+ PyErr_Fetch (&error_type, &error_value, &error_traceback);
state->failed = TRUE;
}
state->args[i].arg_cleanup_data = NULL;
}
+
+ if (have_error)
+ PyErr_Restore (error_type, error_value, error_traceback);
}
void
static void
_struct_dealloc (PyGIStruct *self)
{
- GIBaseInfo *info = _struct_get_info ( (PyObject *) self );
+ GIBaseInfo *info;
+ PyObject *error_type, *error_value, *error_traceback;
+ gboolean have_error = !!PyErr_Occurred ();
+
+ if (have_error)
+ PyErr_Fetch (&error_type, &error_value, &error_traceback);
+
+ info = _struct_get_info ( (PyObject *) self );
if (info != NULL && g_struct_info_is_foreign ( (GIStructInfo *) info)) {
pygi_struct_foreign_release (info, pyg_pointer_get_ptr (self));
g_base_info_unref (info);
}
+ if (have_error)
+ PyErr_Restore (error_type, error_value, error_traceback);
+
Py_TYPE (self)->tp_free ((PyObject *)self);
}
arg.v_double = g_value_get_double (value);
break;
case GI_TYPE_TAG_GTYPE:
- arg.v_long = g_value_get_gtype (value);
+ arg.v_size = g_value_get_gtype (value);
break;
case GI_TYPE_TAG_UTF8:
case GI_TYPE_TAG_FILENAME:
# LICENSE
#
# Copyright (c) 2014, 2015 Philip Withnall <philip@tecnocode.co.uk>
+# Copyright (c) 2017, 2018 Reini Urban <rurban@cpan.org>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
-#serial 14
+#serial 16
AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[
AC_REQUIRE([AC_PROG_SED])
AC_LANG_PUSH([C])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+ [#ifndef __cplusplus
+ #error "no C++"
+ #endif]])],
+ [ax_compiler_cxx=yes;],
+ [ax_compiler_cxx=no;])
+
# Always pass -Werror=unknown-warning-option to get Clang to fail on bad
# flags, otherwise they are always appended to the warn_cflags variable, and
# Clang warns on them for every compilation unit.
-Wall dnl
-Wextra dnl
-Wundef dnl
- -Wnested-externs dnl
-Wwrite-strings dnl
-Wpointer-arith dnl
-Wmissing-declarations dnl
- -Wmissing-prototypes dnl
- -Wstrict-prototypes dnl
-Wredundant-decls dnl
-Wno-unused-parameter dnl
-Wno-missing-field-initializers dnl
- -Wdeclaration-after-statement dnl
-Wformat=2 dnl
- -Wold-style-definition dnl
-Wcast-align dnl
-Wformat-nonliteral dnl
-Wformat-security dnl
-Wmissing-include-dirs dnl
-Wunused-but-set-variable dnl
-Warray-bounds dnl
- -Wimplicit-function-declaration dnl
-Wreturn-type dnl
-Wswitch-enum dnl
-Wswitch-default dnl
+ -Wduplicated-cond dnl
+ -Wduplicated-branches dnl
+ -Wlogical-op dnl
+ -Wrestrict dnl
+ -Wnull-dereference dnl
+ -Wdouble-promotion dnl
$4 dnl
$5 dnl
$6 dnl
$7 dnl
],ax_warn_cflags_variable,[$ax_compiler_flags_test])
+ if test "$ax_compiler_cxx" = "no" ; then
+ # C-only flags. Warn in C++
+ AX_APPEND_COMPILE_FLAGS([ dnl
+ -Wnested-externs dnl
+ -Wmissing-prototypes dnl
+ -Wstrict-prototypes dnl
+ -Wdeclaration-after-statement dnl
+ -Wimplicit-function-declaration dnl
+ -Wold-style-definition dnl
+ -Wjump-misses-init dnl
+ ],ax_warn_cflags_variable,[$ax_compiler_flags_test])
+ fi
])
AS_IF([test "$ax_enable_compile_warnings" = "error"],[
# "error" flags; -Werror has to be appended unconditionally because
# LICENSE
#
# Copyright (c) 2014, 2015 Philip Withnall <philip@tecnocode.co.uk>
+# Copyright (c) 2017, 2018 Reini Urban <rurban@cpan.org>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
-#serial 8
+#serial 9
AC_DEFUN([AX_COMPILER_FLAGS_LDFLAGS],[
AX_REQUIRE_DEFINED([AX_APPEND_LINK_FLAGS])
ax_compiler_flags_test=""
])
- # macOS linker does not have --as-needed
+ AX_CHECK_LINK_FLAG([-Wl,--as-needed], [
+ AX_APPEND_LINK_FLAGS([-Wl,--as-needed],
+ [AM_LDFLAGS],[$ax_compiler_flags_test])
+ ])
+ AX_CHECK_LINK_FLAG([-Wl,-z,relro], [
+ AX_APPEND_LINK_FLAGS([-Wl,-z,relro],
+ [AM_LDFLAGS],[$ax_compiler_flags_test])
+ ])
+ AX_CHECK_LINK_FLAG([-Wl,-z,now], [
+ AX_APPEND_LINK_FLAGS([-Wl,-z,now],
+ [AM_LDFLAGS],[$ax_compiler_flags_test])
+ ])
+ AX_CHECK_LINK_FLAG([-Wl,-z,noexecstack], [
+ AX_APPEND_LINK_FLAGS([-Wl,-z,noexecstack],
+ [AM_LDFLAGS],[$ax_compiler_flags_test])
+ ])
+ # textonly, retpolineplt not yet
+
+ # macOS and cygwin linker do not have --as-needed
AX_CHECK_LINK_FLAG([-Wl,--no-as-needed], [
ax_compiler_flags_as_needed_option="-Wl,--no-as-needed"
], [
# Configure paths for GLIB
# Owen Taylor 1997-2001
+# Increment this whenever this file is changed.
+#serial 1
+
dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
dnl gthread, or gio is specified in MODULES, pass to pkg-config
#include <stdlib.h>
int
-main ()
+main (void)
{
unsigned int major, minor, micro;
from email import parser
import pkg_resources
-from setuptools import setup, find_packages
+from setuptools import setup
from distutils.core import Extension, Distribution, Command
from distutils.errors import DistutilsSetupError
from distutils.ccompiler import new_compiler
long_description=long_description,
platforms=pkginfo.get_all("Platform"),
classifiers=pkginfo.get_all("Classifier"),
- packages=find_packages(script_dir),
+ packages=[
+ "pygtkcompat",
+ "gi",
+ "gi.repository",
+ "gi.overrides",
+ ],
ext_modules=[
gi_ext,
gi_cairo_ext,
@contextlib.contextmanager
def capture_output():
"""
- with capture_output as (stdout, stderr):
+ with capture_output() as (stdout, stderr):
some_action()
print(stdout.getvalue(), stderr.getvalue())
"""
import gc
import weakref
import warnings
-from io import StringIO, BytesIO
import gi
import gi.overrides
from gi.repository import GIMarshallingTests
from .compathelper import PY2, PY3
-from .helper import capture_exceptions
+from .helper import capture_exceptions, capture_output
CONSTANT_UTF8 = "const ♥ utf8"
class TestModule(unittest.TestCase):
def test_path(self):
- self.assertTrue(GIMarshallingTests.__path__.endswith('GIMarshallingTests-1.0.typelib'),
- GIMarshallingTests.__path__)
+ path = GIMarshallingTests.__path__
+ assert isinstance(path, list)
+ assert len(path) == 1
+ assert path[0].endswith('GIMarshallingTests-1.0.typelib')
def test_str(self):
self.assertTrue("'GIMarshallingTests' from '" in str(GIMarshallingTests),
self.assertTrue(hasattr(item, '__class__'))
def test_help(self):
- orig_stdout = sys.stdout
- try:
- if sys.version_info < (3, 0):
- sys.stdout = BytesIO()
- else:
- sys.stdout = StringIO()
+ with capture_output() as (stdout, stderr):
help(GIMarshallingTests)
- output = sys.stdout.getvalue()
- finally:
- sys.stdout = orig_stdout
+ output = stdout.getvalue()
self.assertTrue('SimpleStruct' in output, output)
self.assertTrue('Interface2' in output, output)
from gi.repository import GLib
from gi import PyGIDeprecationWarning
+from .compathelper import PY3
+
class TestGLib(unittest.TestCase):
self.assertEqual(GLib.filename_display_name('foo'), 'foo')
self.assertEqual(GLib.filename_display_basename('bar/foo'), 'foo')
+ def glibfsencode(f):
+ # the annotations of filename_from_utf8() was changed in
+ # https://bugzilla.gnome.org/show_bug.cgi?id=756128
+ if isinstance(f, bytes):
+ return f
+ if os.name == "nt":
+ if PY3:
+ return f.encode("utf-8", "surrogatepass")
+ else:
+ return f.encode("utf-8")
+ else:
+ assert PY3
+ return os.fsencode(f)
+
# this is locale dependent, so we cannot completely verify the result
res = GLib.filename_from_utf8(u'aäb')
+ res = glibfsencode(res)
self.assertTrue(isinstance(res, bytes))
self.assertGreaterEqual(len(res), 3)
# with explicit length argument
- self.assertEqual(GLib.filename_from_utf8(u'aäb', 1), b'a')
+ res = GLib.filename_from_utf8(u'aäb', 1)
+ res = glibfsencode(res)
+ self.assertEqual(res, b'a')
def test_uri_extract(self):
res = GLib.uri_list_extract_uris('''# some comment