Imported Upstream version 3.28.0 upstream/3.28.0
authorDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 30 Oct 2018 01:30:10 +0000 (10:30 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 30 Oct 2018 01:30:10 +0000 (10:30 +0900)
ChangeLog
NEWS
PKG-INFO
configure
configure.ac
gi/overrides/GLib.py
m4/ax_code_coverage.m4
tests/__init__.py
tests/test_overrides_glib.py

index 6bd8452..4601f62 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,54 @@
+commit dde2f66f9d95f4da81230b11317207a1ac08d84e
+Author: Christoph Reiter <reiter.christoph@gmail.com>
+Date:   Mon Mar 12 08:36:14 2018 +0100
+
+    release
+
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 9562b75a825c2a0c223bd89a2859dae5b419647f
+Author: Christoph Reiter <reiter.christoph@gmail.com>
+Date:   Mon Mar 12 12:39:52 2018 +0100
+
+    tests: fix with stable builds by force enabling PyGIDeprecationWarning
+
+ tests/__init__.py | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+commit 22b41598d69fce167a0d44f6a9f91034d099f696
+Author: Christoph Reiter <reiter.christoph@gmail.com>
+Date:   Mon Mar 12 08:35:27 2018 +0100
+
+    Update NEWS
+
+ NEWS | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+commit 02664122c260a31fa9d242d09ddede639fea80bb
+Author: Christoph Reiter <reiter.christoph@gmail.com>
+Date:   Sat Mar 10 10:41:27 2018 +0100
+
+    GLib.Variant: Fix creation of guchar array from bytes. Fixes #174
+
+    This is some fallout from !4
+
+    Instead of only allowing certain types just make sure that the passed
+    value is iterable.
+
+ gi/overrides/GLib.py         |  4 +++-
+ tests/test_overrides_glib.py | 16 ++++++++++++++++
+ 2 files changed, 19 insertions(+), 1 deletion(-)
+
+commit 92f94761dfed4105e0b3f6d1c490f60ec31816a8
+Author: Christoph Reiter <reiter.christoph@gmail.com>
+Date:   Thu Mar 1 18:03:26 2018 +0100
+
+    version bump
+
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
 commit 7e571ea62074243eef36110c240e192e5682a687
 Author: Christoph Reiter <reiter.christoph@gmail.com>
 Date:   Thu Mar 1 17:57:08 2018 +0100
diff --git a/NEWS b/NEWS
index df7996a..59665c5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,10 @@
+3.28.0 - 2018-03-12
+-------------------
+
+* GLib.Variant: Fix creation of guchar arrays from bytes (3.27.2 regression).
+  :issue:`174` :mr:`30`
+
+
 3.27.5 - 2018-03-01
 -------------------
 
index b1fb3a4..73fd01c 100644 (file)
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: PyGObject
-Version: 3.27.5
+Version: 3.28.0
 Summary: Python bindings for GObject Introspection
 Home-page: https://pygobject.readthedocs.io
 Author: James Henstridge
index 0ea4390..f3ad8a2 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.27.5.
+# Generated by GNU Autoconf 2.69 for pygobject 3.28.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.27.5'
-PACKAGE_STRING='pygobject 3.27.5'
+PACKAGE_VERSION='3.28.0'
+PACKAGE_STRING='pygobject 3.28.0'
 PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject'
 PACKAGE_URL='https://wiki.gnome.org/Projects/PyGObject/'
 
@@ -1418,7 +1418,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.27.5 to adapt to many kinds of systems.
+\`configure' configures pygobject 3.28.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1489,7 +1489,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of pygobject 3.27.5:";;
+     short | recursive ) echo "Configuration of pygobject 3.28.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1634,7 +1634,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-pygobject configure 3.27.5
+pygobject configure 3.28.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1912,7 +1912,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.27.5, which was
+It was created by pygobject $as_me 3.28.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2285,14 +2285,14 @@ $as_echo "#define PYGOBJECT_MAJOR_VERSION 3" >>confdefs.h
 PYGOBJECT_MAJOR_VERSION=3
 
 
-$as_echo "#define PYGOBJECT_MINOR_VERSION 27" >>confdefs.h
+$as_echo "#define PYGOBJECT_MINOR_VERSION 28" >>confdefs.h
 
-PYGOBJECT_MINOR_VERSION=27
+PYGOBJECT_MINOR_VERSION=28
 
 
-$as_echo "#define PYGOBJECT_MICRO_VERSION 5" >>confdefs.h
+$as_echo "#define PYGOBJECT_MICRO_VERSION 0" >>confdefs.h
 
-PYGOBJECT_MICRO_VERSION=5
+PYGOBJECT_MICRO_VERSION=0
 
 
 ac_config_headers="$ac_config_headers config.h"
@@ -2812,7 +2812,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='pygobject'
- VERSION='3.27.5'
+ VERSION='3.28.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -16330,9 +16330,12 @@ 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 ?=
 
+GITIGNOREFILES ?=
+GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY)
+
 code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V))
 code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY))
 code_coverage_v_lcov_cap_0 = @echo "  LCOV   --capture"\
@@ -16362,9 +16365,6 @@ code-coverage-capture-hook:
 
 '"$CODE_COVERAGE_RULES_CLEAN"'
 
-GITIGNOREFILES ?=
-GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY)
-
 A''M_DISTCHECK_CONFIGURE_FLAGS ?=
 A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage
 
@@ -16931,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.27.5, which was
+This file was extended by pygobject $as_me 3.28.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -16998,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.27.5
+pygobject config.status 3.28.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index 4ab326b..369a3f8 100644 (file)
@@ -17,8 +17,8 @@ m4_define(python3_min_ver, 3.4)
 
 dnl the pygobject version number
 m4_define(pygobject_major_version, 3)
-m4_define(pygobject_minor_version, 27)
-m4_define(pygobject_micro_version, 5)
+m4_define(pygobject_minor_version, 28)
+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 ...
index b1ff24f..f00c779 100644 (file)
@@ -126,7 +126,9 @@ class _VariantCreator(object):
             builder.add_value(self._create(gvtype.element().dup_string(), value))
             return builder.end()
 
-        if not isinstance(value, (dict, tuple, list)):
+        try:
+            iter(value)
+        except TypeError:
             raise TypeError("Could not create array, tuple or dictionary entry from non iterable value %s %s" %
                             (format, value))
 
index 0934a44..6484f03 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 25
 
 AC_DEFUN([AX_CODE_COVERAGE],[
        dnl Check for --enable-code-coverage
@@ -218,9 +218,12 @@ 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 ?=
 
+GITIGNOREFILES ?=
+GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY)
+
 code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V))
 code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY))
 code_coverage_v_lcov_cap_0 = @echo "  LCOV   --capture"\
@@ -250,9 +253,6 @@ code-coverage-capture-hook:
 
 '"$CODE_COVERAGE_RULES_CLEAN"'
 
-GITIGNOREFILES ?=
-GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY)
-
 A''M_DISTCHECK_CONFIGURE_FLAGS ?=
 A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage
 
index 4d9b383..09a20e3 100644 (file)
@@ -6,6 +6,7 @@ import unittest
 import signal
 import subprocess
 import atexit
+import warnings
 
 
 def init_test_environ():
@@ -96,6 +97,10 @@ def init_test_environ():
         "GObject": "2.0",
     })
 
+    # It's disabled for stable releases by default, this makes sure it's
+    # always on for the tests.
+    warnings.simplefilter('default', gi.PyGIDeprecationWarning)
+
 
 init_test_environ()
 
index 6dcfd58..9130334 100644 (file)
@@ -142,6 +142,22 @@ class TestGVariant(unittest.TestCase):
         self.assertEqual(variant.get_type_string(), 'aai')
         self.assertEqual(variant.unpack(), [[1, 2], [3, 4, 5]])
 
+    def test_create_array_guchar(self):
+        variant = GLib.Variant('ay', [97, 97, 97])
+        assert variant.unpack() == [97, 97, 97]
+
+        variant = GLib.Variant('ay', b'aaa')
+        assert variant.unpack() == [97, 97, 97]
+
+        variant = GLib.Variant('ay', iter([1, 2, 3]))
+        assert variant.unpack() == [1, 2, 3]
+
+        with self.assertRaises(TypeError):
+            GLib.Variant('ay', u'aaa')
+
+        with self.assertRaises(TypeError):
+            GLib.Variant('ay', object())
+
     def test_create_maybe(self):
         variant = GLib.Variant('mai', None)
         self.assertEqual(variant.get_type_string(), 'mai')