| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
I haven't looked into why, but my hope is that this makes tests
pass on travis-ci, so we have a starting point and can at least
catch regression in an automated fashion.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
https://gitlab.gnome.org/GNOME/pygobject/issues/158
The memory corruption occurs because of the race while accessing
PyGObjectData->closures list.
Protect PyGObjectData->closures by GIL in pygobject_unwatch_closure.
Despite the fact that we don't call any Python API in the function. We use
GIL to be sure that PyGObjectData->closures list stays intact while
GC iterating the list inside pygobject_traverse. Otherwise we can
segfault while trying to call 'visit' function on an object that
was just freed in pygobject_unwatch_closure.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sometimes. Fixes #151
Gtk.Adjustment allows passing positional arguments to __init__ which get
translated to a dict for passing to GObject.Object.__init__. In case of the
first argument "value", if "value" is passed before the upper and
lower bound to Object.__init__ it will be set to 0 instead.
In Python 2 this happened to work (at least on my machine) because
"value" got placed after the bounds (in terms of iteration order)
in the final dict value passed to Object.__init__.
To work around this, set "value" again after __init__().
A similar work around already exists when "value" is passed as a kwarg.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PyGObject traverses its closures in tp_traverse, but the lifetime of the closures
is tied to the lifetime of the GObject and not the wrapper. This confuses
the Python GC when it sees a ref cycle and tries to break it up with tp_clear.
Since tp_clear will not invalidate the closure and only invalidate the Python
wrapper the closure callback gets called with the now cleared/invalid object.
Instead let the GC only check the Python objects referenced by the closure when tp_clear
would actually free them and as a result break the cycle. This is only the case when
the wrapped object would be freed by tp_clear which is when its reference count is at 1.
Original patch by Gustavo Carneiro:
https://bugzilla.gnome.org/show_bug.cgi?id=546802#c5
https://bugzilla.gnome.org/show_bug.cgi?id=731501
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We use _PyGIDefaultArgPlaceholder as a sentinel value to represent default
values during function argument list construction. Right now, it's a Python
type object. We make it using PyObject_New, so most of its fields end up
uninitialized. The object body being uninitialized wouldn't be a problem if
the placeholder object were unreachable, but the object *can* be reached
during GC by traversal through frame objects.
Depending on the exact contents of the uninitialized memory, the GC can go on
to cause other kinds of memory corruption through the process.
IMHO, the easiest fix for this problem is to just make the placeholder a
simpler data structure, like a list.
https://bugzilla.gnome.org/show_bug.cgi?id=786872
|
|
|
|
|
|
|
| |
The int based flag type can't represent the flag value on 32 bit,
some more work is needed there. Remove that check again for now.
https://bugzilla.gnome.org/show_bug.cgi?id=786948
|
|
|
|
|
|
|
|
| |
Add a flags type which has a value with the highes bit set
and fits in an int. While the C type is a signed int, the type
is registered as flags, which GI interprets as unsigned.
https://bugzilla.gnome.org/show_bug.cgi?id=786948
|
|
|
|
|
|
|
|
| |
the overflow happens on windows platforms when an unsigned
flags value overflows the capacity of a signed long
on windows long is a 32-bit signed integer.
fixes https://bugzilla.gnome.org/show_bug.cgi?id=786948
|
|
|
|
|
|
|
| |
It used the fallback path and copied pointers.
Do the same thing we do for integer items instead.
https://bugzilla.gnome.org/show_bug.cgi?id=788890
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the direction is FROM_PYTHON, a whole GIArgument was being loaded
from the address given by the argument, but like any other case, this
could point to different types, and so could run off the end of the
pointed-to value, and, more importantly, be performing an unaligned
access, causing it to crash with SIGBUS on sparc64 when running
test_callback_scope_call_array_inout. Instead, reuse the existing code
for the TO_PYTHON case to do the copying into arg_value based on the
type.
https://bugzilla.gnome.org/show_bug.cgi?id=788894
|
|
|
|
|
|
|
|
| |
While removing the egg target in 49cc3643819dad0d065d I wrongfully
removed that part as well. While the file extension has "egg" in
it it has nothing to do with eggs..
https://bugzilla.gnome.org/show_bug.cgi?id=777719
|
| |
|
| |
|
| |
|
|
|
|
|
| |
gcc7 has started to warn for fallthrough in switch. Prevent this
by duplicating the default case + break.
|
|
|
|
|
| |
Python 3.6 has changed the default filesystem encoding on Windows
from mbcs to utf-8. Some tests assume mbcs, so skip them for now.
|
|
|
|
|
| |
Make Python 3 pyflakes work by adding Python 2 builtins
through PYFLAKES_BUILTINS.
|
|
|
|
|
| |
All pycairo functions now return an enum value which type is an int
subclass. Remove the overly strict check for the return value type.
|
|
|
|
|
|
|
| |
This simply makes it easier for someone to find an error in cases where
a floating point is passed by accident.
https://bugzilla.gnome.org/show_bug.cgi?id=781582
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This requires pycairo from https://pycairo.readthedocs.io/en/latest/
(already updated/included in JHBuild)
For more info on the upstream change see:
https://lists.cairographics.org/archives/cairo/2017-April/027919.html
https://mail.gnome.org/archives/desktop-devel-list/2017-April/msg00065.html
This will enable cairo.Region support for all setups and Python versions as well
as make moving to Python 3 easier for applications since all APIs provided
under Python 2 are available there as well now.
https://bugzilla.gnome.org/show_bug.cgi?id=707196
|
|
|
|
|
|
|
| |
Instead of disabling it for release builds do it always.
While JHBuild uses --disable-Werror by default, gnome-continuous does not.
See https://mail.gnome.org/archives/desktop-devel-list/2017-April/msg00009.html
|
|
|
|
|
|
| |
The next pycairo version might add support for cairo_region_t.
This enables the converter functions also on Python 2 and makes
sure that the test suite does not crash in case it does.
|
|
|
|
| |
This was added in 93e7d047e
|
|
|
|
| |
HAVE_PYSIGNAL_SETWAKEUPFD isn't used anywhere
|
|
|
|
| |
2.7/3.3 support the u/b prefixes and both have callable()
|
|
|
|
| |
At the time of the next release nothing will support 3.2 anymore.
|
|
|
|
|
|
|
| |
Skip various tests which test things that are no longer available with gtk4.
Does not remove any deprecated overrides.
Disable gtk4 support in pygtkcompat. The porting path over gtk3 should be enough.
|
|
|
|
|
|
|
|
| |
Set the versions in runtests.py instead of repeating it in every
test module.
Add a new TEST_GTK_VERSION env var which defaults to "3.0".
Allows to run tests with gtk4 using "make check TEST_GTK_VERSION=4.0"
|
|
|
|
|
|
|
|
|
|
|
|
| |
Got broken when we changed to use dbus-run-session. Move
valgrind related env vars before the dbus launcher helper.
This also tries to improve the lookup of the suppression file.
Instead of relying on the basename of the python binary use the python
major version to select one of two suppression files in the repo.
Add PYTHONMALLOC=malloc when running under valgrind, which makes Python
use malloc instead of its own allocator. Only works with Python 3.6+.
|
|
|
|
|
|
|
|
| |
Since https://git.gnome.org/browse/pygobject/commit/?id=a731db5908b79b97277be4f5138b46010c2dd616
we build libregress even if cairo is missing.
Instead of skipping regress tests when cairo is missing only skip cairo relate
tests now.
|
|
|
|
|
| |
Python 3.6 got stricter here and raises warnings/errors for invalid escape
sequences.
|
|
|
|
|
|
| |
This let to a window being shown when running the test suite.
https://bugzilla.gnome.org/show_bug.cgi?id=780812
|
|
|
|
|
|
|
| |
These functions were deprecated in the last few cycles.
This hides the warnings when running the test suite.
https://bugzilla.gnome.org/show_bug.cgi?id=780812
|
|
|
|
|
|
|
| |
Replace them with the renamed variants. We can't switch because there is
no non-deprecated variant available under both Python 2 and 3.
https://bugzilla.gnome.org/show_bug.cgi?id=780812
|
|
|
|
|
|
|
|
|
| |
This was executed in the context of Source.__del__ and while Python
ignores errors there it started to warn with Python 3.
This fixes the warnings visible when running test_source under Python 3.
https://bugzilla.gnome.org/show_bug.cgi?id=780812
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Expose everything from _gi._gobject in _gi instead.
This does not move any code around, just removes the module.
Also removes the gi._gobject package and replaces it
with a small dummy module in gi.__init__.py
https://bugzilla.gnome.org/show_bug.cgi?id=735206
|
|
|
|
|
|
|
| |
Move the code into gi._gi (gimodule)
The module was a leftover from https://bugzilla.gnome.org/show_bug.cgi?id=712197
https://bugzilla.gnome.org/show_bug.cgi?id=735206
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=769789
|
|
|
|
|
|
| |
one set
https://bugzilla.gnome.org/show_bug.cgi?id=773394
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=780768
|
|
|
|
|
|
|
| |
One common case where this can happen is when subclassing a GObject.Object
without chaining up __init__ and then calling a method.
https://bugzilla.gnome.org/show_bug.cgi?id=730908
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=759276
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Py2+Unix: Convert unicode to bytes using the fsencoding. Pass bytes as is.
Returns path as bytes as is.
Py2+Windows: Convert unicode to wtf-8. Pass bytes as is.
Returns path as bytes as is.
Py3+Unix: Convert str using os.fsencode so that the surrogateescape handler
can restore the real path if the source was a Python API such as os.listdir
sys.argv etc. Pass bytes as is. Return str decoded using os.fsdecode so that
it can be passed to Python API such as open, os.listdir etc.
Py3+Windows: Convert str to wtf-8. Decode bytes using the fsencoding first.
Returns str + surrogates.
This change makes anyting taking filenames on Python 3 behave the same
as Python functions like listdir() or open(). Compared to Python 3 builtin
functions which return the same type that was passed in we always return str.
One remaining problem is that glib assumes that Windows paths are utf-16,
while they are just 16bit arrays and as a result utf-8 is not enough to
represent all possible paths. We use wtf-8 here instead (utf-8 with lone surrogates),
which allows us to convert all paths, but glib functions accessing the fs
will fail with them.
PyUnicode_EncodeFSDefault was added in CPython 3.2 so bump the requirement.
https://bugzilla.gnome.org/show_bug.cgi?id=746564
|
|
|
|
|
|
| |
This made these tests on 64bit Windows fail because sizeof(gsize) != sizeof(glong)
https://bugzilla.gnome.org/show_bug.cgi?id=780591
|
|
|
|
|
|
| |
long is too small on 64bit Windows
https://bugzilla.gnome.org/show_bug.cgi?id=780591
|