commit d0ed62afbc4cada0bf6abc4f8754e5a8d73036e4 Author: Martin Pitt Date: Mon Nov 19 15:13:28 2012 +0100 release 3.7.2 NEWS | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit 29dc7425dd7584411b52ef07b50f929ed119a000 Author: Martin Pitt Date: Mon Nov 19 14:37:02 2012 +0100 Fix distcheck Commit e617f76e forgot to rename the file in EXTRA_DIST tests/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 567aae6e7c56bb89f53fcfccb1b0bc732f85b847 Author: Martin Pitt Date: Mon Nov 19 14:34:13 2012 +0100 tests: Fix unicode vs. str issues in Python 2 Some of the tests assumed a system default encoding of UTF-8, which is not true in Python 2 unless pygtkcompat is imported. Commit e617f76 uncovered this. tests/test_gi.py | 8 ++++---- tests/test_iochannel.py | 16 +++++++++------- 2 files changed, 13 insertions(+), 11 deletions(-) commit 509e5ac1a6dd8504e89c33c559fe4f72156a1ddf Author: Martin Pitt Date: Mon Nov 19 14:20:56 2012 +0100 tests: Fix previous commit to fail properly on test failures tests/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e617f76e5b0c301c3ae92e1091aa86792de4d8e8 Author: Martin Pitt Date: Mon Nov 19 14:09:14 2012 +0100 tests: Run pygtkcompat tests separately pygtkcompat changes the global namespace, in particular patching Gdk and Gtk overrides. Run the tests in a separate process so that the main tests are not potentially affected by the pygtkcompat test. runtests.py runs all tests/test_*.py by default, so rename to compat_test_pygtk.py and run that explicitly after successfully running the main tests. See https://bugzilla.gnome.org/show_bug.cgi?id=688219 tests/Makefile.am | 3 + tests/compat_test_pygtk.py | 147 +++++++++++++++++++++++++++++++++++++++++++++ tests/test_pygtkcompat.py | 147 --------------------------------------------- 3 files changed, 150 insertions(+), 147 deletions(-) commit 8180b8092f99b7c9f0dee1742418efdbd23ab330 Author: Simon Feltman Date: Thu Nov 15 02:51:52 2012 -0800 Move pygtkcompat into sibling package of gi Move the pygtkcompat module out of the gi package and into a sibling package as follows: pygobject/ gi/ pygtkcompat/ This allows for pygtkcompat to grow without affecting the gi package. Add deprecation message to gi/pygtkcompat.py https://bugzilla.gnome.org/show_bug.cgi?id=688219 Makefile.am | 2 +- configure.ac | 1 + gi/pygtkcompat.py | 524 +++------------------------------------------ pygtkcompat/Makefile.am | 15 ++ pygtkcompat/__init__.py | 20 ++ pygtkcompat/pygtkcompat.py | 501 +++++++++++++++++++++++++++++++++++++++++++ tests/test_pygtkcompat.py | 6 +- 7 files changed, 565 insertions(+), 504 deletions(-) commit f736694d09e9d0fca4769d9f1f34ec34e6354d87 Author: Martin Pitt Date: Mon Nov 19 13:59:20 2012 +0100 Bump g-i dependency to >= 1.34.2 We need this for updated GLib annotations and new test API. configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f6c994c76cd8010460b76bf455e1a341348d735b Author: Martin Pitt Date: Mon Nov 19 10:39:26 2012 +0100 test_gi: Fix failing tests with g-i 1.34.x Skip tests which require g-i test API from 1.35.x when building with g-i 1.34.x. tests/test_gi.py | 6 ++++++ 1 file changed, 6 insertions(+) commit 8ce0d028fe79e2ce52cfecbb682afba6651a7a70 Author: Martin Pitt Date: Wed Nov 14 11:57:21 2012 +0100 test_gi: Add tests for type "filename" tests/test_gi.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 3408a151e49d9520f54ad9bc04f620c7777125ec Author: Martin Pitt Date: Wed Nov 14 11:09:33 2012 +0100 Drop foreign GVariant registration/support This is dead code. We have tests for GVariant in and out method arguments, callback arguments and return values, properties, etc to ensure that this stays working. gi/Makefile.am | 2 -- gi/pygi-foreign-gvariant.c | 63 ---------------------------------------------- gi/pygi-foreign-gvariant.h | 41 ------------------------------ gi/pygi-foreign.c | 8 +----- 4 files changed, 1 insertion(+), 113 deletions(-) commit 47c46d847bb69ebc139d5e0b6c609da6f27201f2 Author: Martin Pitt Date: Wed Nov 14 10:33:24 2012 +0100 test_properties.py: Fix PEP-8 errors tests/test_properties.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 78f49e6253500bfa382ce6c07412613d8f7f9d7f Author: Martin Pitt Date: Wed Nov 14 10:14:36 2012 +0100 Add support for GVariant properties defined in Python gi/_gobject/gobjectmodule.c | 13 +++++++ gi/_gobject/propertyhelper.py | 11 ++++-- tests/test_properties.py | 81 +++++++++++++++++++++++++++++++++++++------ 3 files changed, 91 insertions(+), 14 deletions(-) commit f3b77f4304be20b7422c262b973f3eeb540c4bf6 Author: Martin Pitt Date: Wed Nov 14 09:33:43 2012 +0100 pyg_value_from_pyobject(): Simplify GVariant type check Use pyg_type_from_object_strict() instead of the much more expensive and local pyg_get_gvariant_type(). gi/_gobject/pygtype.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) commit 0c0fb8ef88a2c61cf95cd1cb96f6d5f296cad5fc Author: Martin Pitt Date: Wed Nov 14 09:27:42 2012 +0100 test_everything: Add test for callback returning wrong type This covers the "expected a GVariant, got something else" check in pyg_value_from_pyobject(). tests/test_everything.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 84db7109dfbaf443758a5a4871ee385686d2703d Author: Martin Pitt Date: Wed Nov 14 08:42:53 2012 +0100 Add type checking to GVariant argument assignment gi/pygi-argument.c | 7 ++++++- tests/test_gi.py | 5 ++--- 2 files changed, 8 insertions(+), 4 deletions(-) commit e944caf5ff53143a98dd4a5578530996358013ec Author: Martin Pitt Date: Wed Nov 14 08:22:35 2012 +0100 Add support for GVariant properties defined in C Note that trying to assign a non-GVariant value to a GVariant property currently crashes. gi/pygi-property.c | 6 +++++- tests/test_gi.py | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) commit 614cc9594cb34d92a6d4b00773427d4fb023c65e Author: Martin Pitt Date: Wed Nov 14 07:09:58 2012 +0100 test_unknown.py: Check property interface NB that the property implementation in test-unknown.c does not actually do anything, we just want to assert that the properties are properly registered. tests/test_unknown.py | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 9d7771affcf788d251cced65da56fc2773a278b3 Author: Martin Pitt Date: Wed Nov 14 07:01:24 2012 +0100 Fix previous commit for Python 2 gi/pygi-foreign-cairo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 997d4e70b2793039d916acf8921087576622152e Author: Martin Pitt Date: Wed Nov 14 06:57:04 2012 +0100 pygi-foreign-cairo.c: Use official py3cairo API Do not clobber py3cairo's Pycairo_CAPI global variable, and use import_cairo() instead of our own code. gi/pygi-foreign-cairo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cec5d1a55347b81c1ae4ddc47ea2b4fbf964d239 Author: Martin Pitt Date: Wed Nov 14 06:47:23 2012 +0100 Drop dead code from pygi-callbacks.[hc] _pygi_create_callback() and _pygi_scan_for_callbacks() are not used anywhere. _pygi_destroy_notify_create() fits better in pygi-marshal-from-py.c, so move it there, and drop pygi-callbacks.[hc] completely. gi/Makefile.am | 2 - gi/pygi-callbacks.c | 217 ---------------------------------------------- gi/pygi-callbacks.h | 48 ---------- gi/pygi-marshal-from-py.c | 44 ++++++++++ gi/pygi-private.h | 1 - 5 files changed, 44 insertions(+), 268 deletions(-) commit 55070cc9c98993ccda7ebcb05783fad182b2eb11 Author: Carlos Garnacho Date: Tue Nov 13 18:24:28 2012 +0100 Fix marshalling of arrays of struct pointers to Python Fill in the pointer to the struct, not the pointer to the array position. This makes the GdkAtom** argument in gtk_clipboard_wait_for_targets() work. https://bugzilla.gnome.org/show_bug.cgi?id=678620 gi/pygi-marshal-to-py.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit fc021516552b1720bacc4afe6b7a610c413194c4 Author: Martin Pitt Date: Wed Nov 14 06:27:17 2012 +0100 test_atoms.py: Add test for out array This reproduces https://bugzilla.gnome.org/show_bug.cgi?id=678620 tests/test_atoms.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit e2790d22610aae773635d4caef2458082a307283 Author: Martin Pitt Date: Tue Nov 13 16:38:36 2012 +0100 Fix Gdk.Atom str()/repr() fallback Fix regression in commit 6713618: If an atom does not have a name, do not recursively call our own str()/repr() methods, but just print "Gdk.Atom". gi/overrides/Gdk.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 9879fd41a7d8d72f8db9cadf5b1ee29fc4d5d6bf Author: Martin Pitt Date: Tue Nov 13 13:16:14 2012 +0100 test_gi: Stop using GLib.bytes.unref_to_array() This method isn't safe for GI, and should be (skip)ed. Use get_data() instead which is safe and works fine. See https://bugzilla.gnome.org/show_bug.cgi?id=688242 tests/test_gi.py | 6 ------ 1 file changed, 6 deletions(-) commit 671361841de797ef62b59d1d7568fc3d431898c7 Author: Martin Pitt Date: Tue Nov 13 12:56:11 2012 +0100 Fix Gdk.Atom to have a proper str() and repr() Gdk.Atom is not proper GType'd class, so we cannot override the whole class. Just override its __str__() and __repr__() methods so that printing atoms shows something sensible. For nameless/invalid atoms, fall back to the old output to help with debugging. https://bugzilla.gnome.org/show_bug.cgi?id=678620 gi/overrides/Gdk.py | 21 +++++++++++++++++++++ tests/test_atoms.py | 12 ++++++++++++ 2 files changed, 33 insertions(+) commit 56e62858e9c2bdde3186f5cf4e83be94fb4e5306 Author: Simon Feltman Date: Tue Nov 13 02:53:34 2012 -0800 Make sure g_value_set_boxed does not cause a buffer overrun with GStrvs Add NULL terminator to gchar** passed to g_value_set_boxed to make sure it does not overrun memory in pygi_set_property_value_real. Add MALLOC_CHECK_=3 to "make check" which prints an error and aborts in these cases. https://bugzilla.gnome.org/show_bug.cgi?id=688232 gi/pygi-property.c | 8 ++++++-- tests/Makefile.am | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) commit ca11ec124fdd3fb2b67efdeb3ac93aaeb8b3fd83 Author: Martin Pitt Date: Mon Nov 12 08:35:28 2012 +0100 types.py: Fix PEP-8 violation gi/types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df589458358d7e7bf178dff4e6ad937a70f806e3 Author: Simon Feltman Date: Sun Nov 11 22:26:19 2012 -0800 Fix leaks with GValues holding boxed and object types Expose read access to PyGIBoxed.free_on_dealloc. Add GObject.Value.__del__ override and call unset() to correctly free reference counts. https://bugzilla.gnome.org/show_bug.cgi?id=688137 gi/overrides/GObject.py | 9 +++++++++ gi/pygi-boxed.c | 12 ++++++++++++ tests/test_gi.py | 2 -- 3 files changed, 21 insertions(+), 2 deletions(-) commit c01c95b9fb3d726385efac945f6d1270ae65d109 Author: Simon Feltman Date: Sun Nov 11 19:46:15 2012 -0800 Add expectantly failing unittests for GValue boxed/object leaks https://bugzilla.gnome.org/show_bug.cgi?id=688137 tests/test_gi.py | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) commit 13629f5a9c9a7022f3521a3616d9ce8fa4a6161b Author: Simon Feltman Date: Thu Aug 16 15:09:08 2012 -0700 Add doc strings showing method signatures for gi methods Add signature based doc string to all methods pulled in from introspection. For example: Gtk.SpinButton.get_icon_area.__doc__ get_icon_area(self, icon_pos:Gtk.EntryIconPosition) -> icon_area:cairo.RectangleInt https://bugzilla.gnome.org/show_bug.cgi?id=681967 gi/overrides/GIMarshallingTests.py | 1 + gi/pygi-info.c | 103 +++++++++++++++++++++++++++++++++---- gi/pygi-type.c | 60 +++++++++++++++++++++ gi/pygi-type.h | 1 + gi/types.py | 92 ++++++++++++++++++++++++++------- tests/test_gi.py | 30 +++++++++++ 6 files changed, 259 insertions(+), 28 deletions(-) commit 7b7277f3cc099280f8e2d6cf6693490290fedc24 Author: Simon Feltman Date: Fri Nov 9 19:17:03 2012 -0800 Set Property instance doc string and blurb to getter doc string Assign Property getter __doc__ strings or explicit blurb parameters to the Property instances __doc__ attribute. This clobbers the default Property classes lengthy and unhelpful doc string in the case of instances. https://bugzilla.gnome.org/show_bug.cgi?id=688025 gi/_gobject/propertyhelper.py | 10 +++++++--- tests/test_properties.py | 14 ++++++++++---- 2 files changed, 17 insertions(+), 7 deletions(-) commit c5343d329ebb452d97afac30e4120ebab8477556 Author: Martin Pitt Date: Mon Nov 12 07:47:02 2012 +0100 tests: Fix for Python 2 Add quirks for Python 2's string handling, and disable the Everything.test_array_gint8_in() as there seems to be no way of creating a byte array in Python 2. tests/test_everything.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 964f33ca3a74bfb7d850f136d0844ac1551d36e9 Author: Martin Pitt Date: Sat Nov 10 15:52:15 2012 +0100 test_everything: Add tests for more Regress data and container types Add more tests for Regress' data and container type test API. This detects a number of bugs, which have been marked as expected failure, or disabled completely for the cases where they cause crashes: * unsigned enums with values >= 0x80000000 do not work * nested ghashes in return values do not work * array length arguments in callbacks are passed instead of suppressed tests/test_everything.py | 156 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 154 insertions(+), 2 deletions(-) commit 476e29d1ba3eda92cc021710017bce4ec252e5b5 Author: Martin Pitt Date: Fri Nov 9 18:45:22 2012 +0100 test_everything: Add tests for Regress type tests Add tests for all the data type handling tests of g-i's Regress module. tests/test_everything.py | 183 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 183 insertions(+) commit 0d7974396e8379b518403983d9d13629066680d7 Author: Martin Pitt Date: Fri Nov 9 18:44:50 2012 +0100 Add GObject.G_MINSSIZE gi/_gobject/gobjectmodule.c | 1 + gi/overrides/GObject.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit b800a6903300dbe9435ed8eb3677eb9c0536ec31 Author: Martin Pitt Date: Fri Nov 9 16:02:00 2012 +0100 Fix marshalling of GByteArrays In _pygi_marshal_from_py_array(), set the array length after copying the data in the GI_TYPE_TAG_UINT8 case (which applies for GByteArrays), otherwise it will always come out as zero length. Enable the TestGByteArray.test_bytearray_none_in() test case as that works now. gi/pygi-marshal-from-py.c | 1 + tests/test_gi.py | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) commit fa568949c46dd4b537357f1af74d1f675294b760 Author: Martin Pitt Date: Fri Nov 9 15:23:37 2012 +0100 Fix marshalling of ssize_t to smaller ints Add missing marshalling cases for (u)int8 and (u)int16. This fixes the TestArray.test_array_in test, so drop the expected failure. gi/pygi-marshal-from-py.c | 30 +++++++++++++++++++++++++++++- tests/test_gi.py | 2 -- 2 files changed, 29 insertions(+), 3 deletions(-) commit 5a5940a0a0704be8e222d4cad6cedda1ad3e0f71 Author: Martin Pitt Date: Fri Nov 9 09:37:00 2012 +0100 test_gi: Enable GByteArray constructor tests GByteArray annotations have been fixed in GLib now, enable the test case. Drop the redundant disabled_test_bytearray_none_in_from_bytes() test, as this is the same as disabled_test_bytearray_none_in(). tests/test_gi.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit e2c545896ab08b1f1885b502a8472db83f193d08 Author: Martin Pitt Date: Fri Nov 9 09:11:38 2012 +0100 test_gi: Enable GBytes test cases GBytes annotations are fixed in GLib now, enable the test case and add more for g_bytes_new_take() and g_bytes_{compare,equal}(). Please note that calling unref_to_array() on a GBytes object that we created ourselves currently causes a double free crash, so disable that part for now. tests/test_gi.py | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) commit 1ba4e201f86ffa28c645d7c9eea99cf31080ea43 Author: Martin Pitt Date: Fri Nov 9 08:26:29 2012 +0100 test_gi: Add missing data type tests from GIMarshallingTests Add tests for types time_t, GBytes, GByteArray, and various variants of passing around GValues, flags, enums, arrays, and boxed structs. This tests API which is provided by GIMarshallingTests, but which we did not cover yet. This detects a number of bugs in annotations and our marshalling. These have been marked as expected failure, or disabled completely for the cases where they cause crashes. tests/test_gi.py | 152 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 152 insertions(+) commit 0456d9c892b76ed79134230a4a8610a23c602964 Author: Martin Pitt Date: Fri Nov 9 06:44:46 2012 +0100 autogen.sh: Only enable code coverage if lcov is installed Otherwise we break minimal build environments. autogen.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 76a3acebf73f930c541d0f30249f67d254f948ab Author: Martin Pitt Date: Fri Nov 9 06:41:58 2012 +0100 Lower autoconf dependency to 2.68 again configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f1a5f1b92d577c542d4258e63e595d4da9acd484 Author: Martin Pitt Date: Thu Nov 8 14:54:30 2012 +0100 Add support for lcov code coverage Use gnome-common's new code coverage flags. Default to enabling code coverage in autogen.sh (but not for dist). To use this, run "make check-code-coverage" after building. .gitignore | 1 + Makefile.am | 2 ++ autogen.sh | 2 +- configure.ac | 6 ++++++ 4 files changed, 10 insertions(+), 1 deletion(-) commit e46af4aba220cfaf4b84a9be847f3363da556993 Author: Martin Pitt Date: Wed Nov 7 17:14:22 2012 +0100 Update documentation files Update AUTHORS to have the current maintainers. Update HACKING to drop Tomeu's GNOME login (this should be set in ~/.ssh/config) Update INSTALL to current upstream version. AUTHORS | 13 ++- HACKING | 4 +- INSTALL | 380 +++++++++++++++++++++++++++++++++++++++++++--------------------- 3 files changed, 267 insertions(+), 130 deletions(-) commit 06f5ed0ebabce34eca6bc6de80221cba6453feec Author: Martin Pitt Date: Wed Nov 7 17:08:11 2012 +0100 Quiesce automake output Use $(AM_V_GEN) with custom $(LINK) commands, and avoid error messages about existing symlinks on rebuilds. gi/Makefile.am | 2 +- gi/_glib/Makefile.am | 2 +- gi/_gobject/Makefile.am | 2 +- tests/Makefile.am | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) commit 37270de8ead0b281a1824ff204a4aa9686a7225b Author: Martin Pitt Date: Wed Nov 7 16:50:07 2012 +0100 Drop unused variable, fail builds on those Build with -Werror=unused-variable, as these could hide programming errors or incomplete refactoring, and are not platform dependent. Drop unused variable in pyg_type_add_interfaces(). configure.ac | 1 + gi/_gobject/gobjectmodule.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) commit 495fd98555e0c89724bb8fa9478dc096c5d61e22 Author: Martin Pitt Date: Wed Nov 7 16:37:04 2012 +0100 configure.ac: Drop maintainer mode, modernize libtool declarations Use all arguments of AC_INIT. AM_MAINTAINER_MODE is discouraged now, drop it. Use LT_PREREQ and LT_INIT for libtool initialization instead of the older declarations. See https://live.gnome.org/GnomeGoals/ModernAutotools configure.ac | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) commit 059d0cb879fe5a7b0296ec21f3bfcb64c8596cb0 Author: Martin Pitt Date: Wed Nov 7 16:21:13 2012 +0100 autoupdate configure.ac Result of "autoupdate", with slight manual beautification. See https://live.gnome.org/GnomeGoals/ModernAutotools configure.ac | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit a932446e6648ecd98c9038298b18c6fbd36c01aa Author: Jose Rostagno Date: Mon Nov 5 14:26:05 2012 -0300 pygi-convert: remove deprecated GLib → GObject conversions Using these functions from the GObject module is deprecated now, they should be used from GLib. pygi-convert.sh | 5 ----- 1 file changed, 5 deletions(-) commit 21076d4b8f3ec8e253ca236fa3b20b07fde237fe Author: Simon Feltman Date: Wed Nov 7 03:49:24 2012 -0800 Use hasattr when testing for __info__ when finding vfuncs Change gi.types.find_vfunc_info_in_interface to use hasattr when finding vfuncs. Using '__info__' in __dict__ was skipping overridden interfaces which don't directly contain the __info__. gi/types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b5c9b3d1499b3bc59afb297672abc671e175546 Author: Martin Pitt Date: Wed Nov 7 12:05:24 2012 +0100 tests: Ensure that the fatal mask is always reset On test case failures the fatal mask might be left in a wrong state, so ensure with "finally" that it is reset on failed tests as well, to avoid hiding other failures. tests/test_gi.py | 11 ++++++----- tests/test_overrides_gtk.py | 33 +++++++++++++++++++-------------- tests/test_pygtkcompat.py | 6 ++++-- tests/test_signal.py | 6 ++++-- 4 files changed, 33 insertions(+), 23 deletions(-) commit 463f660cd6bb78ae7f2ea7c70c0491e6b4744942 Author: Simon Feltman Date: Tue Nov 6 21:34:06 2012 -0800 Replace GObject notify methods with introspection and python Replace static context managers for freeze_notify and handler_block with python context managers. Remove notify, freeze_notify, thaw_notify static methods as the introspection versions work fine. https://bugzilla.gnome.org/show_bug.cgi?id=672727 gi/_gobject/pygobject.c | 173 ++---------------------------------------------- gi/overrides/GObject.py | 61 +++++++++++++++-- tests/test_gobject.py | 26 ++++++-- tests/test_signal.py | 13 +++- 4 files changed, 91 insertions(+), 182 deletions(-) commit 3fcd987272a779e5ee9173a2c3a043b4b7475842 Author: Simon Feltman Date: Tue Oct 23 13:56:32 2012 -0700 Add support for overriding GObject.Object Shift pygi module mechanics so the introspection generated 'Object' class becomes derived from the static GObject class. Add initial GObject.Object override which sets all static methods back essentially leapfrogging the introspection methods. This sets the stage for having the ability to remove static methods piecemeal in favor of introspection/python in future commits. https://bugzilla.gnome.org/show_bug.cgi?id=672727 gi/module.py | 30 +++++++++++--------- gi/overrides/GObject.py | 74 ++++++++++++++++++++++++++++++++++++++++++++++++ gi/pygobject-external.h | 10 +------ gi/types.py | 7 +++++ tests/test_gobject.py | 31 ++++++++++++++++---- tests/testhelpermodule.c | 2 +- 6 files changed, 126 insertions(+), 28 deletions(-) commit 4da6f93d86b104941c5533c3da5edb4a00ec62e9 Author: Martin Pitt Date: Tue Nov 6 13:55:21 2012 +0100 Bump glib dependency to >= 2.34.2 We need 2.34.2 or 2.35.2 as we now depend on the GIOChannel annotation fixes. README | 2 +- configure.ac | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 85c8dd7a9bc81fb5df5abc6d8a95f966955ec775 Author: Martin Pitt Date: Tue Nov 6 11:28:42 2012 +0100 Update README Point to python-hackers-list instead of the old pygtk list, update required versions, and point to wiki page and IRC. README | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 6d8b29ba56fb085948a155c75af36dcea9c71da8 Author: Martin Pitt Date: Tue Nov 6 11:21:32 2012 +0100 Add --with-python configure option This behaves like setting $PYTHON, but also works in build systems like jhbuild which do not support setting environment variables. Update README accordingly. README | 15 +++++++++------ configure.ac | 43 ++++++++++++++++++++++++++++++++++--------- 2 files changed, 43 insertions(+), 15 deletions(-) commit 4e5556a5238a3b86da9a0e40fd0e23004ed6af75 Author: Martin Pitt Date: Tue Nov 6 10:39:27 2012 +0100 python.m4: Add python3.3, do not prefer unversioned "python" Add python 3.3 to the search list. http://www.python.org/dev/peps/pep-0394/ broke the well-defined meaning of "python", so use that as last fallback if more specific versions do not exist. configure.ac | 2 +- m4/python.m4 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e71c046ed8f5b06e6b7383ddc0fc18f06de6abee Author: Martin Pitt Date: Tue Nov 6 09:48:50 2012 +0100 m4: Update py-compile to current upstream version Update py-compile to current versions from automake 1.11.6. m4/py-compile | 81 +++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 48 insertions(+), 33 deletions(-) commit 8406b39f4e9ff98e0d59e880dde3ddb5e5131726 Author: Martin Pitt Date: Tue Nov 6 09:57:00 2012 +0100 m4: Update introspection.m4 to current upstream version m4/introspection.m4 | 4 ++++ 1 file changed, 4 insertions(+) commit 4ffa61b7c39cf038440dc9acfe8d214c9b77c3a6 Author: Martin Pitt Date: Tue Nov 6 09:53:15 2012 +0100 option.py: Fix PEP-8 error gi/_glib/option.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2cbb54e79c23b96486d4a2bfa170460df5bd6c84 Author: Simon Feltman Date: Mon Nov 5 18:27:56 2012 -0800 Remove DynamicGLibModule and DynamicGObjectModule Move final bits of _glib static binding imports directly into the GLib override. Change _glib/option use the .so directly rather than the staged variables in _glib/__init__.py. Remove DynamicGLibModule and DynamicGObjectModule and update unittest. https://bugzilla.gnome.org/show_bug.cgi?id=687488 gi/_glib/__init__.py | 11 ---------- gi/_glib/option.py | 16 +++++++------- gi/importer.py | 12 ++--------- gi/module.py | 60 ---------------------------------------------------- gi/overrides/GLib.py | 14 ++++++++++++ tests/test_gi.py | 9 ++------ 6 files changed, 26 insertions(+), 96 deletions(-) commit 901c1b6e3722a9cd999e4948297e2c460f101d20 Author: Daniel Drake Date: Thu Nov 1 14:46:22 2012 +0000 Fix property lookup in class hierarchy Commit 4bfe7972546413f46f5c36737ff03bb5612c1921 introduced a bug where a Python subclass of a gi-provided base class overrides a property from the base class. The new behaviour in the above commit causes pygobject to seek the property in the base class and try to read it from there (resulting in confusion) rather than noticing that the property is overridden and present in the Python object instance. To provide a nicer solution here, we can exploit the fact that g_object_class_find_property() will traverse the hierarchy in order to find the right GParamSpec, and the returned GParamSpec can tell us exactly which GType introduces the property. The strategy is: 1. Find pspec with g_object_class_find_property() 2. Find the class that owns that property (pspec->owner_type) 3. See if girepository owns that class. 3a. If yes, get property from there. 3b. If not, get property "directly" And the same for property setting. Now that _pygi_lookup_property_from_g_type is always passed the type that implements the property, it no longer has to go recursing through parent classes, which was the original cause of confusion. https://bugzilla.gnome.org/show_bug.cgi?id=686942 gi/_gobject/pygobject.c | 92 +++++++++++++++++++++++---------- gi/pygi-property.c | 130 ++++++++++++++++++++++------------------------- gi/pygi-property.h | 4 +- gi/pygi.h | 12 ++--- tests/test_properties.py | 30 +++++++++++ 5 files changed, 164 insertions(+), 104 deletions(-) commit efcb0f9fda65e24ae98438d61487d06db9eac1b1 Author: Martin Pitt Date: Sat Nov 3 16:14:01 2012 +0100 Move property and signal creation into _class_init() We must not add class interfaces after g_type_class_ref() has been called the first time. Move signal and property creation from pyg_type_register() into pyg_object_class_init(), and drop the hack of registering interfaces twice. This changed class initialization order now exposes GLib's warning about unknown signals, so adjust test_signal.TestGSignalsError.test_invalid_name() to not abort on that. https://bugzilla.gnome.org/show_bug.cgi?id=686149 gi/_gobject/gobjectmodule.c | 177 ++++++++++++++++++-------------------------- tests/test_signal.py | 6 +- 2 files changed, 75 insertions(+), 108 deletions(-) commit 655a5002ffaa088b775adbc59e5125444f7bc1ca Author: Jose Rostagno Date: Sat Nov 3 13:21:52 2012 -0300 Remove unused macro definitions PYGLIB_*_VERSION are not used anywhere any more, remove those. (dropped in commit 8d52bceb1) gi/_glib/glibmodule.c | 5 ----- 1 file changed, 5 deletions(-) commit fa054fd15b8874760bee97d9af168a2969e6ece4 Author: Martin Pitt Date: Mon Nov 5 14:38:07 2012 +0100 testhelpermodule.c: Drop obsolete g_thread_init() We already require a new enough glib version as we dropped g_thread_init() in the main code a long time ago. But for formality's sake, bump glib requirement to >= 2.32. configure.ac | 4 ++-- tests/testhelpermodule.c | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) commit 2e57530a27a44e94927d487cf2f2d9e543777654 Author: Martin Pitt Date: Mon Nov 5 14:37:11 2012 +0100 pygi-source.c: Drop dead code gi/pygi-source.c | 2 -- 1 file changed, 2 deletions(-) commit 2a24c9ccd59bff719fa817a0ec5c959f6da03e1c Author: Simon Feltman Date: Sun Nov 4 22:22:53 2012 -0800 Move TYPE constants from _gobject to GObject Clear out TYPE constants from _gobject/__init__.py and move them into the GObject overrides. Disperse class imports among modules that use them instead of using _gobject/__init__.py as a staging area (e.g. GInterface). https://bugzilla.gnome.org/show_bug.cgi?id=687487 gi/_gobject/__init__.py | 30 ------------------------------ gi/_gobject/constants.py | 2 +- gi/module.py | 38 +++++++++++++++++++++++++------------- gi/overrides/__init__.py | 9 ++++++--- gi/types.py | 10 ++++++---- 5 files changed, 38 insertions(+), 51 deletions(-) commit c2aa6f0d0ed4c4e60f081b106dc7a65513963fce Author: Martin Pitt Date: Mon Nov 5 13:10:05 2012 +0100 Move G_MIN/MAX constants into GObject overrides These really ought to come from GLib's typelib, but are not right now so we need to keep the static bindings for those. But drop them from gi/_gobject/ and move them into the overrides where they belong. gi/_gobject/__init__.py | 17 ----------------- gi/_gobject/constants.py | 21 --------------------- gi/_gobject/propertyhelper.py | 2 +- gi/overrides/GObject.py | 9 +++++++++ tests/test_gi.py | 32 ++++++++++++++++---------------- 5 files changed, 26 insertions(+), 55 deletions(-) commit 12b84727edc36f686a7031b5c4c6bf662838908d Author: Martin Pitt Date: Mon Nov 5 11:04:54 2012 +0100 Replace static OPTION_* constants with GI Drop static definitions of GLib.OPTION_* constants and use the ones from GI instead. https://bugzilla.gnome.org/show_bug.cgi?id=686765 gi/_glib/__init__.py | 13 ------------- gi/_glib/glibmodule.c | 32 -------------------------------- gi/_glib/option.py | 46 ++++++++++++++++++++++++---------------------- gi/overrides/GLib.py | 13 +++++++++++++ gi/overrides/GObject.py | 2 +- 5 files changed, 38 insertions(+), 68 deletions(-) commit 7372e3c9ecb8e836894c32975eab8c4107ba0b28 Author: Martin Pitt Date: Mon Nov 5 10:14:52 2012 +0100 tests: Do not use deprecated assertRaisesRegexp() Use assertRaisesRegex() instead and provide 2.7 compatibility in tests/runtests.py. tests/runtests.py | 3 +++ tests/test_signal.py | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) commit da2106902eb3dabebdff1674743cb3040566a745 Author: Simon Feltman Date: Sun Nov 4 02:57:29 2012 -0800 Move gobject static functions and constants to gi Replace the following functions with gi and overrides: type_children, type_interfaces, signal_list_ids, signal_list_names, signal_lookup, signal_name, type_parent. Assign SIGNAL_* and PARAM_* from gi SignalFlags and ParamFlags respectively. Move module level assignments of a number of static functions to the GObject.py overrides file. https://bugzilla.gnome.org/show_bug.cgi?id=687487 docs/reference/pygobject-functions.xml | 25 --- gi/_gobject/__init__.py | 72 +-------- gi/_gobject/gobjectmodule.c | 272 --------------------------------- gi/overrides/GObject.py | 208 ++++++++++++++++++++++++- gi/overrides/__init__.py | 5 +- tests/test_signal.py | 11 +- 6 files changed, 215 insertions(+), 378 deletions(-) commit f4acd6a9d14248d459708f61fd01f6d4735f087d Author: Simon Feltman Date: Sun Nov 4 02:52:19 2012 -0800 Make unitests for gobject functions moving to gi more strict Add expected failure test for invalid SystemError's coming from signal_lookup and signal_list_ids. Remove excessive type_name tests and type_from_name tests. https://bugzilla.gnome.org/show_bug.cgi?id=687487 tests/test_gtype.py | 53 ---------------------------------------------------- tests/test_signal.py | 40 ++++++++++++++++++++++++--------------- 2 files changed, 25 insertions(+), 68 deletions(-) commit 3267808318b284814e52f2803b17af56fca648ad Author: Martin Pitt Date: Sat Nov 3 14:17:25 2012 +0100 [API change] Remove static filename_from_utf8() binding Replace static GLib.filename_from_utf8() with GI. The old static binding always tried to convert the result to an Unicode object, which will fail if the result is not UTF-8 encoded (which is the whole point of this function really!), so return bytes now. Although the static binding was rather useless before, this is technically an API break. docs/reference/pyglib-functions.xml | 32 -------------------------------- gi/_glib/__init__.py | 1 - gi/_glib/glibmodule.c | 26 -------------------------- gi/_gobject/__init__.py | 1 - gi/overrides/GLib.py | 8 ++++++++ gi/overrides/GObject.py | 3 ++- tests/test_glib.py | 8 ++++++++ 7 files changed, 18 insertions(+), 61 deletions(-) commit 8d52bceb1e0aa0dc79cf77f36dda9f953f170459 Author: Martin Pitt Date: Sat Nov 3 13:14:15 2012 +0100 Drop static glib_version and pyglib_version constants Use the GLib version from GI instead, and the already existing gi.version_info. docs/reference/pyglib-constants.xml | 50 ---------------------------------- docs/reference/pygobject-constants.xml | 19 ------------- gi/_glib/__init__.py | 2 -- gi/_glib/glibmodule.c | 21 -------------- gi/_gobject/__init__.py | 1 - gi/overrides/GLib.py | 8 +++++- gi/overrides/GObject.py | 3 +- tests/test_glib.py | 12 ++++++++ 8 files changed, 21 insertions(+), 95 deletions(-) commit 9f96325e75f7c5f88789ea3f74a068e73cfde1a2 Author: Martin Pitt Date: Sat Nov 3 12:12:44 2012 +0100 Drop static G_MININT8 and related constants Use the introspected constants from GLib instead. gi/_gobject/__init__.py | 12 ------------ gi/_gobject/constants.py | 12 ------------ gi/_gobject/gobjectmodule.c | 18 +----------------- gi/overrides/GObject.py | 17 +++++++++++++++++ tests/test_gobject.py | 4 ++++ 5 files changed, 22 insertions(+), 41 deletions(-) commit 3354c4eda0f098d1a8f744264ef9a2565a38b50d Author: Martin Pitt Date: Sat Nov 3 11:58:40 2012 +0100 test_gobject: Add test case for min/max int constants Related to https://bugzilla.gnome.org/show_bug.cgi?id=685022 tests/test_gobject.py | 9 +++++++++ 1 file changed, 9 insertions(+) commit d70cb32789e057fe5a16e61a0cce77d9c54a3ee1 Author: Jose Rostagno Date: Sat Oct 27 15:37:32 2012 -0300 Use g_object_info_find_signal() Replace our custom code with a call to the corresponding gobject-instrospection function. https://bugzilla.gnome.org/show_bug.cgi?id=687371 gi/pygi-signal-closure.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) commit ae6d0aada9587cd4dca168375527b80785b604a0 Author: Martin Pitt Date: Sat Nov 3 11:23:06 2012 +0100 GLib overrides: code cleanup Factorize the logic to handle zero or multiple user_data arguments into user_data_varargs_shim(), and put code that handles deprecated API into the corresponding "then" branches, to improve readability. gi/overrides/GLib.py | 87 ++++++++++++++++++++++++++++------------------------ 1 file changed, 47 insertions(+), 40 deletions(-) commit d7f095b01e7208273703c880f4f0dfcc1a152a9a Author: Martin Pitt Date: Sat Nov 3 09:33:08 2012 +0100 Restore actual GLib API after previous fix Re-fix the acceptance of priority as first argument for idle_add(), io_add_watch() and timeout_add(), as that is the real GLib API. Ensure that this keeps supporting the backwards compatible API with supplying multiple user data arguments. https://bugzilla.gnome.org/show_bug.cgi?id=687047 gi/overrides/GLib.py | 117 +++++++++++++++++++++++++----------------------- tests/test_iochannel.py | 74 +++++++++++++++++++++++++++--- tests/test_source.py | 30 +++++++++++++ 3 files changed, 158 insertions(+), 63 deletions(-) commit 648b653d85bf3bc28dc59c6d309f15d388076af9 Author: Simon Feltman Date: Fri Nov 2 21:01:38 2012 -0700 Add unittests for module level type and signal functions Add tests for the following methods: signal_list_ids, signal_name, signal_lookup, signal_query, type_children, type_from_name, type_name, type_is_a, and type_interfaces. https://bugzilla.gnome.org/show_bug.cgi?id=687487 tests/Makefile.am | 1 + tests/test_gtype.py | 106 +++++++++++++++++++++++++++++++++++++++++++++++++++ tests/test_signal.py | 43 +++++++++++++++++++++ 3 files changed, 150 insertions(+) commit 80db2a50feab9898d7c5f88ea27aadc3dfb5bec3 Author: Simon Feltman Date: Tue Oct 30 18:33:44 2012 -0700 Fix GLib override incompatibilities with old static API Change idle_add, timeout_add, timeout_add_seconds, and io_add_watch to accept *args and **kwargs as arguments to the callback functions instead of only accepting a single user_data arg. This ensures the new overridden introspection methods are backwards compatible with the static versions they replaced. https://bugzilla.gnome.org/show_bug.cgi?id=687047 gi/overrides/GLib.py | 98 ++++++++++++++++++++++++++++--------------------- tests/test_iochannel.py | 37 +++++++++++++++++-- 2 files changed, 90 insertions(+), 45 deletions(-) commit 9c6399bbf75c312b1ef4933d079712ea5b05a935 Author: Simon Feltman Date: Tue Oct 30 12:01:44 2012 -0700 Fix IOChannel unittests for python 2.7 Use __future__ unicode_literals to minimize difference between python 2.7 and 3. Comparisons need to encode arguments as 'UTF-8' for testing readline operations. Add backwards compatible "next" to support the python 2.7 iteration. Change isinstance(channel, file) to hasattr(channel, 'fileno') to support all python versions (and duck typing). https://bugzilla.gnome.org/show_bug.cgi?id=687047 gi/overrides/GLib.py | 4 +++- tests/test_iochannel.py | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) commit 0f94a0a4ebd2bbfd06d8f9a2bb2b17dabf7678ef Author: Martin Pitt Date: Mon Oct 29 23:00:31 2012 +0100 Allow calling io_add_watch with a file object The old static bindings allowed that, so we need to allow it to maintain backwards compatibility. Deprecate this mode as well, so that we can get rid of it at some point. https://bugzilla.gnome.org/show_bug.cgi?id=687047 gi/overrides/GLib.py | 7 +++++++ tests/test_glib.py | 26 ++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) commit 3ba67fd41944309077eb81c4c03397519ed29dc4 Author: John Ralls Date: Mon Oct 29 14:57:22 2012 -0700 Fix duplicate symbols error on OSX gi/pygi-source.c | 1 + 1 file changed, 1 insertion(+) commit 5a367aa067e369f2b1e713199614e3426fecc10e Author: Martin Pitt Date: Sun Oct 28 17:42:34 2012 +0100 Drop removed markup-escape-text() from reference documentation docs/reference/pyglib-functions.xml | 36 ------------------------------------ 1 file changed, 36 deletions(-) commit 057b3d3791e6f1947004f2482c0ae40529de03ae Author: Martin Pitt Date: Sun Oct 28 17:41:03 2012 +0100 Drop some dead code from gi/_glib/glibmodule.c gi/_glib/glibmodule.c | 45 --------------------------------------------- 1 file changed, 45 deletions(-) commit 7b12803bce3418bb487127f497f022c973f35888 Author: Martin Pitt Date: Sun Oct 28 17:37:29 2012 +0100 Remove static get_current_time() binding Use GLib.get_real_time() through GI instead. Deprecate the function, as GLib.get_real_time() should be called directly. docs/reference/pyglib-functions.xml | 26 -------------------------- gi/_glib/__init__.py | 1 - gi/_glib/glibmodule.c | 11 ----------- gi/_glib/pyglib.c | 16 ---------------- gi/_glib/pyglib.h | 1 - gi/_gobject/__init__.py | 1 - gi/overrides/GLib.py | 8 ++++++++ gi/overrides/GObject.py | 2 +- tests/test_glib.py | 6 +++++- 9 files changed, 14 insertions(+), 58 deletions(-) commit b3dfb780b3a74f6933e3afcd2ba512b36dfbe514 Author: Martin Pitt Date: Sun Oct 28 17:23:23 2012 +0100 Add more tests for GLib.spawn_async() Check spawn_async() with getting stdin/out/err pipes and specifying envp. tests/test_subprocess.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 70d78eee4a04dcaefea4615fe351e33fa717dffa Author: Martin Pitt Date: Sun Oct 28 14:15:05 2012 +0100 Remove static child_add_watch() binding Use the GLib API through GI instead, and provide override to keep backwards compatible API. Also allow using the actual GLib API, and deprecate the old static API of calling without a priority as first argument. docs/reference/pyglib-functions.xml | 61 --------------------------- gi/_glib/__init__.py | 1 - gi/_glib/glibmodule.c | 72 ------------------------------- gi/_gobject/__init__.py | 1 - gi/overrides/GLib.py | 46 ++++++++++++++++++++ gi/overrides/GObject.py | 2 +- tests/test_mainloop.py | 2 +- tests/test_subprocess.py | 84 ++++++++++++++++++++++++++++++++++--- 8 files changed, 127 insertions(+), 142 deletions(-) commit 4b16427714b850e33c6020d8de1833bae19a3b87 Author: Martin Pitt Date: Sun Oct 28 13:44:23 2012 +0100 test_subprocess: Cover more child_watch_add() cases Verify that priority is set correctly, and also test calling without userdata. tests/test_subprocess.py | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) commit 83ff5938612d37d52f112867a472777dd6786d69 Author: Colin Walters Date: Sat Oct 27 12:22:53 2012 -0400 gi/__init__.py: Pacify pep8 style checker It was complaining about finding only 1 blank line. Regression likely introduced by f976d05b. https://bugzilla.gnome.org/show_bug.cgi?id=686991 gi/__init__.py | 1 + 1 file changed, 1 insertion(+) commit f976d05b04f26e733d19988e68989e340eb3a29e Author: Martin Pitt Date: Fri Oct 26 10:39:28 2012 +0200 Use a custom deprecation warning to make them visible by default DeprecationWarning is not shown by default, and is thus rather useless for developers. Use a custom PyGIDeprecationWarning class and derive it from RuntimeWarning to make it visible. gi/__init__.py | 5 +++++ gi/overrides/GLib.py | 5 +++-- gi/overrides/Gtk.py | 5 +++-- gi/overrides/__init__.py | 4 ++-- gi/pygtkcompat.py | 4 ++-- tests/Makefile.am | 2 +- tests/test_glib.py | 5 +++-- tests/test_gobject.py | 3 ++- tests/test_iochannel.py | 5 +++-- tests/test_source.py | 3 ++- 10 files changed, 26 insertions(+), 15 deletions(-) commit 366f5d2d3902c6293d0031e0b7dc5d6641a05ac7 Author: Martin Pitt Date: Fri Oct 26 09:26:17 2012 +0200 Remove static io_add_watch() binding Use the GLib API through GI instead, and provide override to keep backwards compatible API. Also allow using the actual GLib API, and deprecate all other variants: - calling with an fd as first argument instead of an IOChannel - calling without a priority as second argument docs/reference/pyglib-functions.xml | 106 ------------------------------------ gi/_glib/__init__.py | 1 - gi/_glib/glibmodule.c | 98 --------------------------------- gi/_gobject/__init__.py | 1 - gi/overrides/GLib.py | 51 ++++++++++++++--- gi/overrides/GObject.py | 3 +- tests/test_glib.py | 15 ++++- tests/test_iochannel.py | 70 +++++++++++++++++++++++- 8 files changed, 126 insertions(+), 219 deletions(-) commit 284de1eb5c37a3f6caa7d846dbd439f1eac410a2 Author: Martin Pitt Date: Fri Oct 26 08:48:35 2012 +0200 Add tests for GLib.io_add_watch() tests/test_glib.py | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 15e717ce2c2a26c02c913f79bc7cf6876d943e92 Author: Martin Pitt Date: Thu Oct 25 15:55:46 2012 +0200 Remove static GIOChannel bindings Use the GLib API through GI instead, and provide overrides to keep backwards compatible API, including its bugs. We still need to keep a static wrapper around g_io_channel_read_chars() until we teach PyGObject to correctly handle caller allocated out array arguments. https://bugzilla.gnome.org/show_bug.cgi?id=686795 gi/_glib/Makefile.am | 2 - gi/_glib/__init__.py | 1 - gi/_glib/glibmodule.c | 2 - gi/_glib/pygiochannel.c | 748 ------------------------------------------------ gi/_glib/pygiochannel.h | 29 -- gi/_gobject/__init__.py | 1 - gi/gimodule.c | 72 +++++ gi/overrides/GLib.py | 95 +++++- 8 files changed, 161 insertions(+), 789 deletions(-) commit 0bfa6b44b808d9f8f55199216c29c1aec96c7719 Author: Martin Pitt Date: Thu Oct 25 12:59:46 2012 +0200 test_iochannel.py: Fix data type of IOFlags ~GLib.IOFlags.NONBLOCK yields an int instead of a GLib.IOFlags, so ensure that the result is of type GLib.IOFlags again. tests/test_iochannel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 25d12afd06863ce223a161ba1317bfe5503bca5c Author: Martin Pitt Date: Thu Oct 25 08:24:31 2012 +0200 Add environment variable to disable pep8 checks pep8 takes quite long for "make check". Skip it if $SKIP_PEP8 is set, which makes the test/fix turnaround time faster. tests/Makefile.am | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e9624ed1d38c777de2b430e3b0fbae2acbf34956 Author: Simon Feltman Date: Wed Oct 24 04:31:26 2012 -0700 [API add] Add get_introspection_module for getting un-overridden modules Add gi.module.get_introspection_module to explicitly get a wrapped module pulled in through introspection without static and python override handling. This API is intended for python overrides to use rather than having them access gi.importer.modules['']._introspection_module directly. Replace aforementioned usage in all overrides. https://bugzilla.gnome.org/show_bug.cgi?id=686828 gi/module.py | 38 +++++++++++++++++++++++++++++++++++--- gi/overrides/GIMarshallingTests.py | 4 ++-- gi/overrides/GLib.py | 4 ++-- gi/overrides/Gdk.py | 6 +++--- gi/overrides/Gio.py | 4 ++-- gi/overrides/Gtk.py | 5 +++-- gi/overrides/Pango.py | 4 ++-- tests/test_overrides.py | 29 +++++++++++++++++++++++++++++ 8 files changed, 78 insertions(+), 16 deletions(-) commit e6e047ef9b8575c852b3cdc3f5d4dfbb548cc648 Author: Martin Pitt Date: Wed Oct 24 15:16:13 2012 +0200 test_option: Use public API Use GLib.option, not gi._glib.option. tests/test_option.py | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) commit 6a586af41b8740c4ba590591d1068d80071ff2dc Author: Martin Pitt Date: Wed Oct 24 14:12:05 2012 +0200 Drop static SPAWN_* constants Use the introspected constants instead, which are identical. Add backwards compatible aliases. These constants are covered by tests/test_subprocess.py. https://bugzilla.gnome.org/show_bug.cgi?id=686765 docs/reference/pyglib-constants.xml | 68 ---------------------------------- docs/reference/pyglib-functions.xml | 26 ++++++------- docs/reference/pygobject-constants.xml | 67 --------------------------------- gi/_glib/__init__.py | 7 ---- gi/_glib/glibmodule.c | 15 -------- gi/_gobject/__init__.py | 7 ---- gi/overrides/GLib.py | 6 +++ gi/overrides/GObject.py | 6 ++- tests/test_subprocess.py | 6 ++- 9 files changed, 29 insertions(+), 179 deletions(-) commit 0137a7af7bf69421e0c8e94120a1f8cff01fbeea Author: Martin Pitt Date: Wed Oct 24 13:59:31 2012 +0200 Drop static IO_* constants Use the introspected constants instead, which are identical. Add backwards compatible aliases. These constants are covered by tests/test_iochannel.py. docs/reference/pyglib-constants.xml | 52 ------------------------------------- gi/_glib/__init__.py | 19 -------------- gi/_glib/glibmodule.c | 32 ----------------------- gi/_gobject/__init__.py | 18 ------------- gi/overrides/GLib.py | 18 ++++++++++++- gi/overrides/GObject.py | 8 +++++- tests/test_iochannel.py | 1 + tests/test_source.py | 2 +- 8 files changed, 26 insertions(+), 124 deletions(-) commit 0e1a6ccee45ae2239da1c44de1866596343165ba Author: Martin Pitt Date: Wed Oct 24 12:50:50 2012 +0200 Fix various bugs in GLib.IOChannel - Fix segfault when using an IOChannel as an iterator: PyIter_Next() returns NULL on the last element, instead of raising a StopIteration. - The default encoding of a stream is 'UTF-8', not NULL. NULL means that the stream is being used in binary mode; in that case, we should not attempt to do any automagic conversion to an Unicode object. As this special case is inconsistent and has never worked anyway, and the current buggy implementation breaks binary streams, just drop it without replacement. (Introduced in commit de9eae4dfcce8) These bugs were uncovered by the previously committed tests. gi/_glib/pygiochannel.c | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) commit a98c37937a4f7cb81a0b02c023d12097f386a22c Author: Martin Pitt Date: Wed Oct 24 12:49:04 2012 +0200 Add tests for GLib.IOChannel This did not have any code coverage at all. The tests uncover a range of bugs, which will be fixed in the next commit. tests/Makefile.am | 1 + tests/test_iochannel.py | 262 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 263 insertions(+) commit 1b27432abf6004553e9476d5ffeb2bf603534419 Author: Martin Pitt Date: Wed Oct 24 08:50:37 2012 +0200 Remove static idle_add/timeout_add bindings Use the GLib functions through GI instead. Add overrides to ensure that default arguments continue to work as before, and that callbacks are called without an userdata argument if it wasn't specified. docs/reference/pyglib-functions.xml | 165 ------------------------------------ gi/_glib/__init__.py | 3 - gi/_glib/glibmodule.c | 139 ------------------------------ gi/_gobject/__init__.py | 3 - gi/overrides/GLib.py | 31 +++++++ gi/overrides/GObject.py | 3 +- tests/test_source.py | 19 +++++ 7 files changed, 52 insertions(+), 311 deletions(-) commit 2357f4a0237feabcf6886f2a448aa3f42f6781b9 Author: Martin Pitt Date: Wed Oct 24 09:14:57 2012 +0200 Add tests for priority argument of idle_add/timeout_add There is a potential to treat the priority as user data in a call like "GLib.idle_add(cb, GLib.PRIORITY_HIGH)". The current static bindings force using a keyword argument for the priority (but silently ignore it if you specify both userdata and priority as a positional argument). Test the correct handling of priority as well. tests/test_source.py | 63 ++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 59 insertions(+), 4 deletions(-) commit dceb4d60e210cb1531ad81935733a3f0be0c8edb Author: Martin Pitt Date: Wed Oct 24 08:40:50 2012 +0200 Drop old ChangeLog.pre-2.18 This is ancient by now, quite sizable, and the complete history can always be seen in the git log. ChangeLog.pre-2.18 | 3608 ---------------------------------------------------- Makefile.am | 1 - 2 files changed, 3609 deletions(-) commit 127ef91f1563caa346bc2ac2adb064487a84e6a0 Author: Martin Pitt Date: Wed Oct 24 08:39:05 2012 +0200 Fix PEP-8 whitespace in previous commit tests/test_source.py | 4 ++++ 1 file changed, 4 insertions(+) commit 0bc0b55be0dae7528c2fc7439d672ad4e417335d Author: Martin Pitt Date: Wed Oct 24 08:33:49 2012 +0200 Add tests for idle_add()/timeout_add with and without user data This is implicitly spread over various test cases, but let's test it explicitly to ensure that the behaviour stays consistent when moving this to GI. tests/test_source.py | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit d0a0332feb7946f4bb6b43211d6fe3ae67e7dba5 Author: Martin Pitt Date: Wed Oct 24 08:05:43 2012 +0200 tests: consitent naming style Stop mixing camel case and underline naming, use the latter consistently in all tests. tests/test_gobject.py | 64 +++++++++++++++++++++++------------------------ tests/test_interface.py | 4 +-- tests/test_option.py | 14 +++++------ tests/test_pygtkcompat.py | 32 ++++++++++++------------ tests/test_signal.py | 10 ++++---- tests/test_source.py | 23 ++++++++--------- tests/test_subprocess.py | 2 +- tests/test_thread.py | 2 +- tests/test_unknown.py | 2 +- 9 files changed, 76 insertions(+), 77 deletions(-) commit 4b460e2eb18b8340fe99252063fdb08b0c222968 Author: Martin Pitt Date: Wed Oct 24 07:28:10 2012 +0200 Work around wrong 64 bit constants in GLib Gir GLib's gir currently has wrong constants for MININT64 and MAXUINT64; explicitly set them in an override, until this gets fixed properly. https://bugzilla.gnome.org/show_bug.cgi?id=685022 gi/overrides/GLib.py | 8 ++++++++ tests/test_gi.py | 9 +++++++++ 2 files changed, 17 insertions(+) commit f30efd2619911c89ca873fac6bec06a1b60fab82 Author: Martin Pitt Date: Tue Oct 23 13:32:14 2012 +0200 Mark GLib.Source.get_current_time() as deprecated This method has been deprecated in GLib long ago. We have a workaround implementation using GLib.get_real_time(), but eventually this should go away. gi/overrides/GLib.py | 5 ++++- tests/test_source.py | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) commit 483c86267f2623eaa88d6a9e685c96ec3ba4f121 Author: Martin Pitt Date: Tue Oct 23 08:56:19 2012 +0200 Mark GLib API that is exposed in GObject as deprecated A lot of API in GObject really belongs into GLib and is just there for historical/backwards compatible reasons. Mark these methods as deprecated so that at some point we can drop them. gi/overrides/GObject.py | 3 ++- gi/overrides/__init__.py | 13 +++++++++++++ tests/test_gobject.py | 24 ++++++++++++++---------- 3 files changed, 29 insertions(+), 11 deletions(-) commit 191cf45af44850fc29f2392ae2f0042aed6d13a9 Author: Martin Pitt Date: Fri Oct 19 09:55:05 2012 +0200 Remove static MainLoop, MainContext, and some GSource bindings glib's MainLoop and MainContext are fully introspectable these days, so remove our static bindings. This reduces our code, as well enables GLib API which hasn't been available through the static bindings before. This also requires dropping our custom static types for GLib Source, Timeout, and Idle. The latter two work fine with introspection and just need tiny overrides for a backwards compatible API. g_source_new() is not introspectable, though, so we need to keep our static wrappers for that. Move them from gi/_glib/pygsource.c to gi/pygi-source.c, so that it can use the GI API. Note that gi/_glib/pygsource.[hc] is still required for the static PollFD type which is used by the static IOChannel binding. Once the latter goes away, PollFD can be dropped as well. https://bugzilla.gnome.org/show_bug.cgi?id=686443 docs/Makefile.am | 6 +- docs/reference/pyglib-classes.xml | 2 - docs/reference/pyglib-constants.xml | 53 --- docs/reference/pyglib-functions.xml | 58 --- docs/reference/pyglib-maincontext.xml | 152 -------- docs/reference/pyglib-mainloop.xml | 202 ----------- gi/Makefile.am | 2 + gi/_glib/Makefile.am | 4 - gi/_glib/__init__.py | 12 - gi/_glib/glibmodule.c | 45 +-- gi/_glib/pyglib.c | 15 - gi/_glib/pyglib.h | 1 - gi/_glib/pygmaincontext.c | 126 ------- gi/_glib/pygmaincontext.h | 40 --- gi/_glib/pygmainloop.c | 362 ------------------- gi/_glib/pygmainloop.h | 36 -- gi/_glib/pygsource.c | 640 ---------------------------------- gi/_glib/pygsource.h | 3 - gi/_gobject/__init__.py | 13 - gi/gimodule.c | 9 + gi/overrides/GLib.py | 116 +++++- gi/overrides/GObject.py | 10 +- gi/pygi-private.h | 1 + gi/pygi-source.c | 247 +++++++++++++ gi/pygi-source.h | 31 ++ tests/test_glib.py | 22 +- tests/test_gobject.py | 2 + tests/test_source.py | 3 - 28 files changed, 437 insertions(+), 1776 deletions(-) commit 326218a20681c1f2234a6eea1ed800382be57626 Author: Simon Feltman Date: Wed Sep 19 15:37:14 2012 -0700 Deprecate void pointer fields as general PyObject storage. Complete deprecation of gpointer struct fields as general PyObject storage. Only int types are now allowed. Assignment of anything other than an int or None raises a TypeError stating the error and associated bug URL. https://bugzilla.gnome.org/show_bug.cgi?id=683599 gi/pygi-argument.c | 25 ++++++++++++++++----- gi/pygi-info.c | 28 ++++-------------------- tests/test_everything.py | 53 +++++++++++++++++++++++++-------------------- tests/test_overrides_gtk.py | 41 ----------------------------------- 4 files changed, 54 insertions(+), 93 deletions(-) commit 3dba328010a4ffd9259700ffec95871c7341d491 Author: Martin Pitt Date: Tue Oct 23 11:59:08 2012 +0200 Add some MainLoop, MainContext, and Source test cases These cover the remaining static API and behaviour, so that we have good regression tests for converting them to GI. See https://bugzilla.gnome.org/show_bug.cgi?id=686443 tests/test_glib.py | 21 +++++++++++++++++++++ tests/test_gobject.py | 11 +++++++++++ tests/test_mainloop.py | 16 ++++++++++++++++ tests/test_source.py | 44 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 92 insertions(+) commit 7635340271df0a135873459e6a2a365fd4b187a2 Author: Steve Frécinaux Date: Wed Feb 9 18:37:33 2011 +0100 [API change] Do not bind gobject_get_data() and gobject_set_data() They will basically cause a crash if misused, and you can always use a python member attribute instead. These methods were marked as deprecated for 3.4 and throwing a warning, so let's remove them for good now. https://bugzilla.gnome.org/show_bug.cgi?id=641944 Co-Authored-By: Martin Pitt docs/reference/pygobject.xml | 63 -------------------------------------------- gi/_gobject/pygobject.c | 44 ------------------------------- 2 files changed, 107 deletions(-) commit cfec113e3b3eabf8db834f48b2f16792d1e841a3 Author: Martin Pitt Date: Tue Oct 23 08:17:40 2012 +0200 Add test for GLib.get_current_time() This adds a plausibility test, as well as ensuring the documented return type. This will be useful if/once we drop the static _glib binding. tests/test_glib.py | 5 +++++ 1 file changed, 5 insertions(+) commit fb473b31054744e5ab59e9d4ed3b74571e27d3ff Author: Martin Pitt Date: Tue Oct 23 07:48:52 2012 +0200 Drop unnecessary static _glib bindings Drop static pyglib bindings which have straightforward and working GLib GI bindings. Add tests for all dropped functions to ensure they keep working. docs/reference/pyglib-constants.xml | 59 ------- docs/reference/pyglib-functions.xml | 270 ------------------------------ gi/_glib/__init__.py | 24 --- gi/_glib/glibmodule.c | 319 ------------------------------------ gi/_gobject/__init__.py | 9 - gi/overrides/GLib.py | 16 ++ gi/overrides/GObject.py | 32 ++++ gi/overrides/Makefile.am | 1 + tests/Makefile.am | 1 - tests/test_glib.py | 46 ++++++ tests/test_gobject.py | 4 + tests/test_uris.py | 16 -- 12 files changed, 99 insertions(+), 698 deletions(-) commit 126a10f765af3d3a6f08ce5db7ed9f3ef647848f Author: Martin Pitt Date: Tue Oct 23 06:12:08 2012 +0200 Fix OverflowError in source_remove() GSource IDs are unsigned, so we must use 'I' for parsing then, not 'i'. https://bugzilla.gnome.org/show_bug.cgi?id=684526 gi/_glib/glibmodule.c | 2 +- tests/test_source.py | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) commit 15f7442bd0c45db25073e3d8494094f1c284ffa4 Author: Martin Pitt Date: Mon Oct 22 13:38:23 2012 +0200 Fix TestSource.testSources() test case PyGObject has established the assumption that the destruction of a GLib.Source Python object does not destroy the actual GSource, as shown in TestSource.setup_timeout(), TestTimeout.test504337(), and https://bugzilla.gnome.org/show_bug.cgi?id=504337. So we need to explicitly destroy our MySource and Idle objects after using them, as their callbacks always return True and we do not want them to spill over into other tests. Also fix the assertions to actually verify that MySources' callback was callied (pos > 0, not pos >= 0), and use the unittest comparison API instead of a simple assert statement. https://bugzilla.gnome.org/show_bug.cgi?id=686627 tests/test_source.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit b984a5fe0d065818a153f259db4dbde79534f084 Author: Martin Pitt Date: Mon Oct 22 17:38:56 2012 +0200 configure.ac: post-release bump to 3.7.2 configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)