+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
+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
-------------------
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
#! /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>.
#
# 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/'
# 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]...
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
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.
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 $@
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"
# Define the identity of the package.
PACKAGE='pygobject'
- VERSION='3.27.5'
+ VERSION='3.28.0'
cat >>confdefs.h <<_ACEOF
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"\
'"$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
# 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
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\\"
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 ...
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))
# 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:
# 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
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"\
'"$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
import signal
import subprocess
import atexit
+import warnings
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()
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')