Imported Upstream version 3.26.0 upstream/3.26.0
authorDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 30 Oct 2018 01:29:34 +0000 (10:29 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 30 Oct 2018 01:29:34 +0000 (10:29 +0900)
23 files changed:
ChangeLog
Makefile.am
Makefile.in
NEWS
PKG-INFO
aclocal.m4
configure
configure.ac
depcomp
examples/Makefile.in
gi/Makefile.in
gi/__init__.py
gi/overrides/Makefile.in
gi/pygi-closure.c
gi/repository/Makefile.in
m4/ax_code_coverage.m4
m4/ax_compiler_flags_cflags.m4
py-compile
pygtkcompat/Makefile.in
tests/Makefile.in
tests/test_cairo.py
tests/test_gi.py
tests/test_import_machinery.py

index d2283640935059fb15e966e06b3389ec50380863..c41ba69a316f271d6498e720bd74599c666746d6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,97 @@
+commit 9580b2f1e447cea2d50f8ab83a715b29e4e862e6
+Author: Christoph Reiter <creiter@src.gnome.org>
+Date:   Tue Sep 12 08:25:25 2017 +0200
+
+    configure.ac: pre-release version bump to 3.26.0
+
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit a541a916ce798cd779ed17f015f6902e66c4454c
+Author: Christoph Reiter <creiter@src.gnome.org>
+Date:   Fri Aug 25 18:21:47 2017 +0200
+
+    closure: silence a new compiler warning
+
+    gcc7 has started to warn for fallthrough in switch. Prevent this
+    by duplicating the default case + break.
+
+ gi/pygi-closure.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit c0e42240cd72c012a740f26dc3fb0eef98328110
+Author: Christoph Reiter <creiter@src.gnome.org>
+Date:   Fri Aug 25 18:17:33 2017 +0200
+
+    tests: skip some failing test under Windows with Python 3.6
+
+    Python 3.6 has changed the default filesystem encoding on Windows
+    from mbcs to utf-8. Some tests assume mbcs, so skip them for now.
+
+ tests/test_gi.py | 24 +++++++++++++++++-------
+ 1 file changed, 17 insertions(+), 7 deletions(-)
+
+commit 0fe781efdd46386f7c373b6073d30411025e2854
+Author: Christoph Reiter <creiter@src.gnome.org>
+Date:   Tue Aug 22 13:02:43 2017 +0200
+
+    tests: pyflakes/pep8 fixes
+
+    Make Python 3 pyflakes work by adding Python 2 builtins
+    through PYFLAKES_BUILTINS.
+
+ Makefile.am                    | 4 ++--
+ tests/test_import_machinery.py | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 20430e87c66b03ac05fbab8283a3771ce8364ad8
+Author: Christoph Reiter <creiter@src.gnome.org>
+Date:   Fri Jun 9 13:13:57 2017 +0200
+
+    tests: Fix cairo test with pycairo >= 1.13
+
+    All pycairo functions now return an enum value which type is an int
+    subclass. Remove the overly strict check for the return value type.
+
+ tests/test_cairo.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 9cbf370d0034bffa60be67f6d47eee94e4045c18
+Author: Benjamin Berg <bberg@redhat.com>
+Date:   Fri Apr 21 13:35:05 2017 +0200
+
+    Make sure version information passed to require_version is a string.
+
+    This simply makes it easier for someone to find an error in cases
+    where
+    a floating point is passed by accident.
+
+    https://bugzilla.gnome.org/show_bug.cgi?id=781582
+
+ gi/__init__.py                 |  7 +++++++
+ tests/test_import_machinery.py | 12 ++++++++++++
+ 2 files changed, 19 insertions(+)
+
+commit 5e2bb06086c6bfa2bcb1a47f4c963d336630d12e
+Author: Christoph Reiter <creiter@src.gnome.org>
+Date:   Sat Apr 22 15:56:37 2017 +0200
+
+    configure.ac: post-release version bump to 3.25.2
+
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 31d7e92a24400a5d03f05912fdd8fd625082a837
+Author: Christoph Reiter <creiter@src.gnome.org>
+Date:   Fri Apr 21 18:30:12 2017 +0200
+
+    release 3.25.1
+
+ NEWS         | 59
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ configure.ac |  2 +-
+ 2 files changed, 60 insertions(+), 1 deletion(-)
+
 commit fc451f235754a98c647972f0a03e11eaefca4cef
 Author: Christoph Reiter <creiter@src.gnome.org>
 Date:   Wed Apr 19 15:04:30 2017 +0200
index 4c913627133277121ea1b84d86208a9821b1b6f9..4d1fdda7cbb7442a46932999995d971bbfd18264 100644 (file)
@@ -139,12 +139,12 @@ dist-hook: $(BUILT_EXTRA_DIST)
 check.quality:
        @echo "  CHECK  Pyflakes" $(pycheck_dirs)
        @if type pyflakes >/dev/null 2>&1; then \
-               (cd $(abs_top_srcdir) && pyflakes $(pycheck_dirs) ); \
+               (cd $(abs_top_srcdir) && PYFLAKES_BUILTINS="basestring,long,unicode" pyflakes $(pycheck_dirs) ); \
        else echo "skipped, pyflakes not installed"; \
        fi
        @echo "  CHECK  PEP8";
        @if type pep8 >/dev/null 2>&1; then \
-               (cd $(abs_top_srcdir) && pep8 --ignore=E501,E123,E124,E402,E731 --repeat --show-source $(pycheck_dirs) ); \
+               (cd $(abs_top_srcdir) && pep8 --ignore=E501,E123,E124,E402,E731,E722 --repeat --show-source $(pycheck_dirs) ); \
        else echo "skipped, pep8 not installed"; \
        fi
 
index 84750906512d2d71991c81436f2a81b7c79d6d0e..59f490ae4a7ee7b374bfb5201b3d8b25afad9bcc 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -854,7 +854,7 @@ distdir: $(DISTFILES)
          ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
        || chmod -R a+r "$(distdir)"
 dist-gzip: distdir
-       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+       tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
        $(am__post_remove_distdir)
 
 dist-bzip2: distdir
@@ -879,7 +879,7 @@ dist-shar: distdir
        @echo WARNING: "Support for shar distribution archives is" \
                       "deprecated." >&2
        @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
-       shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+       shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
        $(am__post_remove_distdir)
 
 dist-zip: distdir
@@ -897,7 +897,7 @@ dist dist-all:
 distcheck: dist
        case '$(DIST_ARCHIVES)' in \
        *.tar.gz*) \
-         GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+         eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
        *.tar.bz2*) \
          bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
        *.tar.lz*) \
@@ -907,7 +907,7 @@ distcheck: dist
        *.tar.Z*) \
          uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
        *.shar.gz*) \
-         GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+         eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
        *.zip*) \
          unzip $(distdir).zip ;;\
        esac
@@ -1179,12 +1179,12 @@ dist-hook: $(BUILT_EXTRA_DIST)
 check.quality:
        @echo "  CHECK  Pyflakes" $(pycheck_dirs)
        @if type pyflakes >/dev/null 2>&1; then \
-               (cd $(abs_top_srcdir) && pyflakes $(pycheck_dirs) ); \
+               (cd $(abs_top_srcdir) && PYFLAKES_BUILTINS="basestring,long,unicode" pyflakes $(pycheck_dirs) ); \
        else echo "skipped, pyflakes not installed"; \
        fi
        @echo "  CHECK  PEP8";
        @if type pep8 >/dev/null 2>&1; then \
-               (cd $(abs_top_srcdir) && pep8 --ignore=E501,E123,E124,E402,E731 --repeat --show-source $(pycheck_dirs) ); \
+               (cd $(abs_top_srcdir) && pep8 --ignore=E501,E123,E124,E402,E731,E722 --repeat --show-source $(pycheck_dirs) ); \
        else echo "skipped, pep8 not installed"; \
        fi
 
diff --git a/NEWS b/NEWS
index 4d01190ab5f7eb7e70de81768b0f9270d87b9239..6abf74f0e537521812935afaea657a9fc6c49a31 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,71 @@
+3.26.0  12-Sep-2017
+        - configure.ac: pre-release version bump to 3.26.0 (Christoph Reiter)
+        - closure: silence a new compiler warning (Christoph Reiter)
+        - tests: skip some failing test under Windows with Python 3.6 (Christoph Reiter)
+        - tests: pyflakes/pep8 fixes (Christoph Reiter)
+        - tests: Fix cairo test with pycairo >= 1.13 (Christoph Reiter)
+        - Make sure version information passed to require_version is a string. (Benjamin Berg) (#781582)
+        - configure.ac: post-release version bump to 3.25.2 (Christoph Reiter)
+
+3.25.1  21-Apr-2017
+        - Bump pycairo requirement to 1.11.1 (Christoph Reiter) (#707196)
+        - configure.ac: Always disable -Werror (Christoph Reiter)
+        - foreign-cairo: Enable cairo.Region support also on Python 2 if available (Christoph Reiter)
+        - configure.ac: remove unused PLATFORM variable (Christoph Reiter)
+        - configure.ac: Remove unused PySignal_SetWakeupFd check (Christoph Reiter)
+        - tests: remove python 2.5/3.2 compat code (Christoph Reiter)
+        - configure.ac: Require Python 3.3 (Christoph Reiter)
+        - tests: Make test suite run with GTK+ 4 (Christoph Reiter)
+        - tests: always call require_version; add TEST_GTK_VERSION env var (Christoph Reiter)
+        - tests: Fix make check.valgrind (Christoph Reiter)
+        - tests: Don't skip Regress tests when cairo is missing (Christoph Reiter)
+        - tests: fix invalid regex escaping (Christoph Reiter)
+        - tests: avoid mapping a GtkWindow (Christoph Reiter) (#780812)
+        - tests: silence some glib deprecation warnings (Christoph Reiter) (#780812)
+        - tests: avoid deprecation warnings for assertRegexpMatches/assertRaisesRegexp (Christoph Reiter) (#780812)
+        - pygi-source: clear exceptions in finalize handler (Christoph Reiter) (#780812)
+        - Fix pep8 errors (Christoph Reiter)
+        - Remove gi._gi._gobject and gi._gobject modules (Christoph Reiter) (#735206)
+        - Remove gi._gi._glib module (Christoph Reiter) (#735206)
+        - GValue: add overflow checking for py -> gint; forward marshaling exceptions (Christoph Reiter) (#769789)
+        - pygobject_lookup_class: clear exceptions between calls and don't return with one set (Christoph Reiter) (#773394)
+        - Avoid some new deprecation warnings (Christoph Reiter) (#780768)
+        - Raise RuntimeError in case an uninitilialized GObject.Object is marshaled (Christoph Reiter) (#730908)
+        - closure: support unichar args (Christoph Reiter) (#759276)
+        - Add support for bytes and non-utf-8 file names. (Christoph Reiter) (#746564)
+        - test_gi: use correct min/max constants for gsize/gssize (Christoph Reiter) (#780591)
+        - Don't use long format string for formatting pointers (Christoph Reiter) (#780591)
+        - Fix conversion from pointers to hashfunc return values. (Christoph Reiter) (#780591)
+        - Fix PyLong <-> GPid conversion on 64bit Windows (Christoph Reiter) (#780591)
+        - property: support setting flags (Christoph Reiter) (#726484)
+        - overrides: warn on instantiation of Gio.VolumeMonitor (Christoph Reiter) (#744690)
+        - Remove gi.overrides.overridefunc (Christoph Reiter) (#686835)
+        - tests: Reduce usage of timeout_add() and sleep() (Christoph Reiter) (#698548)
+        - tests: Remove TestMainLoop.test_concurrency (Christoph Reiter) (#698548)
+        - Update .gitignore: add *.dll, *.dylib, .DS_STORE (Christoph Reiter)
+        - tests: Make test suite run on Windows (Christoph Reiter) (#780396)
+        - tests: Make test suite run on macOS (Christoph Reiter) (#780396)
+        - Fix various compiler warnings for 32bit builds (Christoph Reiter) (#780409)
+        - pep8 fix (Christoph Reiter)
+        - testhelper: only link against libpython on Windows (Christoph Reiter) (#773803)
+        - overrides: Fix Gtk.TextBuffer.insert_with_tags_by_name() with no tags (Garrett Regier) (#772896)
+        - Make use of instance-argument annotations (Christoph Reiter) (#735076)
+        - Remove pyglib_gil_state_ensure/pyglib_gil_state_release (Christoph Reiter) (#699440)
+        - Remove support for building without threads (Christoph Reiter) (#699440)
+        - pygtkcompat: Allow multiple calls to enable(), enable_gtk() as long as the version matches (Christoph Reiter) (#759009)
+        - tests: Update Makefile for building tests on OS X (Simon Feltman) (#762176)
+        - testhelper: propagate exception if _gobject could not be imported (Mikhail Fludkov) (#772949)
+        - pygi-info: initialize GIArgument before passing it to g_constant_info_get_value (Christoph Reiter) (#772949)
+        - tests: build libregress with disabled cairo (Mikhail Fludkov) (#772949)
+        - tests: use g-ir utils found by pkg-config (Mikhail Fludkov) (#772949)
+        - Add a foreign type for cairo_region_t. (Shyouzou Sugitani) (#667959)
+        - aclocal: make local file discover by reading AC_CONFIG_MACRO_DIR work (Christoph Reiter) (#777713)
+        - Port from gnome-common to autoconf-archive (Christoph Reiter) (#777713)
+        - Fix various potential compiler warnings (Christoph Reiter) (#777713)
+        - configure.ac: post-release version bump to 3.25.0 (Christoph Reiter)
+        - Remove egg make target (Christoph Reiter) (#777719)
+        - Remove legacy docs (Christoph Reiter) (#777719)
+
 3.24.0  20-Mar-2017
         - configure.ac: pre-release version bump to 3.24.0 (Christoph Reiter)
 
index 93e54bb72f2b3274f7ff3059b0ea52812c07e124..5ee6f40485c9b87b325c942e63a150c660dc14c4 100644 (file)
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: PyGObject
-Version: 3.25.1
+Version: 3.26.0
 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: Simon Feltman
 Maintainer-email: sfeltman@src.gnome.org
 License: GNU LGPL
-Download-url: ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/3.25/pygobject-3.25.1.tar.gz
+Download-url: ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/3.26/pygobject-3.26.0.tar.gz
 Description: Python bindings for GLib and GObject
 Platform: POSIX, Windows
 Classifier: Development Status :: 5 - Production/Stable
index 54823e062ecec96a1eaa6ca06b33f251d7dcf5e2..71b74d24d3619c3a29d2633e8c0614037cb01f11 100644 (file)
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.15 -*- Autoconf -*-
+# generated automatically by aclocal 1.15.1 -*- Autoconf -*-
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -20,7 +20,7 @@ You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
 
-# Copyright (C) 2002-2014 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -35,7 +35,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
 [am__api_version='1.15'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.15], [],
+m4_if([$1], [1.15.1], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.15])dnl
+[AM_AUTOMAKE_VERSION([1.15.1])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -110,7 +110,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -141,7 +141,7 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -332,7 +332,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -408,7 +408,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -605,7 +605,7 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -626,7 +626,7 @@ if test x"${install_sh+set}" != xset; then
 fi
 AC_SUBST([install_sh])])
 
-# Copyright (C) 2003-2014 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -647,7 +647,7 @@ AC_SUBST([am__leading_dot])])
 
 # Check to see how 'make' treats includes.                 -*- Autoconf -*-
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -697,7 +697,7 @@ rm -f confinc confmf
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -736,7 +736,7 @@ fi
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -765,7 +765,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
 AC_DEFUN([_AM_IF_OPTION],
 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -812,7 +812,7 @@ AC_LANG_POP([C])])
 # For backward compatibility.
 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -845,8 +845,9 @@ AC_DEFUN([AM_PATH_PYTHON],
  [
   dnl Find a Python interpreter.  Python versions prior to 2.0 are not
   dnl supported. (2.0 was released on October 16, 2000).
+  dnl FIXME: Remove the need to hard-code Python versions here.
   m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
-[python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 dnl
+[python python2 python3 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 dnl
  python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
 
   AC_ARG_VAR([PYTHON], [the Python interpreter])
@@ -1047,7 +1048,7 @@ for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
 sys.exit(sys.hexversion < minverhex)"
   AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1066,7 +1067,7 @@ AC_DEFUN([AM_RUN_LOG],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1147,7 +1148,7 @@ AC_CONFIG_COMMANDS_PRE(
 rm -f conftest.file
 ])
 
-# Copyright (C) 2009-2014 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1207,7 +1208,7 @@ AC_SUBST([AM_BACKSLASH])dnl
 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 ])
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1235,7 +1236,7 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006-2014 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1254,7 +1255,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004-2014 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
index 680772282e89f59686c919453682bb0cad079f09..efbf8051be2ce8f12273b58f61c5089794fd1deb 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for pygobject 3.25.1.
+# Generated by GNU Autoconf 2.69 for pygobject 3.26.0.
 #
 # Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject>.
 #
@@ -591,8 +591,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='pygobject'
 PACKAGE_TARNAME='pygobject'
-PACKAGE_VERSION='3.25.1'
-PACKAGE_STRING='pygobject 3.25.1'
+PACKAGE_VERSION='3.26.0'
+PACKAGE_STRING='pygobject 3.26.0'
 PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject'
 PACKAGE_URL='https://wiki.gnome.org/Projects/PyGObject/'
 
@@ -1419,7 +1419,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.25.1 to adapt to many kinds of systems.
+\`configure' configures pygobject 3.26.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1490,7 +1490,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of pygobject 3.25.1:";;
+     short | recursive ) echo "Configuration of pygobject 3.26.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1635,7 +1635,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-pygobject configure 3.25.1
+pygobject configure 3.26.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1913,7 +1913,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.25.1, which was
+It was created by pygobject $as_me 3.26.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2283,14 +2283,14 @@ $as_echo "#define PYGOBJECT_MAJOR_VERSION 3" >>confdefs.h
 PYGOBJECT_MAJOR_VERSION=3
 
 
-$as_echo "#define PYGOBJECT_MINOR_VERSION 25" >>confdefs.h
+$as_echo "#define PYGOBJECT_MINOR_VERSION 26" >>confdefs.h
 
-PYGOBJECT_MINOR_VERSION=25
+PYGOBJECT_MINOR_VERSION=26
 
 
-$as_echo "#define PYGOBJECT_MICRO_VERSION 1" >>confdefs.h
+$as_echo "#define PYGOBJECT_MICRO_VERSION 0" >>confdefs.h
 
-PYGOBJECT_MICRO_VERSION=1
+PYGOBJECT_MICRO_VERSION=0
 
 
 ac_config_headers="$ac_config_headers config.h"
@@ -2810,7 +2810,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='pygobject'
- VERSION='3.25.1'
+ VERSION='3.26.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -14883,6 +14883,47 @@ else
 fi
 
 
+    # Check that -Wno-suggest-attribute=format is supported
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wno-suggest-attribute=format" >&5
+$as_echo_n "checking whether C compiler accepts -Wno-suggest-attribute=format... " >&6; }
+if ${ax_cv_check_cflags___Wno_suggest_attribute_format+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+  ax_check_save_flags=$CFLAGS
+  CFLAGS="$CFLAGS  -Wno-suggest-attribute=format"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ax_cv_check_cflags___Wno_suggest_attribute_format=yes
+else
+  ax_cv_check_cflags___Wno_suggest_attribute_format=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CFLAGS=$ax_check_save_flags
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___Wno_suggest_attribute_format" >&5
+$as_echo "$ax_cv_check_cflags___Wno_suggest_attribute_format" >&6; }
+if test "x$ax_cv_check_cflags___Wno_suggest_attribute_format" = xyes; then :
+
+        ax_compiler_no_suggest_attribute_flags="-Wno-suggest-attribute=format"
+
+else
+
+        ax_compiler_no_suggest_attribute_flags=""
+
+fi
+
+
     # Base flags
 
 
@@ -15084,7 +15125,7 @@ fi
 
 
 
-for flag in              -Wno-suggest-attribute=format         ; do
+for flag in              $ax_compiler_no_suggest_attribute_flags         ; 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; }
@@ -16289,7 +16330,7 @@ CODE_COVERAGE_LCOV_RMOPTS ?= $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT)
 CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\
 $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\
 --rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE))
-CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULTS)
+CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT)
 CODE_COVERAGE_IGNORE_PATTERN ?=
 
 code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V))
@@ -16890,7 +16931,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.25.1, which was
+This file was extended by pygobject $as_me 3.26.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -16957,7 +16998,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.25.1
+pygobject config.status 3.26.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index 68351ca573c1aaaf2bf58d35b47fd58be550a1be..1ee54c2fae741adbb59cd88ff0fd51748b8561d5 100644 (file)
@@ -17,8 +17,8 @@ m4_define(python3_min_ver, 3.3)
 
 dnl the pygobject version number
 m4_define(pygobject_major_version, 3)
-m4_define(pygobject_minor_version, 25)
-m4_define(pygobject_micro_version, 1)
+m4_define(pygobject_minor_version, 26)
+m4_define(pygobject_micro_version, 0)
 m4_define(pygobject_version, pygobject_major_version.pygobject_minor_version.pygobject_micro_version)
 
 dnl versions of packages we require ...
diff --git a/depcomp b/depcomp
index fc98710e2a1df7159cd72a01ffc011784748c3bc..b39f98f9ae9f950391abb09f4fa03ee113a07ac6 100755 (executable)
--- a/depcomp
+++ b/depcomp
@@ -1,9 +1,9 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2013-05-30.07; # UTC
+scriptversion=2016-01-11.22; # UTC
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -786,6 +786,6 @@ exit 0
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
index fb648c3c04be8b412c39c0eccf50f4cfbb3f0d0d..7b2261376995942b3f7958a404765048644bbc7a 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
index 6382c76aa3f5c69d29a4be723098a0a954e0e2a8..135357327496e70f8fac9d0ae49356d836b08c97 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
index 9fefc7915dd791e382e29f4aaf5bdb3fcebecb3f..185c4d409332661c86da2c5ce13b3d2d170b4a82 100644 (file)
@@ -108,6 +108,13 @@ def require_version(namespace, version):
     """
     repository = Repository.get_default()
 
+    if sys.version_info[0] <= 2:
+        if not isinstance(version, basestring):
+            raise ValueError('Namespace version needs to be a string.')
+    else:
+        if not isinstance(version, str):
+            raise ValueError('Namespace version needs to be a string.')
+
     if namespace in repository.get_loaded_namespaces():
         loaded_version = repository.get_version(namespace)
         if loaded_version != version:
index 61044db84d41c67e60da0289a8983f193b5f8f5e..8f6028b845f8b675398fd7d23607a8bf6f5653f5 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
index 17b283f4a84bfeb17f7c89d629ddb182252d3f3f..03bd050d6bd9ca948203329d990cc16809e6d198 100644 (file)
@@ -184,8 +184,8 @@ _pygi_closure_assign_pyobj_to_out_argument (gpointer out_arg,
                    }
                    break;
                }
-
-           /* Fall through if pointer */
+               *((gpointer *) out_arg) = arg->v_pointer;
+               break;
            default:
                *((gpointer *) out_arg) = arg->v_pointer;
                break;
index 91d8e17dbf6ede8a66222f90303fc8a500d0eb43..82a32d2380ad4b920a191e9bda348e5f2b7af4c7 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
index 0934a44c5e313eed8476661de5e0446b47e84700..03f2c9565f7927e3432bc9bf7c20ee41e49a3f7e 100644 (file)
@@ -21,7 +21,7 @@
 #   Test also for gcov program and create GCOV variable that could be
 #   substituted.
 #
-#   Note that all optimisation flags in CFLAGS must be disabled when code
+#   Note that all optimization flags in CFLAGS must be disabled when code
 #   coverage is enabled.
 #
 #   Usage example:
@@ -75,7 +75,7 @@
 #   You should have received a copy of the GNU Lesser General Public License
 #   along with this program. If not, see <https://www.gnu.org/licenses/>.
 
-#serial 21
+#serial 24
 
 AC_DEFUN([AX_CODE_COVERAGE],[
        dnl Check for --enable-code-coverage
@@ -218,7 +218,7 @@ CODE_COVERAGE_LCOV_RMOPTS ?= $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT)
 CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\
 $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\
 --rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE))
-CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULTS)
+CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT)
 CODE_COVERAGE_IGNORE_PATTERN ?=
 
 code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V))
index 69162e169c4c20d348029bc9cf540a45e66aaddb..aeb16e329f538be2e33077ab5a6f07aba09d3a6d 100644 (file)
@@ -25,7 +25,7 @@
 #   and this notice are preserved.  This file is offered as-is, without any
 #   warranty.
 
-#serial 13
+#serial 14
 
 AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[
     AC_REQUIRE([AC_PROG_SED])
@@ -50,6 +50,13 @@ AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[
         ax_compiler_flags_test=""
     ])
 
+    # Check that -Wno-suggest-attribute=format is supported
+    AX_CHECK_COMPILE_FLAG([-Wno-suggest-attribute=format],[
+        ax_compiler_no_suggest_attribute_flags="-Wno-suggest-attribute=format"
+    ],[
+        ax_compiler_no_suggest_attribute_flags=""
+    ])
+
     # Base flags
     AX_APPEND_COMPILE_FLAGS([ dnl
         -fno-strict-aliasing dnl
@@ -108,7 +115,7 @@ AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[
         AX_APPEND_FLAG([-Werror],ax_warn_cflags_variable)
 
         AX_APPEND_COMPILE_FLAGS([ dnl
-            -Wno-suggest-attribute=format dnl
+            [$ax_compiler_no_suggest_attribute_flags] dnl
         ],ax_warn_cflags_variable,[$ax_compiler_flags_test])
     ])
 
index bc2039140b6cad62d0fd8939ac1aa89082b24d07..3693d96b0a61bfec63f642db05d8c1c59079b3c4 100755 (executable)
@@ -1,9 +1,9 @@
 #!/bin/sh
 # py-compile - Compile a Python program
 
-scriptversion=2011-06-08.12; # UTC
+scriptversion=2016-01-11.22; # UTC
 
-# Copyright (C) 2000-2014 Free Software Foundation, Inc.
+# Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -165,6 +165,6 @@ sys.stdout.write('\n')" 2>/dev/null || :
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
index 94a31e582c8e784d6ea1d894654ed51c23284759..0e787c25a7e0674a8303fd22babc217ffc8def69 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
index 3e34139b0fa9af3506e947255327ed7d0f24304b..f070538c5cf615aabcc11b57babd9b24c176ab04 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
index 3edf5d5074cbe78dd7b625517feb4844a2376a6f..06289e245f49dd7dca07178440510e3312b5a309 100644 (file)
@@ -95,7 +95,7 @@ class TestPango(unittest.TestCase):
     def test_cairo_font_options(self):
         screen = Gtk.Window().get_screen()
         font_opts = screen.get_font_options()
-        self.assertEqual(type(font_opts.get_subpixel_order()), int)
+        self.assertTrue(isinstance(font_opts.get_subpixel_order(), int))
 
 
 if has_cairo:
index 173744a13ed94958856cba4e842c594866287ad8..8a9bb2ce4c699056e8c943164078c1d43d78b0c1 100644 (file)
@@ -692,6 +692,7 @@ class TestFilename(unittest.TestCase):
     def tearDown(self):
         shutil.rmtree(self.workdir)
 
+    @unittest.skipIf(os.name == "nt", "fixme")
     def test_filename_in(self):
         fname = os.path.join(self.workdir, u'testäø.txt')
         self.assertRaises(GLib.GError, GLib.file_get_contents, fname)
@@ -808,12 +809,17 @@ class TestFilename(unittest.TestCase):
         glib_repr = GIMarshallingTests.filename_to_glib_repr
 
         if PY3:
-            str_path = copy(b"\xff\xfe")
-            self.assertTrue(isinstance(str_path, str))
-            self.assertEqual(str_path, os.fsdecode(b"\xff\xfe"))
-            self.assertEqual(copy(str_path), str_path)
-            self.assertEqual(glib_repr(b"\xff\xfe"), b"\xff\xfe")
-            self.assertEqual(glib_repr(str_path), b"\xff\xfe")
+            try:
+                os.fsdecode(b"\xff\xfe")
+            except UnicodeDecodeError:
+                self.assertRaises(UnicodeDecodeError, copy, b"\xff\xfe")
+            else:
+                str_path = copy(b"\xff\xfe")
+                self.assertTrue(isinstance(str_path, str))
+                self.assertEqual(str_path, os.fsdecode(b"\xff\xfe"))
+                self.assertEqual(copy(str_path), str_path)
+                self.assertEqual(glib_repr(b"\xff\xfe"), b"\xff\xfe")
+                self.assertEqual(glib_repr(str_path), b"\xff\xfe")
 
             # if getfilesystemencoding is ASCII, then we should fail like
             # os.fsencode
@@ -853,7 +859,11 @@ class TestFilename(unittest.TestCase):
 
         paths = [(wdb, b"foo-1"), (wd, u"foo-2"), (wd, u"öäü-3")]
         if PY3:
-            paths.append((wd, os.fsdecode(b"\xff\xfe-4")))
+            try:
+                paths.append((wd, os.fsdecode(b"\xff\xfe-4")))
+            except UnicodeDecodeError:
+                # depends on the code page
+                pass
 
         if os.name != "nt":
             paths.append((wdb, b"\xff\xfe-5"))
index 044117ddb2e98cc5f03ab51af355883592c54e63..f1a5f30c6fb7b7efab14872e92225e34c265dd5d 100644 (file)
@@ -140,6 +140,18 @@ class TestImporter(unittest.TestCase):
                 from gi.repository import InvalidGObjectRepositoryModuleName
                 InvalidGObjectRepositoryModuleName
 
+    def test_require_version_versiontype(self):
+        import gi
+        with self.assertRaises(ValueError):
+            gi.require_version('GLib', 2.0)
+
+        # Test that unicode strings work in python 2
+        if sys.version_info[0] <= 2:
+            gi.require_version('GLib', unicode('2.0'))
+        else:
+            with self.assertRaises(ValueError):
+                gi.require_version('GLib', b'2.0')
+
     def test_require_versions(self):
         import gi
         gi.require_versions({'GLib': '2.0', 'Gio': '2.0', 'GObject': '2.0'})