+commit e65d2fe75310a478e09eef1ab942ece09516d7d9
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date: Thu Feb 9 10:02:14 2012 +0100
+
+ Prepare 3.0.4 release
+
+ NEWS | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+commit f24b5a4306fb83f6ff46920ecd7adc201d105b16
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date: Sat Jan 7 09:47:24 2012 +0100
+
+ Revert "Convert all strings to utf-8 encoding when retrieving from
+ TreeModel"
+
+ This changes existing behaviour (model values being str instead of
+ unicode) and
+ also makes tree model behaviour incompatible to the rest of Gtk
+ behaviour
+ (which always returns UTF-8 encoded str objects, not unicode). The
+ original bug
+ description was a bug in the test case code, you cannot mix str
+ and unicode
+ objects in interpolation.
+
+ This reverts commit 33060639bc4857238f21c2329b8e8888fbd8fdc2.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=663610
+
+ gi/overrides/Gtk.py | 15 ---------------
+ tests/compathelper.py | 2 --
+ tests/test_overrides.py | 31 +------------------------------
+ 3 files changed, 1 insertions(+), 47 deletions(-)
+
+commit cba8124389de92f98c45cbaf2bd9c320036d6407
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.com>
+Date: Fri Dec 23 12:20:15 2011 +0100
+
+ Post-release bump to 3.0.4
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 9ba741343e79f0d108074c0110f1aada5f7da4a3
+Merge: 3306063 8d1a36c
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.com>
+Date: Fri Dec 23 12:18:00 2011 +0100
+
+ Merge branch 'master' into pygobject-3-0
+
+commit 8d1a36cc73f5f4df091ecb289c8a7b38ec2ab605
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.com>
+Date: Mon Dec 12 18:35:30 2011 +0100
+
+ Add notes about branching to HACKING
+
+ HACKING | 10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+commit 00030bc6f0fb961c716ed692144cd8e4bb9be7d0
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date: Sat Dec 10 12:51:45 2011 +0100
+
+ Fixed bug where GObject.property did not respect minimum and maximum
+ values
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=664864
+
+ gi/_gobject/propertyhelper.py | 2 +-
+ tests/test_properties.py | 31 +++++++++++++++++++++++++++++++
+ 2 files changed, 32 insertions(+), 1 deletions(-)
+
+commit 7b78abc6c399abd0daa4c11c644d107e1bb7b452
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.com>
+Date: Mon Dec 12 17:00:24 2011 +0100
+
+ Remove mention of removed option --enable-docs
+
+ HACKING | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 4cba52f5b5e79b7b6212cb0795e8976a9da9f21d
+Author: Tomeu Vizoso <tomeu.vizoso@collabora.com>
+Date: Mon Dec 12 17:00:03 2011 +0100
+
+ Fix sebp's name in NEWS
+
+ NEWS | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
commit 8c95981d0ba224a577f87998030c384b3dae3d80
Author: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Date: Mon Dec 12 16:20:09 2011 +0100
pygi-convert.sh | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
+commit 33060639bc4857238f21c2329b8e8888fbd8fdc2
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date: Tue Nov 8 12:38:12 2011 +0100
+
+ Convert all strings to utf-8 encoding when retrieving from TreeModel
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=663610
+
+ gi/overrides/Gtk.py | 15 +++++++++++++++
+ tests/compathelper.py | 2 ++
+ tests/test_overrides.py | 31 ++++++++++++++++++++++++++++++-
+ 3 files changed, 47 insertions(+), 1 deletions(-)
+
+commit c9884283153c38f5b200a19b9abfaf6d9e698818
+Author: Sebastian Pölsterl <sebp@k-d-w.org>
+Date: Fri Nov 25 18:51:53 2011 +0100
+
+ Post release version bump
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
commit 654711d0f940d7480d0f1cdb25a3dc9996f7a706
Author: Sebastian Pölsterl <sebp@k-d-w.org>
Date: Tue Nov 8 12:38:12 2011 +0100
GI_DATADIR = @GI_DATADIR@
GI_LIBS = @GI_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
+3.0.4 09-Feb-2012
+ - Revert "Convert all strings to utf-8 encoding when retrieving from TreeModel" (Martin Pitt)
+ - Fixed bug where GObject.property did not respect minimum and maximum values (Sebastian Pölsterl)
+ - Remove mention of removed option --enable-docs (Tomeu Vizoso)
+
3.0.3 12-Dec-2011
- Convert all modifier constants to Gdk.ModifierType (Manuel Quiñones)
- - Convert all strings to utf-8 encoding when retrieving from TreeModel (Sebastian Pöl
+ - Convert all strings to utf-8 encoding when retrieving from TreeModel (Sebastian Pölsterl)
- add test for bytearray variants (John (J5) Palmieri)
- handle NULL arrays correctly for each array type (John (J5) Palmieri)
- Revert "Revert "Fix array termination and size calculation"" (John (J5) Palmieri)
Metadata-Version: 1.0
Name: PyGObject
-Version: 3.0.3
+Version: 3.0.4
Summary: Python bindings for GObject
Home-page: http://www.pygtk.org/
Author: James Henstridge
Maintainer: Johan Dahlin
Maintainer-email: johan@gnome.org
License: GNU LGPL
-Download-url: ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/3.0/pygobject-3.0.3.tar.gz
+Download-url: ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/3.0/pygobject-3.0.4.tar.gz
Description: Python bindings for GLib and GObject
Platform: POSIX, Windows
Classifier: Development Status :: 5 - Production/Stable
GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
+ GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0`
GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
GLIB_GENMARSHAL=""
GOBJECT_QUERY=""
GLIB_MKENUMS=""
+ GLIB_COMPILE_RESOURCES=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_GENMARSHAL)
AC_SUBST(GOBJECT_QUERY)
AC_SUBST(GLIB_MKENUMS)
+ AC_SUBST(GLIB_COMPILE_RESOURCES)
rm -f conf.glibtest
])
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for pygobject 3.0.3.
+# Generated by GNU Autoconf 2.68 for pygobject 3.0.4.
#
# 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.0.3'
-PACKAGE_STRING='pygobject 3.0.3'
+PACKAGE_VERSION='3.0.4'
+PACKAGE_STRING='pygobject 3.0.4'
PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject'
PACKAGE_URL=''
FFI_CFLAGS
DATADIR
PYTHON_BASENAME
+GLIB_COMPILE_RESOURCES
GLIB_MKENUMS
GOBJECT_QUERY
GLIB_GENMARSHAL
# 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.0.3 to adapt to many kinds of systems.
+\`configure' configures pygobject 3.0.4 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.0.3:";;
+ short | recursive ) echo "Configuration of pygobject 3.0.4:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-pygobject configure 3.0.3
+pygobject configure 3.0.4
generated by GNU Autoconf 2.68
Copyright (C) 2010 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.0.3, which was
+It was created by pygobject $as_me 3.0.4, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
PYGOBJECT_MINOR_VERSION=0
-$as_echo "#define PYGOBJECT_MICRO_VERSION 3" >>confdefs.h
+$as_echo "#define PYGOBJECT_MICRO_VERSION 4" >>confdefs.h
-PYGOBJECT_MICRO_VERSION=3
+PYGOBJECT_MICRO_VERSION=4
ac_config_headers="$ac_config_headers config.h"
# Define the identity of the package.
PACKAGE='pygobject'
- VERSION='3.0.3'
+ VERSION='3.0.4'
cat >>confdefs.h <<_ACEOF
Report bugs to <bug-libtool@gnu.org>."
lt_cl_version="\
-pygobject config.lt 3.0.3
+pygobject config.lt 3.0.4
configured by $0, generated by GNU Autoconf 2.68.
Copyright (C) 2010 Free Software Foundation, Inc.
GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
+ GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0`
GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
GLIB_GENMARSHAL=""
GOBJECT_QUERY=""
GLIB_MKENUMS=""
+ GLIB_COMPILE_RESOURCES=""
as_fn_error $? "maybe you want the pygobject-2-4 branch?" "$LINENO" 5
fi
+
rm -f conf.glibtest
if test -n "$export_dynamic"; 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.0.3, which was
+This file was extended by pygobject $as_me 3.0.4, which was
generated by GNU Autoconf 2.68. 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.0.3
+pygobject config.status 3.0.4
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
dnl the pygobject version number
m4_define(pygobject_major_version, 3)
m4_define(pygobject_minor_version, 0)
-m4_define(pygobject_micro_version, 3)
+m4_define(pygobject_micro_version, 4)
m4_define(pygobject_version, pygobject_major_version.pygobject_minor_version.pygobject_micro_version)
dnl versions of packages we require ...
GI_DATADIR = @GI_DATADIR@
GI_LIBS = @GI_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GI_DATADIR = @GI_DATADIR@
GI_LIBS = @GI_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GI_DATADIR = @GI_DATADIR@
GI_LIBS = @GI_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GI_DATADIR = @GI_DATADIR@
GI_LIBS = @GI_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
ptype = self.type
if ptype in [TYPE_INT, TYPE_UINT, TYPE_LONG, TYPE_ULONG,
TYPE_INT64, TYPE_UINT64, TYPE_FLOAT, TYPE_DOUBLE]:
- args = self._get_minimum(), self._get_maximum(), self.default
+ args = self.minimum, self.maximum, self.default
elif (ptype == TYPE_STRING or ptype == TYPE_BOOLEAN or
ptype.is_a(TYPE_ENUM)):
args = (self.default,)
self.set_value(treeiter, i, value)
- def _decode_value(self, treeiter, column, value):
- type_ = self.get_column_type(column)
- if type_ == GObject.TYPE_STRING and sys.version_info < (3, 0):
- value = value.decode('UTF-8')
-
- return value
-
def _convert_value(self, treeiter, column, value):
if value is None:
return
value = self._convert_value(treeiter, column, value)
Gtk.ListStore.set_value(self, treeiter, column, value)
- def get_value(self, treeiter, column):
- value = Gtk.ListStore.get_value(self, treeiter, column)
- return self._decode_value(treeiter, column, value)
-
def set(self, treeiter, *args):
def _set_lists(columns, values):
value = self._convert_value(treeiter, column, value)
Gtk.TreeStore.set_value(self, treeiter, column, value)
- def get_value(self, treeiter, column):
- value = Gtk.TreeStore.get_value(self, treeiter, column)
- return self._decode_value(treeiter, column, value)
-
def set(self, treeiter, *args):
def _set_lists(columns, values):
GI_DATADIR = @GI_DATADIR@
GI_LIBS = @GI_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GI_DATADIR = @GI_DATADIR@
GI_LIBS = @GI_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
GI_DATADIR = @GI_DATADIR@
GI_LIBS = @GI_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
GLIB_LIBS = @GLIB_LIBS@
GLIB_MKENUMS = @GLIB_MKENUMS@
'''
_unicode = lambda s: str(s)
- _unichr = chr
else:
_long = long
_basestring = basestring
_bytes = str
_unicode = lambda s: unicode(s, 'UTF-8')
- _unichr = unichr
-# -*- coding: utf-8 -*-
# -*- Mode: Python; py-indent-offset: 4 -*-
# vim: tabstop=4 shiftwidth=4 expandtab
import os
sys.path.insert(0, "../")
-from compathelper import _long, _unicode, _bytes, _unichr
+from compathelper import _long, _unicode, _bytes
from gi.repository import GLib
from gi.repository import GObject
model[0] = (3, "three", -0.3)
- def test_tree_model_unicode(self):
- model = Gtk.ListStore(str)
-
- text = (_unicode("just\na\tstring"),
- _unicode("Tr") + _unichr(0xf6) + _unicode("del"),
- _unicode("N") + _unichr(0xe1) + _unicode("m") + _unichr(0xe8),
- _unichr(0xff) + _unichr(0xdf) + _unicode("er"),
- _unichr(0x152) + _unichr(0x180) + _unichr(0x1d25))
-
- for item in text:
- model.append([item])
-
- def byte_compare(have, expected):
- if sys.version_info < (3, 0):
- self.assertTrue(isinstance(have, unicode))
- else:
- self.assertTrue(isinstance(have, str))
-
- self.assertEqual(len(have), len(expected))
- for i in range(len(expected)):
- a = have[i]
- b = expected[i]
- self.assertEqual(a, b)
- self.assertEqual(ord(a), ord(b))
-
- for i in range(len(model)):
- byte_compare(model[i][0], text[i])
-
def test_tree_row_slice(self):
model = Gtk.ListStore(int, str, float)
model.append([1, "one", -0.1])
GObject.property, type=gtype, minimum=min,
maximum=max+1)
+ def testMinMax(self):
+ class C(GObject.GObject):
+ prop_int = GObject.property(type=int, minimum=1, maximum=100, default=1)
+ prop_float = GObject.property(type=float, minimum=0.1, maximum=10.5, default=1.1)
+
+ def __init__(self):
+ GObject.GObject.__init__(self)
+
+ o = C()
+ self.assertEqual(o.prop_int, 1)
+
+ o.prop_int = 5
+ self.assertEqual(o.prop_int, 5)
+
+ o.prop_int = 0
+ self.assertEqual(o.prop_int, 5)
+
+ o.prop_int = 101
+ self.assertEqual(o.prop_int, 5)
+
+ self.assertEqual(o.prop_float, 1.1)
+
+ o.prop_float = 7.75
+ self.assertEqual(o.prop_float, 7.75)
+
+ o.prop_float = 0.09
+ self.assertEqual(o.prop_float, 7.75)
+
+ o.prop_float = 10.51
+ self.assertEqual(o.prop_float, 7.75)
+
def testMultipleInstances(self):
class C(GObject.GObject):
prop = GObject.property(type=str, default='default')