summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* tests: Remove PyPy fixme that appears to be workingbenzea/tmpBenjamin Berg2021-12-291-1/+0
| | | | | The test_gvalue_gobject_ref_counts appears to be working just fine these days.
* hashtable: Fix refcount of key/value in error case when marshallingBenjamin Berg2021-12-291-2/+0
| | | | | | | PyList_GET_ITEM only returns a borrowed reference. In the unlikely event of an error converting the key or value, the reference would be unintentionally decremented. This could cause random failures later on (and was indeed causing the PyPy test to fail randomly later on).
* gi: Fix GArray length calculation for other item sizesBenjamin Berg2021-12-293-5/+28
|
* tests: Add some override integration testsBenjamin Berg2021-12-291-1/+83
|
* overrides: Add EventLoop integration points into overridesBenjamin Berg2021-12-295-9/+62
| | | | | | | | This adds EventLoop integration in order to mark the event loop as running when a main context iterating API is called. Note that for the simple APIs to only do one iteration the EventLoop is paused (i.e. it will not dispatch). No one should do this, but it might happen when e.g. porting and this should create a well-defined behaviour.
* tests: Add tests for awaitable return of async routinesBenjamin Berg2021-12-291-0/+201
|
* events: Implement asyncio event loop based on glibBenjamin Berg2021-12-293-0/+684
|
* gimodule: Expose PyOS_setsig for asyncio eventloopBenjamin Berg2021-12-292-0/+14
|
* invoke: Create async helper when needed and marshal it for callbacksBenjamin Berg2021-12-291-3/+48
| | | | | | Note that a cancellable will implicitly be created so that the awaitable can be cancelled. If a cancellable is given, then this cancellable will be used instead.
* closure: Marshal async callback handler if a default value is passedBenjamin Berg2021-12-293-0/+25
| | | | | | | | Default values will usually not be marshaled, as such, this can be used to flag that the async routine needs marshalling. This is a bit backward in a way, but avoids having to expose the closure information to the rest of the code.
* cache: Resolve and store information about async functionsBenjamin Berg2021-12-293-0/+93
| | | | | | | This also resolves information about async functions in a generic and safe way. The corresponding _finish function will be stored for later reference and an attribute is added to cache the return object type for an async function.
* async: Add a new async type that is an awaitable for a _finish callBenjamin Berg2021-12-294-0/+728
|
* gimodule: fix floating state of python objects created with g_object_newMathieu Duponchelle2021-12-061-3/+12
| | | | | | | | | | If C code calls g_object_new() for a GInitiallyUnowned subclass implemented in python, the expectation is to receive a floating reference. The solution is used is the same picked for 5efe2e5c8458d9f4d72329ea1209d96b5ebecfb4, this is simply a special case that was omitted at the time.
* Add .venv to .gitignoreChristoph Reiter2021-09-191-0/+1
|
* Use quark variable for class on gtypeArjan Molenaar2021-09-191-1/+1
|
* replace gpointer by more specific typesArjan Molenaar2021-09-192-6/+4
|
* Do not error out for unknown scopesEmmanuele Bassi2021-09-191-2/+4
| | | | | | If gobject-introspection adds a new scope that we do not handle, we should definitely not error out. Printing out a critical warning and asking to file an issue should be enough.
* Implement DynamicImporter.find_spec()Miro Hrončok2021-09-191-5/+10
| | | | | | | | | | | | | | | | | | | | | | On Python 3.10, the code raised an ImportWarning: ImportWarning: DynamicImporter.find_spec() not found; falling back to find_module() See https://docs.python.org/3.10/whatsnew/3.10.html#deprecated > Starting in this release, there will be a concerted effort to begin cleaning > up old import semantics that were kept for Python 2.7 compatibility. > Specifically, find_loader()/find_module() (superseded by find_spec()), > load_module() (superseded by exec_module()), module_repr() > (which the import system takes care of for you), > the __package__ attribute (superseded by __spec__.parent), > the __loader__ attribute (superseded by __spec__.loader), > and the __cached__ attribute (superseded by __spec__.cached) > will slowly be removed (as well as other classes and methods in importlib). > ImportWarning and/or DeprecationWarning will be raised as appropriate to help > identify code which needs updating during this transition. Fixes https://gitlab.gnome.org/GNOME/pygobject/-/issues/473
* gtk overrides: restore Gtk.ListStore.insert_with_valuesv with newer gtk4Christoph Reiter2021-09-193-3/+25
| | | | | | | | It got renamed in gtk 4.1.0, see https://gitlab.gnome.org/GNOME/gtk/-/commit/a1216599ff6b39bca3e936fbf To avoid an API break and make porting easier provide both versions for all users. Fixes #467
* tests: silence a deprecation warning with newer glibChristoph Reiter2021-09-191-2/+4
|
* poetry: add support for sphinx v4 and sphinx-rtd-theme v1Christoph Reiter2021-09-191-2/+2
| | | | Tested with 4.2 and 1.0 and things loog good
* Drop support for Python 3.6Christoph Reiter2021-09-199-16/+10
| | | | | | It will be EOL before the next release. This means Ubuntu 18.04 (without backports) is no longer supported, we will move to Debian Buster as the new oldest tested target.
* CI: Update all Python versions and add 3.10Christoph Reiter2021-09-193-15/+21
|
* version bumpChristoph Reiter2021-09-193-3/+3
|
* release3.42.0Christoph Reiter2021-09-194-3/+14
|
* `cairo-gobject-devel` is needed for FedoraAnatoli Babenia2021-08-231-1/+1
|
* Fix a couple of memory leaks in the testsDavid King2021-08-231-2/+4
| | | | | | Found by Coverity. https://bugzilla.redhat.com/show_bug.cgi?id=1938851
* Fix some small memory leaksDavid King2021-08-232-1/+5
| | | | | | Found by Coverity. https://bugzilla.redhat.com/show_bug.cgi?id=1938851
* ci: Limit depth of subprojects when cloningPhilip Withnall2021-06-074-0/+4
| | | | | | | | | Use the depth= argument from Meson 0.52 to limit the clone depth of subprojects to 1. This should make the CI images a little smaller, and reduce the bandwidth required to build them (although that’s not so important because it only happens once every few months). Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
* subprojects: Use GLib main branchPhilip Withnall2021-06-071-1/+1
| | | | | | | | GLib upstream has renamed its `master` branch to `main`. See https://gitlab.gnome.org/GNOME/glib/-/issues/2348. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
* Add poetry supportChristoph Reiter2021-04-302-0/+18
|
* docs: add an example of using a subclass in a UI definitionChris Mayo2021-04-301-0/+33
|
* docs: document Gtk.Template. Fixes #396Chris Mayo2021-04-302-0/+91
| | | | Examples derived from tests/test_gtk_template.py.
* Expose GObject.Object.run_dispose()Christoph Reiter2021-04-272-1/+19
| | | | | | | | | | Up until now this raised an exception "This method is currently unsupported.". With Gtk.Widget.destroy() gone in gtk4 and that method often being used to remove references to other objects and breaking cycles this is the next best thing on a lower level and should make porting a bit easier. Fixes #470
* meson: Bump minimum meson_version to 0.47.0wip/felder/meson-minimum-versionJean Felder2021-04-161-1/+1
| | | | | The meson_options.txt file uses the "feature" option which was introduced in 0.47.0.
* docs: Fix the link to the Terminator projectChris Mayo2021-03-301-1/+1
|
* Update NEWSChristoph Reiter2021-03-301-0/+7
|
* Fix regression in marshalling partial() objectsChristoph Reiter2021-03-303-3/+22
| | | | | | | | | | | | In a4880dbc4575fadc0e3 a special case for partial() was added to handle gtk4 template callbacks. This in turn broken normal usage of partial objects. To work around that add a special marker in the gtk template code for now until we find a better fix. Also adds a test so this doesn't happen again. Fixes #464
* tests: fix test with glib 2.68 re GLocalFileChristoph Reiter2021-03-301-1/+1
| | | | | | | Since 2.68 Gio.File.new_for_path("") returns a GDummyFile instead of a GLocalFile. We don't really care since we just want to test that there is a name despite the type not being in the gir, so just pass a potentially valid path instead.
* version bumpChristoph Reiter2021-03-192-2/+2
|
* release3.40.0Christoph Reiter2021-03-194-3/+15
|
* tests: Re-enable template tests for gtk4wip/jfelder/template-gtk4Jean Felder2020-12-061-3/+0
|
* tests: Do not use container api when gtk4 is usedJean Felder2020-12-061-6/+35
| | | | | GTK4 removed the Gtk.Container interface. All GTK4 widgets are now iterable.
* tests: Do not use the margin property for template testsJean Felder2020-12-061-4/+4
| | | | | In GTK4, the margin property does not exist anymore. Replace it by the margin-top property.
* tests: Update builer tests to work with gtk4Jean Felder2020-12-061-21/+38
|
* tests: Do not swap signal when object is setJean Felder2020-12-061-2/+2
| | | | Swapped defaults to TRUE when object is set.
* gtk overrides: Add support for builder scopeJean Felder2020-12-063-49/+69
| | | | | | | | | This is a follow of the previous commit which fixes template support in GTK4 by adding GtkBuilerScope. It is extended to support a scope object (it can be a python object or a dictionnary). This scope object is used to define the scope the builder should operate in. A new GtkBuilder constructor is introduced to be able to define this scope object.
* Gtk.Template: Fix template support for GTK4Jean Felder2020-12-062-4/+74
| | | | | | | | | | | | | | | Gtk.Widget.set_connect_func() does not exist anymore and signals are automatically connected. Instead, a GtkBuilderScope needs to be used to create GtkBuilder's closure functions. pygobject closure support is extended to support functools.partial. This is used to create a GtkBuilder closure function with an object different from the current object. See MR https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1204 and https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1230 Closes: #380
* gtk: Add override for Gtk.CustomSorter.set_sort_funcJean Felder2020-12-064-17/+133
| | | | | | | | | | This function use CompareDataFunc which works with pointers and doesn't know anything about GObjects. The same logic as in Gio.List.sort and Gio.List.insert_sorted is used. An associated unit_test is also added.
* examples/demo: Use require_version to force gtk3Christoph Reiter2020-11-301-0/+7
| | | | The examples don't work with gtk4 so set the proper version