- 05 Nov, 2012 10 commits
-
-
Martin Pitt authored
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
-
Jose Rostagno authored
PYGLIB_*_VERSION are not used anywhere any more, remove those. (dropped in commit 8d52bceb)
-
Martin Pitt authored
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.
-
Martin Pitt authored
-
Simon Feltman authored
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
-
Martin Pitt authored
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.
-
Martin Pitt authored
Drop static definitions of GLib.OPTION_* constants and use the ones from GI instead. https://bugzilla.gnome.org/show_bug.cgi?id=686765
-
Martin Pitt authored
Use assertRaisesRegex() instead and provide 2.7 compatibility in tests/runtests.py.
-
Simon Feltman authored
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
-
Simon Feltman authored
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
-
- 03 Nov, 2012 8 commits
-
-
Martin Pitt authored
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.
-
Martin Pitt authored
Use the GLib version from GI instead, and the already existing gi.version_info.
-
Martin Pitt authored
Use the introspected constants from GLib instead.
-
Martin Pitt authored
Related to https://bugzilla.gnome.org/show_bug.cgi?id=685022
-
Jose Rostagno authored
Replace our custom code with a call to the corresponding gobject-instrospection function. https://bugzilla.gnome.org/show_bug.cgi?id=687371
-
Martin Pitt authored
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.
-
Martin Pitt authored
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
-
Simon Feltman authored
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
-
- 31 Oct, 2012 2 commits
-
-
Simon Feltman authored
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
-
Simon Feltman authored
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
-
- 29 Oct, 2012 2 commits
-
-
Martin Pitt authored
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
-
John Ralls authored
-
- 28 Oct, 2012 6 commits
-
-
Martin Pitt authored
-
Martin Pitt authored
-
Martin Pitt authored
Use GLib.get_real_time() through GI instead. Deprecate the function, as GLib.get_real_time() should be called directly.
-
Martin Pitt authored
Check spawn_async() with getting stdin/out/err pipes and specifying envp.
-
Martin Pitt authored
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.
-
Martin Pitt authored
Verify that priority is set correctly, and also test calling without userdata.
-
- 27 Oct, 2012 1 commit
-
-
Colin Walters authored
It was complaining about finding only 1 blank line. Regression likely introduced by f976d05b. https://bugzilla.gnome.org/show_bug.cgi?id=686991
-
- 26 Oct, 2012 3 commits
-
-
Martin Pitt authored
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.
-
Martin Pitt authored
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
-
Martin Pitt authored
-
- 25 Oct, 2012 4 commits
-
-
Martin Pitt authored
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
-
Martin Pitt authored
~GLib.IOFlags.NONBLOCK yields an int instead of a GLib.IOFlags, so ensure that the result is of type GLib.IOFlags again.
-
Martin Pitt authored
pep8 takes quite long for "make check". Skip it if $SKIP_PEP8 is set, which makes the test/fix turnaround time faster.
-
Simon Feltman authored
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['<name>']._introspection_module directly. Replace aforementioned usage in all overrides. https://bugzilla.gnome.org/show_bug.cgi?id=686828
-
- 24 Oct, 2012 4 commits
-
-
Martin Pitt authored
Use GLib.option, not gi._glib.option.
-
Martin Pitt authored
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
-
Martin Pitt authored
Use the introspected constants instead, which are identical. Add backwards compatible aliases. These constants are covered by tests/test_iochannel.py.
-
Martin Pitt authored
- 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 de9eae4d) These bugs were uncovered by the previously committed tests.
-