summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix conversion from pointers to hashfunc return values.Christoph Reiter2017-03-295-8/+14
| | | | | | | | | | | | | | Fixes comiler warnings on 64bit Windows. Python 3 now uses Py_hash_t as return value for hashfunc. Use a compat define so we can use the right type depending on the Python version. On Python 2 + 64bit Windows the pointer doesn't fit the long return type. Add a macro which handles the casting for that case to prevent compiler warnings. https://bugzilla.gnome.org/show_bug.cgi?id=780591
* Fix PyLong <-> GPid conversion on 64bit WindowsChristoph Reiter2017-03-291-5/+21
| | | | | | | GPid on Windows is a pointer and not int, and pointers don't fit long on 64bit so use PyLong_AsVoidPtr/PyLong_FromVoidPtr there instead. https://bugzilla.gnome.org/show_bug.cgi?id=780591
* property: support setting flagsChristoph Reiter2017-03-292-0/+37
| | | | | | | | This also adds some tests for setting flags and enum properties which depend on some properties being added in g-i's gimarshallingtests: https://bugzilla.gnome.org/show_bug.cgi?id=780652 https://bugzilla.gnome.org/show_bug.cgi?id=726484
* overrides: warn on instantiation of Gio.VolumeMonitorChristoph Reiter2017-03-282-0/+30
| | | | | | Gio.VolumeMonitor.get() should be used instead https://bugzilla.gnome.org/show_bug.cgi?id=744690
* Remove gi.overrides.overridefuncChristoph Reiter2017-03-271-16/+16
| | | | | | Move the code into override() https://bugzilla.gnome.org/show_bug.cgi?id=686835
* tests: Reduce usage of timeout_add() and sleep()Christoph Reiter2017-03-276-45/+111
| | | | | | | | | | * Instead of waiting for a fixed time, use a timeout and stop the main loop right after the test has succeeded. * Replace time.sleep to sync processes with os.pipe communication * Chain idle sources instead of using multiple timeout sources * Replace sleeps with unbufferd communication https://bugzilla.gnome.org/show_bug.cgi?id=698548
* tests: Remove TestMainLoop.test_concurrencyChristoph Reiter2017-03-271-27/+0
| | | | | | | | | | | | | | The code containing the bug no longer exists and the test doesn't do what it says. The thread never gets terminated and it doesn't assert anything. And I'm not sure what it should assert. For the corresponding bug see https://bugzilla.gnome.org/show_bug.cgi?id=663068 While the test doesn't hurt, it adds half a second wait time to the test suite. https://bugzilla.gnome.org/show_bug.cgi?id=698548
* Update .gitignore: add *.dll, *.dylib, .DS_STOREChristoph Reiter2017-03-271-0/+3
|
* tests: Make test suite run on WindowsChristoph Reiter2017-03-2414-75/+68
| | | | | | | | | | | | (in a msys2 environment) * Replace LD_LIBRARY_PATH with gir code in runtests.py * Remove unneeded runtests-windows.py * Unset MSYSTEM to disable path separator hacks by msys2 * Set sys.path in runtests.py * Skip various tests failing/hanging/crashing on Windows https://bugzilla.gnome.org/show_bug.cgi?id=780396
* tests: Make test suite run on macOSChristoph Reiter2017-03-249-3/+36
| | | | | | | * Skip all tests which fail, crash or hang. * Disable D-Bus in case dbus-run-session is not available. https://bugzilla.gnome.org/show_bug.cgi?id=780396
* Fix various compiler warnings for 32bit buildsChristoph Reiter2017-03-2415-19/+25
| | | | | | | | Due to the switch to AX_COMPILER_FLAGS which adds some more warning flags. I didn't notice these as they only get triggered on 32bit builds. Tested with gcc 6.3 and clang 3.9. https://bugzilla.gnome.org/show_bug.cgi?id=780409
* pep8 fixChristoph Reiter2017-03-241-1/+0
|
* testhelper: only link against libpython on WindowsChristoph Reiter2017-03-232-4/+13
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=773803
* overrides: Fix Gtk.TextBuffer.insert_with_tags_by_name() with no tagsGarrett Regier2017-03-222-3/+12
| | | | | | The text was not inserted when no tags were provided. https://bugzilla.gnome.org/show_bug.cgi?id=772896
* Make use of instance-argument annotationsChristoph Reiter2017-03-222-1/+12
| | | | | | | | | | Use g_callable_info_get_instance_ownership_transfer() instead of hardcoding the transfer for instances. get_instance_ownership_transfer() is available since 1.42.0, so no version dependency bump is required. https://bugzilla.gnome.org/show_bug.cgi?id=735076
* Remove pyglib_gil_state_ensure/pyglib_gil_state_releaseChristoph Reiter2017-03-2214-95/+91
| | | | | | Use PyGILState_Ensure/PyGILState_Release instead. https://bugzilla.gnome.org/show_bug.cgi?id=699440
* Remove support for building without threadsChristoph Reiter2017-03-224-51/+8
| | | | | | | | | | This removes the --disable-thread configure option. * glib removed disable-threads in 2011 * We use PyEval_InitThreads() for some time now which means we build against a Python with threads. And nobody complained. https://bugzilla.gnome.org/show_bug.cgi?id=699440
* pygtkcompat: Allow multiple calls to enable(), enable_gtk() as long as the ↵Christoph Reiter2017-03-222-0/+63
| | | | | | | | | version matches enable_gtk() isn't idempotent and was breaking the API when called multiple times. This ignores the call in case the version passed is the same as for previous calls. https://bugzilla.gnome.org/show_bug.cgi?id=759009
* tests: Update Makefile for building tests on OS XSimon Feltman2017-03-211-26/+30
| | | | | | | | | | Pull LDFLAGS into variables for command and Python extension specific. Use -shext .so for the Python extension on both Linux and OS X. The .so is is needed by Python on OS X (not dylib). Remove "all" target and explicit .la targets as these are handled by automake and the "check" target on demand. https://bugzilla.gnome.org/show_bug.cgi?id=762176
* testhelper: propagate exception if _gobject could not be importedMikhail Fludkov2017-03-201-2/+6
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=772949
* pygi-info: initialize GIArgument before passing it to g_constant_info_get_valueChristoph Reiter2017-03-201-1/+1
| | | | | | Co-Authored-By: Mikhail Fludkov <misha@pexip.com> https://bugzilla.gnome.org/show_bug.cgi?id=772949
* tests: build libregress with disabled cairoMikhail Fludkov2017-03-201-3/+6
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=772949
* tests: use g-ir utils found by pkg-configMikhail Fludkov2017-03-201-4/+4
| | | | | | Use g-ir utils found by pkg-config to not fail if gobject-introspection is not installed systemwide https://bugzilla.gnome.org/show_bug.cgi?id=772949
* Add a foreign type for cairo_region_t.Shyouzou Sugitani2017-03-202-2/+77
| | | | | | | | | | | | | | | Based on the patch at https://bugzilla.gnome.org/show_bug.cgi?id=667959#c7 * Rebased on master * Fixes the cairo_region_from_arg signature * Add check for pycairo region support (only in pycairo master) * Add some tests Co-Authored-By: Martin Pitt <martin.pitt@ubuntu.com> Co-Authored-By: Christoph Reiter <creiter@src.gnome.org> https://bugzilla.gnome.org/show_bug.cgi?id=667959
* aclocal: make local file discover by reading AC_CONFIG_MACRO_DIR workChristoph Reiter2017-03-204-16/+12
| | | | | | | | | | | | | | | aclocal needs to know where the local macros are for including them and for having a place to put the required system ones in. Since 1.13 it can parse configure.ac and get the path from AC_CONFIG_MACRO_DIR. This didn't work because for some reasons it complains if the local macros start with "AM_" even if they are there (I guess it assumes they can't be local). To work around that, change the AM prefix to PYG, bump the automake version so we can asume aclocal finds it and remove the hardcoded paths from both autogen.sh and Makefile.am. https://bugzilla.gnome.org/show_bug.cgi?id=777713
* Port from gnome-common to autoconf-archiveChristoph Reiter2017-03-209-117/+65
| | | | | | | | | | | | | | | | | | See https://wiki.gnome.org/Projects/GnomeCommon/Migration Visible changes: * --enable-compile-warnings is now [no/auto/yes] instead of [no/minimum/yes/maximum/error] * warnings are errors by default except for releases or if --disable-Werror is passed (which is the default in jhbuild) AX_APPEND_COMPILE_FLAGS() gets used to disable some warnings enabled by AX_COMPILER_FLAGS() because they trigger with pycairo/python headers. Tested with gcc 6.3, clang 3.8.1 https://bugzilla.gnome.org/show_bug.cgi?id=777713
* Fix various potential compiler warningsChristoph Reiter2017-03-2015-48/+67
| | | | | | | | This is useful for a the next commit which switches away from gnome-common and uses AX_COMPILER_FLAGS adding some new compiler warning flags. https://bugzilla.gnome.org/show_bug.cgi?id=777713
* configure.ac: post-release version bump to 3.25.0Christoph Reiter2017-03-201-1/+1
|
* Remove egg make targetChristoph Reiter2017-03-201-27/+0
| | | | | | | eggs are deprecated and the command was referencing long gone files and failing, so nobody was using it. https://bugzilla.gnome.org/show_bug.cgi?id=777719
* Remove legacy docsChristoph Reiter2017-03-2023-3943/+0
| | | | | | | | | | | | They aren't shipped, can't be build and describe the old pygobject 2 interface. There also was a doc-dist make target, but it was broken. If someone wants to look things up they are in git or still online for 2.28: https://developer.gnome.org/pygobject/stable/ https://bugzilla.gnome.org/show_bug.cgi?id=777719
* release 3.24.03.24.0Christoph Reiter2017-03-201-0/+3
|
* configure.ac: pre-release version bump to 3.24.0Christoph Reiter2017-03-201-2/+2
|
* release 3.23.923.23.92Christoph Reiter2017-03-131-0/+10
|
* Version bump to 3.23.92Christoph Reiter2017-03-131-1/+1
|
* overrides: Update for Gdk-4.0 and Gtk+-4.0Fabian Orccon2017-01-252-37/+44
| | | | | | | Override Gdk.Color and Gdk.RGBA according version. Use properly Gtk.init_check in Gtk+-4.0 https://bugzilla.gnome.org/show_bug.cgi?id=777680
* Disable -Werror=missing-prototypesChristoph Reiter2017-01-231-1/+1
| | | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=760056 added some code triggering "missing-prototype" which we by default treat as an error. This disables that specific error by default. https://bugzilla.gnome.org/show_bug.cgi?id=777534
* Fix new PEP8 errorsChristoph Reiter2017-01-0918-11/+98
| | | | | | | | | Two new errors popped up: * E305 expected 2 blank lines after class or function definition * E741 ambiguous variable name https://bugzilla.gnome.org/show_bug.cgi?id=776009
* Move pep8/pyflakes tests from 'make check' to 'make check.quality'Christoph Reiter2016-12-232-8/+6
| | | | | | | | | | | | | | | The current behaviour is problematic because new versions of pep8/pyflakes add new warnings or get more picky. This makes testing hard in case newly added code is developed on an older version or when testing old branches/releases. This moves the pep8/pyflakes tests to a new "make check.quality" command. This also removes the SKIP_PEP8 flag which was added in 25d12afd06863ce to speed up make check. https://bugzilla.gnome.org/show_bug.cgi?id=764087
* overrides: Update for Gtk-4.0Christoph Reiter2016-12-211-240/+242
| | | | | | | Skip things which are gone since 4.0. This only fixes importing and doesn't add any tests for now. https://bugzilla.gnome.org/show_bug.cgi?id=773315
* Handle exception unreffing Variant at exitDan Nicholson2016-12-211-1/+10
| | | | | | | | | | | | | | | | | | | | | | Calling unref will cause gi and gi.repository.GLib to be imported. However, if the program is exiting, then these modules have likely been removed from sys.modules and will raise an exception. Assume that's the case for ImportError and ignore the exception since everything will be cleaned up, anyways. This can be triggered with the following trivial program: $ python3 -c 'from gi.repository import GLib; v = GLib.Variant("s", "foo")' Exception ignored in: Adding some debug code to show the full exception revealed this: Traceback (most recent call last): File "/home/dan/src/pygobject/build3/gi/overrides/GLib.py", line 265, in __del__ self.unref() ImportError: import of 'gi.repository.GLib' halted; None in sys.modules https://bugzilla.gnome.org/show_bug.cgi?id=776092
* Handle multiple deinit of callable cacheDan Nicholson2016-12-211-8/+7
| | | | | | | | | | | | | | | | | | | In python3, it seems that the callable cache deinit can be called multiple times when the program is exiting. Make that safer by clearing the various pointers in the structure using g_clear_pointer and Py_CLEAR. A subsequent call will skip all the deinit by seeing NULL pointers for the members. This was causing a critical warning when destroying the arg name hash table multiple times with the following trivial program: $ python3 -c 'from gi.repository import GLib; v = GLib.Variant("s", "foo")' (process:32378): GLib-CRITICAL **: g_hash_table_destroy: assertion 'hash_table != NULL' failed (process:32378): GLib-CRITICAL **: g_hash_table_destroy: assertion 'hash_table != NULL' failed https://bugzilla.gnome.org/show_bug.cgi?id=776092
* configure.ac: post-release version bump to 3.23.0Christoph Reiter2016-09-191-1/+1
|
* release 3.22.03.22.0Christoph Reiter2016-09-191-0/+3
|
* configure.ac: pre-release version bump to 3.22.0Christoph Reiter2016-09-191-2/+2
|
* release 3.21.923.21.92Christoph Reiter2016-09-111-0/+7
|
* Handle nullable filename parametersChristoph Reiter2016-09-034-0/+34
| | | | | | | | | | | Make _pygi_marshal_from_py_filename handle None input values. This allows one to pass None to parameters annotated as nullable filenames. This fixes a test suite error in test_spawn_async_with_pipes triggered by an annotation change in glib. https://bugzilla.gnome.org/show_bug.cgi?id=770821
* Fix list/hashtable enum <-> hash conversion on 64-bit big endianAurelien Jarno2016-09-037-14/+93
| | | | | | | | | | | | | | | | | | | | | | glist and ghashtable objects both store pointers. Complex objects are stored as pointers to the objects, but simpler objects like an integer value are stored directly as a pointer, using for example the GINT_TO_POINTER and GPOINTER_TO_INT macros. This is done in pygobject with the _pygi_hash_pointer_to_arg and _pygi_arg_to_hash_pointer functions. These functions handle the various type of objects. However they consider that an enum, represented with the GI_TYPE_TAG_INTERFACE type (extended interface object), are always a pointer. This is wrong as it is often a 32-bit value. Therefore on 64-bit big endian machines, the value is handle with the 2 32-bit parts swapped. This patches fixes that by changing the second argument of both functions from GITypeTag to GITypeInfo. This way the interface can be determined, and the underlying storage type can also be determined. This currently only handles enum and flags, leaving other types as pointers. The patch also adds two tests in the testsuite, one for each direction. https://bugzilla.gnome.org/show_bug.cgi?id=770608
* Allow passing sockets to io_add_watch on win32Lukas K2016-09-031-0/+4
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=766396
* tests: use dbus-run-session instead of dbus-launch to run testsMichael Biebl2016-09-031-5/+2
| | | | | | | | | | | | | The use of dbus-launch is deprecated by dbus upstream. See https://lists.debian.org/debian-devel/2016/08/msg00554.html for more details. So use dbus-run-session instead, which was specifically designed to be used for such cases, like running test-suites. See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=836049. https://bugzilla.gnome.org/show_bug.cgi?id=770798
* configure.ac: post-release version bump to 3.21.92Christoph Reiter2016-08-251-1/+1
|