- 03 Nov, 2012 7 commits
-
-
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 15 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.
-
Martin Pitt authored
This did not have any code coverage at all. The tests uncover a range of bugs, which will be fixed in the next commit.
-
Martin Pitt authored
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.
-
Martin Pitt authored
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.
-
Martin Pitt authored
This is ancient by now, quite sizable, and the complete history can always be seen in the git log.
-
Martin Pitt authored
-
Martin Pitt authored
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.
-
Martin Pitt authored
Stop mixing camel case and underline naming, use the latter consistently in all tests.
-
Martin Pitt authored
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
-
Martin Pitt authored
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.
-
Martin Pitt authored
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.
-
Martin Pitt authored
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
-