summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* whateverzbrown/disposeZander Brown2022-07-261-5/+12
|
* object: Allow overriding dispose implementationBilal Elmoussaoui2022-07-262-0/+47
| | | | | | | In GTK4 people are expected to unparent their custom GtkWidget implementation in the object's dispose method which is the main motivation behind this patch
* Update NEWSChristoph Reiter2022-07-161-0/+14
|
* Drop Martin Pitt as maintainerMartin Pitt2022-06-151-7/+0
| | | I haven't done anything to pygobject in the last 8 years, and forgot everything. I have no authority over this right now.
* Update NEWSChristoph Reiter2022-04-171-0/+10
|
* interface: Fix leak when overriding GInterfaceInfoThibault Saunier2022-04-144-3/+19
| | | | | | | | When the interface is being registered by PyGObject and again through an override, the first one is being leaks, free it at this point. We need to copy the GInterfaceInfo to set on the GType QData as we do not own it.
* setup.py: look up pycairo headers without importing the moduleChristoph Reiter2022-04-131-47/+31
| | | | | | | | | | | | | | | | | | Up until now pycairo provided a cairo.get_include() helper which could be used to find the required include directory matching the module, considering various scenarios. Starting with 3.8 this leads to problems on Windows since CPython on Windows will no longer use PATH for the DLL lookup and expects the library user to explicitely pass the directory where the cairo DLL can be found. In a build environment the user has no control over this though, so we have to find the include directory without loading/importing pycairo again. This now uses a combination of importlib.util.find_spec() for finding the module and importlib.metadata.distribution() for finding the package version. Hopefully this covers all cases.
* tests: Support CPython 3.8 on WindowsChristoph Reiter2022-04-091-0/+16
| | | | | | | | | | | | Python 3.8 no longer uses PATH for searching DLLs so we have to add them manually. Note that unlike PATH add_dll_directory() has no defined order, so if there are two same DLLs in PATH we might get a random one. This only makes sure that 'setup.py test' and 'pytest' continue working. If you include pygobject manually you have to call os.add_dll_directory() yourself with the location of the DLLs you ship.
* tests: Remove PyPy fixme that appears to be workingBenjamin Berg2022-03-281-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 Berg2022-03-281-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 Berg2022-03-283-5/+28
|
* Fix type checkArjan Molenaar2022-03-281-2/+1
| | | | Check for required type, instead of negating invalid type.
* Instead of printing an error, raise an exceptionArjan Molenaar2022-03-282-3/+13
|
* Make warning a crtitical for unknown argument typesArjan Molenaar2022-03-281-1/+1
|
* Check object type before Python objects are createdArjan Molenaar2022-03-281-1/+5
|
* Add extra safeguard in gimoduleArjan Molenaar2022-03-281-1/+5
| | | | Why does a g_instance_init() function only handle GObjects?
* Add Hello World GTK under Other Options and Passphraser as an example that ↵Zev Lee2022-03-281-1/+3
| | | | uses the aforementioned build system.
* Add a readthedocs configChristoph Reiter2022-03-273-1/+13
| | | | So it uses a newer sphinx
* coverage: include Python coverage in lcov reportChristoph Reiter2022-03-277-28/+31
| | | | | | | newer pycoverage supports lcov as output format, so convert to lcov and only generate one report at the end for everything. The lcov report isn't that nice, but at least everything is in one place.
* poetry: update depsChristoph Reiter2022-03-271-2/+2
|
* Only create function _construct_target_list for GTK2/3Arjan Molenaar2022-03-271-14/+14
| | | | It's not used in GTK 4.
* Do not override Treeview.enable_model_drag_xx for GTK4Arjan Molenaar2022-03-272-11/+26
| | | | Those methods require a Gdk.ContentFormats object.
* info: Show which type/object callables are bound toBenjamin Berg2022-03-271-0/+28
|
* Gtk.Template: Accept PathLike objects as a filenameAndrej Shadura2022-03-271-1/+2
| | | | | | | | | | | | | An attempt to pass a Path object as a filename results in a TypeError: "Must be bytes, not PosixPath". A simple way to accept Path objects would be unconditionally turning them into strings, but since native paths may be bytes as well, this might break applications relying on being able to bytes-based filename. Instead, convert the path into an appropriate representation (string or bytes) using os.fspath(). It internally tests whether the path is a PathLike object and does the right thing. Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
* Fix some broken links to the PyPy bug trackerChristoph Reiter2022-03-272-2/+2
| | | | They moved away from bitbucket some time ago.
* Call PyEval_InitThreads() with PyPy for Python 3.9Christoph Reiter2022-03-271-1/+2
| | | | | | In theory it should no longer be needed, but PyPy hasn't updated this part of their implementation yet, and not initing threads will lead to crashes due to missing GIL init.
* CI: update interpretersChristoph Reiter2022-03-273-15/+15
|
* tests: disable fatal-warnings fatal-criticals on WindowsChristoph Reiter2022-03-271-2/+4
| | | | | | If it triggers it creates a blocking GUI dialog without any helpful output. I can't reproduce the cause on my local machine, just on the CI server, so jsut disable this for now.
* CI: pass -Wno-error=deprecated-declarations for MSYS2Christoph Reiter2022-03-261-0/+3
| | | | | There are some glib deprecations that need fixing, but let's get CI green again first.
* Rename GObject Introspection development branchEmmanuele Bassi2022-02-171-1/+1
| | | | | GObject Introspection renamed its default development branch to "main".
* 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
|
* releaseChristoph 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
|