summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog279
-rw-r--r--NEWS8
-rw-r--r--PKG-INFO4
-rwxr-xr-xconfigure26
-rw-r--r--configure.ac2
-rw-r--r--gi/_gobject/propertyhelper.py5
-rw-r--r--gi/overrides/Gdk.py95
-rw-r--r--gi/pygi-argument.c10
-rw-r--r--gi/pygi-invoke.c10
-rw-r--r--gi/pygi-marshal-from-py.c121
-rw-r--r--tests/test_everything.py19
-rw-r--r--tests/test_properties.py20
12 files changed, 395 insertions, 204 deletions
diff --git a/ChangeLog b/ChangeLog
index 9bd04d3..d3867df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,114 @@
+commit 5c24760b797e985721f7fe51d52252e4dd54a417
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date: Fri Oct 21 17:31:41 2011 +0200
+
+ Fix "Returns: (skip)" method calls without (out) arguments
+
+ When we have a method call with a skipped return value, but no
+ other out
+ arguments, we previously returned NULL to Python, which causes
+ "SystemError:
+ error return without exception set". Return None instead.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=662383
+
+ gi/pygi-invoke.c | 10 ++++++++++
+ tests/test_everything.py | 8 ++++++++
+ 2 files changed, 18 insertions(+), 0 deletions(-)
+
+commit 585222915dc98b0e375de3db4771466278a32e81
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Tue Oct 18 00:39:16 2011 -0400
+
+ Do union member checks for unions that are parameters
+
+ * before we were only doing checks if the union was an instance
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=661673
+
+ gi/pygi-marshal-from-py.c | 121
+ +++++++++++++++++++++++++--------------------
+ 1 files changed, 68 insertions(+), 53 deletions(-)
+
+commit 8deaec6b9abd87f02060c9feec773d4693e89028
+Author: Martin Pitt <martin.pitt@ubuntu.com>
+Date: Wed Oct 19 14:35:11 2011 +0200
+
+ Gdk overrides: Unbreak for Gdk-2.0
+
+ Fix regression from commit 31db3ed: Gdk 2.0 did not yet have
+ atom_intern(), so
+ only do this for Gdk >= 3.0.
+
+ https://launchpad.net/bugs/875399
+
+ gi/overrides/Gdk.py | 95
+ ++++++++++++++++++++++++++-------------------------
+ 1 files changed, 48 insertions(+), 47 deletions(-)
+
+commit f395fb131caf7ca550acd17138d8061926ef4f92
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Fri Oct 14 17:19:45 2011 -0400
+
+ unit test for checking ref count of object param in signals
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=661359
+
+ tests/test_everything.py | 11 +++++++++++
+ 1 files changed, 11 insertions(+), 0 deletions(-)
+
+commit 611f58b99851328653af4930f188c33eccaa9f6f
+Author: John (J5) Palmieri <johnp@redhat.com>
+Date: Fri Oct 14 16:42:32 2011 -0400
+
+ when converting an object with transfer none, make sure the wrapper
+ owns a ref
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=661359
+
+ gi/pygi-argument.c | 10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+commit 0f1eb9fa0e7aa5e7c22dabc709c0dfb469e404f1
+Author: Timo Vanwynsberghe <timovwb@gmail.com>
+Date: Tue Oct 4 11:13:43 2011 +0200
+
+ Allow GBoxed types as property
+
+ Add the GBoxed type as valid type to the gobject property helper
+ https://bugzilla.gnome.org/show_bug.cgi?id=660798
+
+ gi/_gobject/propertyhelper.py | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+commit bef8d385117dd0295c9ba7567710d76fc2bb729a
+Author: Ignacio Casal Quinteiro <icq@gnome.org>
+Date: Mon Oct 10 11:24:42 2011 +0200
+
+ Add tests for boxed properties.
+
+ tests/test_properties.py | 20 ++++++++++++++++++--
+ 1 files changed, 18 insertions(+), 2 deletions(-)
+
+commit 77123ffeb1585837033848f4d5a90cfa63fdaee0
+Author: Ignacio Casal Quinteiro <icq@gnome.org>
+Date: Fri Sep 30 20:21:07 2011 +0200
+
+ Post release bump version
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit f5ccfec0a1bc4c999bfa49d75383ea06d3a068c4
+Author: Ignacio Casal Quinteiro <icq@gnome.org>
+Date: Fri Sep 30 20:19:46 2011 +0200
+
+ Release 3.0.1
+
+ NEWS | 5 +++++
+ configure.ac | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
commit 56ac9339eb1d6950623dc4d8c3b9972874e7fa86
Author: John (J5) Palmieri <johnp@redhat.com>
Date: Thu Sep 22 19:03:20 2011 -0400
@@ -433,9 +544,9 @@ Date: Fri Sep 2 18:39:51 2011 -0400
https://bugzilla.gnome.org/show_bug.cgi?id=658362
gi/Makefile.am | 8 +-
- gi/pygi-cache.c | 673 +++++++++++-----------
+ gi/pygi-cache.c | 669 +++++++++++----------
gi/pygi-cache.h | 62 ++-
- gi/pygi-invoke.c | 144 +++---
+ gi/pygi-invoke.c | 142 +++---
gi/pygi-marshal-cleanup.c | 168 +++---
gi/pygi-marshal-cleanup.h | 128 ++--
gi/pygi-marshal-from-py.c | 1412
@@ -448,7 +559,7 @@ Date: Fri Sep 2 18:39:51 2011 -0400
gi/pygi-marshal-out.h | 144 -----
gi/pygi-marshal-to-py.c | 768 ++++++++++++++++++++++++
gi/pygi-marshal-to-py.h | 144 +++++
- 14 files changed, 3122 insertions(+), 3081 deletions(-)
+ 14 files changed, 3119 insertions(+), 3078 deletions(-)
commit 45b0fcff9e948c65a3903c32a3957802034c5e47
Author: Dieter Verfaillie <dieterv@optionexplicit.be>
@@ -708,10 +819,10 @@ Date: Thu Aug 25 13:57:53 2011 -0400
gi/pygi-cache.c | 1 +
gi/pygi-cache.h | 1 +
- gi/pygi-invoke.c | 48
- ++++++++++++++++++++++++++++-----------------
- tests/test_everything.py | 8 +++++++
- 4 files changed, 40 insertions(+), 18 deletions(-)
+ gi/pygi-invoke.c | 46
+ +++++++++++++++++++++++++++++-----------------
+ tests/test_everything.py | 8 ++++++++
+ 4 files changed, 39 insertions(+), 17 deletions(-)
commit 7a234b185b131f3eb6a6e8a8c717ddf4d508b15e
Author: Xavier Claessens <xclaesse@gmail.com>
@@ -1736,11 +1847,11 @@ Date: Mon Jul 18 18:41:41 2011 -0400
https://bugzilla.gnome.org/show_bug.cgi?id=642048
Makefile.am | 8 +-------
- configure.ac | 43 +++++++++++++++++--------------------------
+ configure.ac | 39 +++++++++++++++------------------------
gi/pygi.h | 37 -------------------------------------
gobject/Makefile.am | 5 +----
tests/Makefile.am | 7 +------
- 5 files changed, 20 insertions(+), 80 deletions(-)
+ 5 files changed, 18 insertions(+), 78 deletions(-)
commit d862168d6a82edd59547d39f5b0ab8279b1e511c
Author: John (J5) Palmieri <johnp@redhat.com>
@@ -1993,9 +2104,9 @@ Date: Fri Jul 8 14:35:20 2011 -0400
[caching] refactor function names to be less confusing
- gi/pygi-cache.c | 307
+ gi/pygi-cache.c | 305
+++++++++++++++++++++++++++----------------------------
- 1 files changed, 150 insertions(+), 157 deletions(-)
+ 1 files changed, 149 insertions(+), 156 deletions(-)
commit c167a9345b01c070bd5a84b4a4b3a53baf9e217d
Author: John (J5) Palmieri <johnp@redhat.com>
@@ -2695,9 +2806,9 @@ Date: Mon May 23 16:59:57 2011 -0400
gi/pygi-invoke-state-struct.h | 2 +
gi/pygi-marshal-cleanup.c | 301
++++++++++++++++-------------------------
- gi/pygi-marshal-cleanup.h | 45 ++++---
+ gi/pygi-marshal-cleanup.h | 43 ++++--
gi/pygi-marshal.c | 15 +-
- 7 files changed, 174 insertions(+), 225 deletions(-)
+ 7 files changed, 173 insertions(+), 224 deletions(-)
commit 198714dc4585f7463f38929f1ca4e4b60a27dadb
Author: John (J5) Palmieri <johnp@redhat.com>
@@ -3174,15 +3285,15 @@ Date: Mon Mar 28 18:26:09 2011 -0400
[gi-invoke-ng] refactor FunctionCache to be more generic CallableCache
- gi/pygi-cache.c | 392
+ gi/pygi-cache.c | 388
++++++++++++++++++++++++++-------------------------
gi/pygi-cache.h | 12 +-
gi/pygi-info.c | 2 +-
gi/pygi-invoke-ng.c | 40 +++---
gi/pygi-marshal.c | 140 +++++++++---------
- gi/pygi-marshal.h | 159 ++++++++-------------
+ gi/pygi-marshal.h | 159 +++++++++-------------
gi/pygi.h | 2 +-
- 7 files changed, 362 insertions(+), 385 deletions(-)
+ 7 files changed, 360 insertions(+), 383 deletions(-)
commit 3d5d9ff5c18a850650992bdd52e8e4c722b23396
Author: John (J5) Palmieri <johnp@redhat.com>
@@ -4353,9 +4464,9 @@ Date: Mon Feb 14 18:17:20 2011 -0500
[gi-demo] Fix color dialog demo to run with new draw, style and
color apis
- demos/gtk-demo/demos/colorselector.py | 44
+ demos/gtk-demo/demos/colorselector.py | 42
++++++++++++--------------------
- 1 files changed, 17 insertions(+), 27 deletions(-)
+ 1 files changed, 16 insertions(+), 26 deletions(-)
commit f94a96c53e9432ac085bd05acee7ebdd2803fbad
Author: John (J5) Palmieri <johnp@redhat.com>
@@ -4397,9 +4508,9 @@ Date: Mon Feb 14 16:47:03 2011 -0500
[gi-demos] fix drawingarea app to use the new draw api
- demos/gtk-demo/demos/drawingarea.py | 144
+ demos/gtk-demo/demos/drawingarea.py | 138
++++++++++++-----------------------
- 1 files changed, 50 insertions(+), 94 deletions(-)
+ 1 files changed, 47 insertions(+), 91 deletions(-)
commit 8385afbbc5df295d9b7cd3b5d19c90faa1f7ea8e
Author: John (J5) Palmieri <johnp@redhat.com>
@@ -4819,10 +4930,10 @@ Date: Sun Jan 30 11:30:54 2011 -0500
values based on if they are in, out or inout
* in invoke we order the pointers based on their direction
- gi/pygi-cache.c | 1445
+ gi/pygi-cache.c | 1441
++++++++++++++++++++++++++----------------------------
gi/pygi-invoke.c | 19 +-
- 2 files changed, 711 insertions(+), 753 deletions(-)
+ 2 files changed, 709 insertions(+), 751 deletions(-)
commit 2b185362de45f46ce0f0b8816499aef06ab1ad1e
Author: John (J5) Palmieri <johnp@redhat.com>
@@ -4840,9 +4951,9 @@ Date: Sat Jan 29 13:48:23 2011 -0500
[gi] fix sequence caching to support out
- gi/pygi-cache.c | 111
+ gi/pygi-cache.c | 109
+++++++++++++++++++++++++++++++++++++++++++------------
- 1 files changed, 87 insertions(+), 24 deletions(-)
+ 1 files changed, 86 insertions(+), 23 deletions(-)
commit 69207910209ebfe450df616aeb8fa4cc2e7eccf3
Author: Martin Pitt <martin.pitt@ubuntu.com>
@@ -4992,11 +5103,11 @@ Date: Fri Jan 21 17:24:49 2011 +0100
https://bugzilla.gnome.org/show_bug.cgi?id=640197
- gobject/gobjectmodule.c | 35 ++-------------------
+ gobject/gobjectmodule.c | 35 ++--------------------
gobject/pygobject-private.h | 5 +++
- gobject/pygobject.c | 71
+ gobject/pygobject.c | 69
+++++++++++++++++++++++++-----------------
- 3 files changed, 50 insertions(+), 61 deletions(-)
+ 3 files changed, 49 insertions(+), 60 deletions(-)
commit a3e0cfe8924887ecd1e07cedd2cfb999c853ac62
Author: John (J5) Palmieri <johnp@redhat.com>
@@ -5197,10 +5308,10 @@ Date: Thu Jan 20 16:26:18 2011 +0100
https://bugzilla.gnome.org/show_bug.cgi?id=640073
- gi/types.py | 104
- +++++++++++++++++++++++++++++++++---------------------
+ gi/types.py | 100
+ +++++++++++++++++++++++++++++++++--------------------
tests/test_gi.py | 13 +++++++
- 2 files changed, 77 insertions(+), 40 deletions(-)
+ 2 files changed, 75 insertions(+), 38 deletions(-)
commit 8f4e6536f3c2edf38a45632d1c23eb7c6681c3be
Author: Sebastian Pölsterl <sebp@k-d-w.org>
@@ -5393,10 +5504,10 @@ Date: Wed Jan 19 11:41:11 2011 +0100
https://bugzilla.gnome.org/show_bug.cgi?id=639939
- gi/overrides/GLib.py | 229
+ gi/overrides/GLib.py | 199
+++++++++++++++++++++++++----------------------
- tests/test_overrides.py | 159 +++++++++++++++++++++++++++++++--
- 2 files changed, 273 insertions(+), 115 deletions(-)
+ tests/test_overrides.py | 159 +++++++++++++++++++++++++++++++++++--
+ 2 files changed, 258 insertions(+), 100 deletions(-)
commit ac095f5435f106e175fa3297cb273e63c85d2809
Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
@@ -5784,10 +5895,10 @@ Date: Wed Jan 19 09:13:44 2011 -0500
[gi] fix marshalling structs
- gi/pygi-argument.c | 47 +++++++++++++++++++++++++++++++++++------------
+ gi/pygi-argument.c | 45 ++++++++++++++++++++++++++++++++++-----------
gi/pygi-foreign.c | 18 ++++++++++++------
gi/pygi-foreign.h | 8 ++++----
- 3 files changed, 51 insertions(+), 22 deletions(-)
+ 3 files changed, 50 insertions(+), 21 deletions(-)
commit b2189424f9dd6d3a4a5b9792f0d5843fc27657d1
Author: Sebastian Pölsterl <sebp@k-d-w.org>
@@ -6319,12 +6430,12 @@ Date: Mon Jan 17 12:31:03 2011 -0500
support callbacks
- gi/pygi-argument.c | 68 ++++++++++++++++++++++++++++++++++++++++++--
- gi/pygi-cache.c | 80
- +++++++++++++++++++++++++++++++++++++++------------
+ gi/pygi-argument.c | 68 +++++++++++++++++++++++++++++++++++++++++++--
+ gi/pygi-cache.c | 78
+ ++++++++++++++++++++++++++++++++++++++++------------
gi/pygi-cache.h | 13 +++++++-
gi/pygi-invoke.c | 2 +-
- 4 files changed, 138 insertions(+), 25 deletions(-)
+ 4 files changed, 137 insertions(+), 24 deletions(-)
commit 914d3a0a29680f4d3aa0e1f8afdd625b017b013a
Author: Sebastian Pölsterl <sebp@k-d-w.org>
@@ -9162,8 +9273,8 @@ Date: Thu Sep 9 17:35:10 2010 -0400
https://bugzilla.gnome.org/show_bug.cgi?id=615872
- gobject/pygtype.c | 31 +++++++++++++++++--------------
- 1 files changed, 17 insertions(+), 14 deletions(-)
+ gobject/pygtype.c | 29 ++++++++++++++++-------------
+ 1 files changed, 16 insertions(+), 13 deletions(-)
commit 3d431c7dd0de97db10cb0c00c39d9c1837bed2f2
Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
@@ -10280,15 +10391,15 @@ Date: Thu Jul 15 13:31:33 2010 +0200
gi/Makefile.am | 2 +
gi/pygi-argument.c | 2 +-
- gi/pygi-foreign-cairo.c | 16 +++---
- gi/pygi-foreign.c | 107
+ gi/pygi-foreign-cairo.c | 16 ++++----
+ gi/pygi-foreign.c | 105
++++++++++++++++++++++++++++-----------------
gi/pygi-foreign.h | 7 +--
gi/pygi-invoke.c | 18 ++++----
gi/pygi-struct.c | 10 ++++-
gi/pygi.h | 9 ++--
- tests/test_everything.py | 8 +++
- 9 files changed, 110 insertions(+), 69 deletions(-)
+ tests/test_everything.py | 8 ++++
+ 9 files changed, 109 insertions(+), 68 deletions(-)
commit 3b3bd4da3fbc993fa7f7cfb46ed4e67671c94cc0
Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
@@ -10559,16 +10670,16 @@ Date: Tue Jun 29 10:27:39 2010 +0200
https://bugzilla.gnome.org/show_bug.cgi?id=623021
configure.ac | 2 +
- gi/Makefile.am | 38 +++++++++-----
+ gi/Makefile.am | 38 ++++++++++-----
gi/gimodule.c | 8 +---
gi/pygi-argument.c | 10 +---
gi/pygi-foreign-cairo.c | 56 ++++++++++++++++-----
gi/pygi-foreign-cairo.h | 55 ---------------------
- gi/pygi-foreign.c | 125
+ gi/pygi-foreign.c | 123
++++++++++++++++++++++++++++-------------------
- gi/pygi-foreign.h | 31 +++++------
- gi/pygi.h | 40 +++++++++++++--
- 9 files changed, 196 insertions(+), 169 deletions(-)
+ gi/pygi-foreign.h | 31 +++++-------
+ gi/pygi.h | 40 ++++++++++++++--
+ 9 files changed, 195 insertions(+), 168 deletions(-)
commit a6a90551311bc64f037cbd442e13f70c30060871
Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
@@ -11653,12 +11764,12 @@ Date: Wed May 26 12:19:17 2010 +0200
This won't affect git blame nor git diff if the switch -w is used.
gi/gimodule.c | 138 ++++----
- gi/pygi-argument.c | 960
+ gi/pygi-argument.c | 958
+++++++++++++++++++++++-----------------------
gi/pygi-boxed.c | 108 +++---
- gi/pygi-callbacks.c | 154 ++++----
+ gi/pygi-callbacks.c | 152 ++++----
gi/pygi-callbacks.h | 8 +-
- gi/pygi-closure.c | 270 +++++++-------
+ gi/pygi-closure.c | 266 +++++++-------
gi/pygi-closure.h | 18 +-
gi/pygi-foreign-cairo.c | 36 +-
gi/pygi-foreign-cairo.h | 36 +-
@@ -11671,7 +11782,7 @@ Date: Wed May 26 12:19:17 2010 +0200
gi/pygi-type.c | 32 +-
gi/pygi.h | 20 +-
gi/pygobject-external.h | 14 +-
- 18 files changed, 1544 insertions(+), 1542 deletions(-)
+ 18 files changed, 1540 insertions(+), 1538 deletions(-)
commit 6156f15cb15b4c20e975527227135d49207c520a
Author: Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
@@ -12146,9 +12257,9 @@ Date: Mon Apr 26 11:41:06 2010 +0200
gi/pygi-callbacks.c | 22 +-
gi/pygi-callbacks.h | 4 +-
- gi/pygi-info.c | 582
+ gi/pygi-info.c | 576
+++++++++++++++++++++++++++++----------------------
- 3 files changed, 346 insertions(+), 262 deletions(-)
+ 3 files changed, 343 insertions(+), 259 deletions(-)
commit 7fc5528273edae5ecdd5d8bdf0e5b898eec7a624
Author: Zach Goldberg <zach@zachgoldberg.com>
@@ -12431,7 +12542,7 @@ Date: Sun Apr 18 13:48:45 2010 -0400
Add one more missing file to tarballs
- gi/overrides/Makefile.am | 1 +
+ gi/overrides/Makefile.am | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
commit 979e01852fc7f830ee91093accdc387fa535075f
@@ -12460,9 +12571,9 @@ Date: Sun Apr 18 13:11:11 2010 -0400
gi/pygi-info.c | 86
++++++++++++++++++++++++++++++++++++++++++++++++-
gi/pygi-info.h | 1 +
- gi/types.py | 44 +++++++++++++++++--------
+ gi/types.py | 42 ++++++++++++++++-------
tests/test_gi.py | 18 ++++++++++
- 9 files changed, 227 insertions(+), 21 deletions(-)
+ 9 files changed, 226 insertions(+), 20 deletions(-)
commit e239faacb4798fe2d166233ca1a19a843a6225e3
Author: Zach Goldberg <zach@zachgoldberg.com>
@@ -13868,8 +13979,8 @@ Date: Sat Nov 28 00:22:21 2009 +0100
gi/pygi-argument.c | 516
++++++++++++++++++++++++++++++++++++++++++----------
- gi/pygi-info.c | 333 +++++++++++++++++----------------
- 2 files changed, 596 insertions(+), 253 deletions(-)
+ gi/pygi-info.c | 327 +++++++++++++++++----------------
+ 2 files changed, 593 insertions(+), 250 deletions(-)
commit d1ae73f3cf7cebdb74c9ec56b08928a2a53b9de6
Author: Johan Dahlin <johan@gnome.org>
@@ -14064,23 +14175,23 @@ Date: Mon Nov 23 22:39:12 2009 +0100
Remove the girepository module
- Makefile.am | 2 +-
- configure.ac | 17 -
- girepository/Makefile.am | 54 --
- girepository/__init__.py | 24 -
- girepository/bank-argument.c | 379 ------------
- girepository/bank-info.c | 1194
- ------------------------------------
- girepository/bank-repository.c | 236 -------
- girepository/bank.c | 155 -----
- girepository/bank.h | 80 ---
- girepository/btypes.py | 300 ---------
- girepository/importer.py | 51 --
- girepository/module.py | 224 -------
- girepository/overrides/Gdk.py | 14 -
- girepository/overrides/Gtk.py | 8 -
- girepository/repository.py | 51 --
- tests/test_girepository.py | 386 ------------
+ Makefile.am | 2 +-
+ configure.ac | 17 -
+ girepository/Makefile.am | 54 --
+ girepository/__init__.py | 24 -
+ girepository/bank-argument.c | 379 -------------
+ girepository/bank-info.c | 1194
+ ----------------------------------------
+ girepository/bank-repository.c | 236 --------
+ girepository/bank.c | 155 ------
+ girepository/bank.h | 80 ---
+ girepository/btypes.py | 300 ----------
+ girepository/importer.py | 51 --
+ girepository/module.py | 224 --------
+ girepository/overrides/Gdk.py | 14 -
+ girepository/overrides/Gtk.py | 8 -
+ girepository/repository.py | 51 --
+ tests/test_girepository.py | 386 -------------
16 files changed, 1 insertions(+), 3174 deletions(-)
commit a644edf0515c26ed027522891ccf02aceac764e8
@@ -14812,10 +14923,10 @@ Date: Wed Jun 3 10:47:58 2009 +0200
Adds overrides modules from PyBank.
- girepository/Makefile.am | 3 +++
- girepository/importer.py | 3 +--
- girepository/overrides/Gdk.py | 14 ++++++++++++++
- girepository/overrides/Gtk.py | 8 ++++++++
+ girepository/Makefile.am | 3 +++
+ girepository/importer.py | 3 +--
+ girepository/overrides/Gdk.py | 14 ++++++++++++++
+ girepository/overrides/Gtk.py | 8 ++++++++
4 files changed, 26 insertions(+), 2 deletions(-)
commit c12964e6a3354d8063355225c94e6d21d621e08b
@@ -14824,9 +14935,9 @@ Date: Tue Jun 2 23:40:41 2009 +0200
Disables the tests that fail in tests/test_girepository.py.
- tests/test_girepository.py | 242
+ tests/test_girepository.py | 232
+++++++++++++++++++++++++++++++++-----------
- 1 files changed, 182 insertions(+), 60 deletions(-)
+ 1 files changed, 177 insertions(+), 55 deletions(-)
commit a4469a3f7d32a25156bae5e7aef9ec4ae5f6e140
Author: Simon van der Linden <simon.vanderlinden@student.uclouvain.be>
diff --git a/NEWS b/NEWS
index d3792f1..826def6 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,11 @@
+3.0.2 21-Oct-2011
+ - Add tests for boxed properties. (Ignacio Casal Quinteiro)
+ - Allow GBoxed types as property (Timo Vanwynsberghe)
+ - when converting an object with transfer none, make sure the wrapper owns a ref (John (J5) Palmieri)
+ - unit test for checking ref count of object param in signals (John (J5) Palmieri)
+ - Gdk overrides: Unbreak for Gdk-2.0 (Martin Pitt)
+ - Do union member checks for unions that are parameters (John (J5) Palmieri)
+
3.0.1 30-Sep-2011
- when checking instances union members are same type as parent
- add a floating flag to pygobjects
diff --git a/PKG-INFO b/PKG-INFO
index 4c1a946..5f9f03e 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: PyGObject
-Version: 3.0.1
+Version: 3.0.2
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: 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.1.tar.gz
+Download-url: ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/3.0/pygobject-3.0.2.tar.gz
Description: Python bindings for GLib and GObject
Platform: POSIX, Windows
Classifier: Development Status :: 5 - Production/Stable
diff --git a/configure b/configure
index 57590f5..5714ee7 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for pygobject 3.0.1.
+# Generated by GNU Autoconf 2.68 for pygobject 3.0.2.
#
# Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject>.
#
@@ -571,8 +571,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='pygobject'
PACKAGE_TARNAME='pygobject'
-PACKAGE_VERSION='3.0.1'
-PACKAGE_STRING='pygobject 3.0.1'
+PACKAGE_VERSION='3.0.2'
+PACKAGE_STRING='pygobject 3.0.2'
PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject'
PACKAGE_URL=''
@@ -1358,7 +1358,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.0.1 to adapt to many kinds of systems.
+\`configure' configures pygobject 3.0.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1428,7 +1428,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of pygobject 3.0.1:";;
+ short | recursive ) echo "Configuration of pygobject 3.0.2:";;
esac
cat <<\_ACEOF
@@ -1553,7 +1553,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-pygobject configure 3.0.1
+pygobject configure 3.0.2
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1831,7 +1831,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.0.1, which was
+It was created by pygobject $as_me 3.0.2, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2195,9 +2195,9 @@ $as_echo "#define PYGOBJECT_MINOR_VERSION 0" >>confdefs.h
PYGOBJECT_MINOR_VERSION=0
-$as_echo "#define PYGOBJECT_MICRO_VERSION 1" >>confdefs.h
+$as_echo "#define PYGOBJECT_MICRO_VERSION 2" >>confdefs.h
-PYGOBJECT_MICRO_VERSION=1
+PYGOBJECT_MICRO_VERSION=2
ac_config_headers="$ac_config_headers config.h"
@@ -2681,7 +2681,7 @@ fi
# Define the identity of the package.
PACKAGE='pygobject'
- VERSION='3.0.1'
+ VERSION='3.0.2'
cat >>confdefs.h <<_ACEOF
@@ -12017,7 +12017,7 @@ Usage: $0 [OPTIONS]
Report bugs to <bug-libtool@gnu.org>."
lt_cl_version="\
-pygobject config.lt 3.0.1
+pygobject config.lt 3.0.2
configured by $0, generated by GNU Autoconf 2.68.
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -16723,7 +16723,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.0.1, which was
+This file was extended by pygobject $as_me 3.0.2, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -16789,7 +16789,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.0.1
+pygobject config.status 3.0.2
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 937c13f..f90aaaa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,7 +12,7 @@ m4_define(python3_min_ver, 3.1)
dnl the pygobject version number
m4_define(pygobject_major_version, 3)
m4_define(pygobject_minor_version, 0)
-m4_define(pygobject_micro_version, 1)
+m4_define(pygobject_micro_version, 2)
m4_define(pygobject_version, pygobject_major_version.pygobject_minor_version.pygobject_micro_version)
dnl versions of packages we require ...
diff --git a/gi/_gobject/propertyhelper.py b/gi/_gobject/propertyhelper.py
index 0d8a32f..4635350 100644
--- a/gi/_gobject/propertyhelper.py
+++ b/gi/_gobject/propertyhelper.py
@@ -189,7 +189,8 @@ class property(object):
return TYPE_PYOBJECT
elif (isinstance(type_, type) and
issubclass(type_, (_gobject.GObject,
- _gobject.GEnum))):
+ _gobject.GEnum,
+ _gobject.GBoxed))):
return type_.__gtype__
elif type_ in [TYPE_NONE, TYPE_INTERFACE, TYPE_CHAR, TYPE_UCHAR,
TYPE_INT, TYPE_UINT, TYPE_BOOLEAN, TYPE_LONG,
@@ -303,7 +304,7 @@ class property(object):
args = (self.default,)
elif ptype == TYPE_PYOBJECT:
args = ()
- elif ptype.is_a(TYPE_OBJECT):
+ elif ptype.is_a(TYPE_OBJECT) or ptype.is_a(TYPE_BOXED):
args = ()
else:
raise NotImplementedError(ptype)
diff --git a/gi/overrides/Gdk.py b/gi/overrides/Gdk.py
index d94201e..c48a242 100644
--- a/gi/overrides/Gdk.py
+++ b/gi/overrides/Gdk.py
@@ -293,53 +293,54 @@ def color_parse(color):
return color
# constants
-SELECTION_PRIMARY = Gdk.atom_intern('PRIMARY', True)
-__all__.append('SELECTION_PRIMARY')
-
-SELECTION_SECONDARY = Gdk.atom_intern('SECONDARY', True)
-__all__.append('SELECTION_SECONDARY')
-
-SELECTION_CLIPBOARD = Gdk.atom_intern('CLIPBOARD', True)
-__all__.append('SELECTION_CLIPBOARD')
-
-TARGET_BITMAP = Gdk.atom_intern('BITMAP', True)
-__all__.append('TARGET_BITMAP')
-
-TARGET_COLORMAP = Gdk.atom_intern('COLORMAP', True)
-__all__.append('TARGET_COLORMAP')
-
-TARGET_DRAWABLE = Gdk.atom_intern('DRAWABLE', True)
-__all__.append('TARGET_DRAWABLE')
-
-TARGET_PIXMAP = Gdk.atom_intern('PIXMAP', True)
-__all__.append('TARGET_PIXMAP')
-
-TARGET_STRING = Gdk.atom_intern('STRING', True)
-__all__.append('TARGET_STRING')
-
-SELECTION_TYPE_ATOM = Gdk.atom_intern('ATOM', True)
-__all__.append('SELECTION_TYPE_ATOM')
-
-SELECTION_TYPE_BITMAP = Gdk.atom_intern('BITMAP', True)
-__all__.append('SELECTION_TYPE_BITMAP')
-
-SELECTION_TYPE_COLORMAP = Gdk.atom_intern('COLORMAP', True)
-__all__.append('SELECTION_TYPE_COLORMAP')
-
-SELECTION_TYPE_DRAWABLE = Gdk.atom_intern('DRAWABLE', True)
-__all__.append('SELECTION_TYPE_DRAWABLE')
-
-SELECTION_TYPE_INTEGER = Gdk.atom_intern('INTEGER', True)
-__all__.append('SELECTION_TYPE_INTEGER')
-
-SELECTION_TYPE_PIXMAP = Gdk.atom_intern('PIXMAP', True)
-__all__.append('SELECTION_TYPE_PIXMAP')
-
-SELECTION_TYPE_WINDOW = Gdk.atom_intern('WINDOW', True)
-__all__.append('SELECTION_TYPE_WINDOW')
-
-SELECTION_TYPE_STRING = Gdk.atom_intern('STRING', True)
-__all__.append('SELECTION_TYPE_STRING')
+if Gdk._version >= '3.0':
+ SELECTION_PRIMARY = Gdk.atom_intern('PRIMARY', True)
+ __all__.append('SELECTION_PRIMARY')
+
+ SELECTION_SECONDARY = Gdk.atom_intern('SECONDARY', True)
+ __all__.append('SELECTION_SECONDARY')
+
+ SELECTION_CLIPBOARD = Gdk.atom_intern('CLIPBOARD', True)
+ __all__.append('SELECTION_CLIPBOARD')
+
+ TARGET_BITMAP = Gdk.atom_intern('BITMAP', True)
+ __all__.append('TARGET_BITMAP')
+
+ TARGET_COLORMAP = Gdk.atom_intern('COLORMAP', True)
+ __all__.append('TARGET_COLORMAP')
+
+ TARGET_DRAWABLE = Gdk.atom_intern('DRAWABLE', True)
+ __all__.append('TARGET_DRAWABLE')
+
+ TARGET_PIXMAP = Gdk.atom_intern('PIXMAP', True)
+ __all__.append('TARGET_PIXMAP')
+
+ TARGET_STRING = Gdk.atom_intern('STRING', True)
+ __all__.append('TARGET_STRING')
+
+ SELECTION_TYPE_ATOM = Gdk.atom_intern('ATOM', True)
+ __all__.append('SELECTION_TYPE_ATOM')
+
+ SELECTION_TYPE_BITMAP = Gdk.atom_intern('BITMAP', True)
+ __all__.append('SELECTION_TYPE_BITMAP')
+
+ SELECTION_TYPE_COLORMAP = Gdk.atom_intern('COLORMAP', True)
+ __all__.append('SELECTION_TYPE_COLORMAP')
+
+ SELECTION_TYPE_DRAWABLE = Gdk.atom_intern('DRAWABLE', True)
+ __all__.append('SELECTION_TYPE_DRAWABLE')
+
+ SELECTION_TYPE_INTEGER = Gdk.atom_intern('INTEGER', True)
+ __all__.append('SELECTION_TYPE_INTEGER')
+
+ SELECTION_TYPE_PIXMAP = Gdk.atom_intern('PIXMAP', True)
+ __all__.append('SELECTION_TYPE_PIXMAP')
+
+ SELECTION_TYPE_WINDOW = Gdk.atom_intern('WINDOW', True)
+ __all__.append('SELECTION_TYPE_WINDOW')
+
+ SELECTION_TYPE_STRING = Gdk.atom_intern('STRING', True)
+ __all__.append('SELECTION_TYPE_STRING')
import sys
diff --git a/gi/pygi-argument.c b/gi/pygi-argument.c
index 4564f3d..3b36c2f 100644
--- a/gi/pygi-argument.c
+++ b/gi/pygi-argument.c
@@ -1662,6 +1662,16 @@ _pygi_argument_to_object (GIArgument *arg,
Py_INCREF (object);
break;
}
+
+ /* since we will unref the object when the
+ * wrapper is destroyed and we don't want
+ * GTK removing the object while the
+ * wrapper is live, we take a gobject reference
+ * when one is not transfered to us
+ */
+ if (transfer == GI_TRANSFER_NOTHING)
+ g_object_ref (G_OBJECT(arg->v_pointer));
+
object = pygobject_new (arg->v_pointer);
break;
default:
diff --git a/gi/pygi-invoke.c b/gi/pygi-invoke.c
index 0064fe5..42cdd01 100644
--- a/gi/pygi-invoke.c
+++ b/gi/pygi-invoke.c
@@ -550,6 +550,16 @@ _invoke_marshal_out_args (PyGIInvokeState *state, PyGICallableCache *cache)
total_out_args -= cache->n_to_py_child_args;
if (cache->n_to_py_args - cache->n_to_py_child_args == 0) {
+ if (cache->return_cache->is_skipped && state->error == NULL) {
+ /* we skip the return value and have no (out) arguments to return,
+ * so py_return should be NULL. But we must not return NULL,
+ * otherwise Python will expect an exception.
+ */
+ g_assert (py_return == NULL);
+ Py_INCREF(Py_None);
+ py_return = Py_None;
+ }
+
py_out = py_return;
} else if (total_out_args == 1) {
/* if we get here there is one out arg an no return */
diff --git a/gi/pygi-marshal-from-py.c b/gi/pygi-marshal-from-py.c
index b78cfe3..1f807b4 100644
--- a/gi/pygi-marshal-from-py.c
+++ b/gi/pygi-marshal-from-py.c
@@ -32,6 +32,62 @@
#include "pygi-marshal-cleanup.h"
#include "pygi-marshal-from-py.h"
+/*
+ * _is_union_member - check to see if the py_arg is actually a member of the
+ * expected C union
+ */
+static gboolean
+_is_union_member (PyGIInterfaceCache *iface_cache, PyObject *py_arg) {
+ gint i;
+ gint n_fields;
+ GIUnionInfo *union_info;
+ GIInfoType info_type;
+ gboolean is_member = FALSE;
+
+ info_type = g_base_info_get_type (iface_cache->interface_info);
+
+ if (info_type != GI_INFO_TYPE_UNION)
+ return FALSE;
+
+ union_info = (GIUnionInfo *) iface_cache->interface_info;
+ n_fields = g_union_info_get_n_fields (union_info);
+
+ for (i = 0; i < n_fields; i++) {
+ GIFieldInfo *field_info;
+ GITypeInfo *field_type_info;
+
+ field_info = g_union_info_get_field (union_info, i);
+ field_type_info = g_field_info_get_type (field_info);
+
+ /* we can only check if the members are interfaces */
+ if (g_type_info_get_tag (field_type_info) == GI_TYPE_TAG_INTERFACE) {
+ PyObject *py_type;
+ GIInterfaceInfo *field_iface_info =
+ g_type_info_get_interface (field_type_info);
+
+ py_type = _pygi_type_import_by_gi_info (
+ (GIBaseInfo *) field_iface_info);
+
+ if (py_type != NULL && PyObject_IsInstance (py_arg, py_type)) {
+ is_member = TRUE;
+ break;
+ }
+
+ Py_XDECREF (py_type);
+ g_base_info_unref ( ( GIBaseInfo *) field_iface_info);
+
+ }
+
+ g_base_info_unref ( ( GIBaseInfo *) field_type_info);
+ g_base_info_unref ( ( GIBaseInfo *) field_info);
+
+ if (is_member)
+ break;
+ }
+
+ return is_member;
+}
+
gboolean
_pygi_marshal_from_py_void (PyGIInvokeState *state,
PyGICallableCache *callable_cache,
@@ -1325,10 +1381,15 @@ _pygi_marshal_from_py_interface_struct (PyGIInvokeState *state,
return (success == Py_None);
} else if (!PyObject_IsInstance (py_arg, iface_cache->py_type)) {
- PyErr_Format (PyExc_TypeError, "Expected %s, but got %s",
- iface_cache->type_name,
- iface_cache->py_type->ob_type->tp_name);
- return FALSE;
+ /* first check to see if this is a member of the expected union */
+ if (!_is_union_member (iface_cache, py_arg)) {
+ if (!PyErr_Occurred())
+ PyErr_Format (PyExc_TypeError, "Expected %s, but got %s",
+ iface_cache->type_name,
+ iface_cache->py_type->ob_type->tp_name);
+
+ return FALSE;
+ }
}
if (g_type_is_a (iface_cache->g_type, G_TYPE_BOXED)) {
@@ -1417,59 +1478,13 @@ gboolean _pygi_marshal_from_py_interface_instance (PyGIInvokeState *state,
if (!PyObject_IsInstance (py_arg, iface_cache->py_type)) {
/* wait, we might be a member of a union so manually check */
- if (info_type == GI_INFO_TYPE_UNION) {
- gint i;
- gint n_fields;
- gboolean is_member = FALSE;
- GIUnionInfo *union_info = (GIUnionInfo *) iface_cache->interface_info;
-
- n_fields = g_union_info_get_n_fields (union_info);
-
- for (i = 0; i < n_fields; i++) {
- GIFieldInfo *field_info;
- GITypeInfo *field_type_info;
-
- field_info = g_union_info_get_field (union_info, i);
- field_type_info = g_field_info_get_type (field_info);
-
- /* we can only check if the members are interfaces */
- if (g_type_info_get_tag (field_type_info) ==
- GI_TYPE_TAG_INTERFACE) {
- PyObject *py_type;
- GIInterfaceInfo *field_iface_info =
- g_type_info_get_interface(field_type_info);
-
- py_type = _pygi_type_import_by_gi_info (
- (GIBaseInfo *) field_iface_info);
-
- if (PyObject_IsInstance (py_arg, py_type)) {
- is_member = TRUE;
- break;
- }
-
- Py_XDECREF (py_type);
- g_base_info_unref ( ( GIBaseInfo *) field_iface_info);
-
- }
-
- g_base_info_unref ( ( GIBaseInfo *) field_type_info);
- g_base_info_unref ( ( GIBaseInfo *) field_info);
-
- if (is_member)
- break;
- }
-
- if (!is_member) {
+ if (!_is_union_member (iface_cache, py_arg)) {
+ if (!PyErr_Occurred())
PyErr_Format (PyExc_TypeError,
"Expected a %s, but got %s",
iface_cache->type_name,
py_arg->ob_type->tp_name);
- return FALSE;
- }
- } else {
- PyErr_Format (PyExc_TypeError, "Expected a %s, but got %s",
- iface_cache->type_name,
- py_arg->ob_type->tp_name);
+
return FALSE;
}
}
diff --git a/tests/test_everything.py b/tests/test_everything.py
index 4a03890..19d345b 100644
--- a/tests/test_everything.py
+++ b/tests/test_everything.py
@@ -483,3 +483,22 @@ class TestAdvancedInterfaces(unittest.TestCase):
self.assertEquals(ret[0], 51);
self.assertEquals(ret[1], 61);
self.assertEquals(ret[2], 32);
+
+ def test_obj_skip_return_val_no_out(self):
+ obj = Everything.TestObj();
+ # raises an error for 0, succeeds for any other value
+ self.assertRaises(GLib.GError, obj.skip_return_val_no_out, 0)
+
+ ret = obj.skip_return_val_no_out(1)
+ self.assertEquals(ret, None)
+
+class TestSignals(unittest.TestCase):
+ def test_object_param_signal(self):
+ obj = Everything.TestObj();
+
+ def callback (obj_param):
+ self.assertEquals(obj_param.props.int, 3)
+ self.assertEquals(obj_param.__grefcount__, 2)
+
+ obj.connect('sig-with-obj', callback)
+ obj.emit_sig_with_obj()
diff --git a/tests/test_properties.py b/tests/test_properties.py
index d02dac9..3521647 100644
--- a/tests/test_properties.py
+++ b/tests/test_properties.py
@@ -15,6 +15,7 @@ from gi.repository.GObject import \
G_MAXULONG
from gi.repository import Gio
+from gi.repository import GLib
if sys.version_info < (3, 0):
TEST_UTF8 = "\xe2\x99\xa5"
@@ -39,6 +40,9 @@ class PropertyObject(GObject.GObject):
enum = GObject.property(
type=Gio.SocketType, default=Gio.SocketType.STREAM)
+ boxed = GObject.property(
+ type=GLib.Regex, flags=PARAM_READWRITE|PARAM_CONSTRUCT)
+
class TestProperties(unittest.TestCase):
def testGetSet(self):
obj = PropertyObject()
@@ -67,8 +71,9 @@ class TestProperties(unittest.TestCase):
'construct',
'construct-only',
'uint64',
- 'enum'])
- self.assertEqual(len(obj), 5)
+ 'enum',
+ 'boxed'])
+ self.assertEqual(len(obj), 6)
def testNormal(self):
obj = new(PropertyObject, normal="123")
@@ -161,6 +166,17 @@ class TestProperties(unittest.TestCase):
self.assertRaises(TypeError, GObject.property, type=Gio.SocketType,
default=1)
+ def textBoxed(self):
+ obj = new(PropertyObject)
+
+ regex = GLib.Regex.new('[a-z]*', 0, 0)
+ obj.props.boxed = regex
+ self.assertEqual(obj.props.boxed.get_pattern(), '[a-z]*')
+ self.assertEqual(obj.boxed.get_patttern(), '[a-z]*')
+
+ self.assertRaises(TypeError, setattr, obj, 'boxed', 'foo')
+ self.assertRaises(TypeError, setattr, obj, 'boxed', object())
+
def testRange(self):
# kiwi code
def max(c):