| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
3.18 added a Gdk.Rectangle type which changed these functions
to methods in the gir.
Fix by providing aliases in the Gdk overrides.
https://bugzilla.gnome.org/show_bug.cgi?id=756364
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
g_irepository_require
Instead of tracking loaded dependencies ourself to hide warnings if they
were loaded by a previous import just look if the namespace was loaded
before the import. This (a) makes the implementation much simpler and
(b) also takes into account namespaces loaded outside of Python/PyGObject
using the libgirepository C API (as is common in applications using
libpeas with Python plugins)
This also introduces a new Python wrapper for g_irepository_is_registered()
to allow checking the loading state of namespaces before imports.
This fixes unnecessary require_version warnings in gedit, gnome-builder,
totem, rhythmbox etc.
https://bugzilla.gnome.org/show_bug.cgi?id=754491
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=744745
|
|
|
|
|
|
|
|
|
|
| |
If the python object contains a value bigger than MAXUINT we'd
silently truncate it when assigning to 'val' and the if condition
would always be true.
This was caught by a coverity scan.
https://bugzilla.gnome.org/show_bug.cgi?id=749698
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=749696
|
|
|
|
|
|
| |
The pkg-config info includes the "pycairo" folder already.
https://bugzilla.gnome.org/show_bug.cgi?id=746742
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=751156
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If an override depended on another module and it did not
exist then the raised ImportError was consumed and assumed
to mean that the override did not exist. This makes it
difficult to diagnose issues with overrides.
This uses pkgutil.get_loader() as it is the easier way to
determine if a module exists in both Python 2 and 3
and avoid deprecated functions.
https://bugzilla.gnome.org/show_bug.cgi?id=749532
|
|
|
|
|
|
|
|
|
| |
version to import wasn't specified.
This makes the warning visible by default.
See commit ef3bff4e570363e4f383d4cdae9cecd4073b03d8 for more info on the warning.
https://bugzilla.gnome.org/show_bug.cgi?id=727379
|
|
|
|
|
|
|
|
|
| |
The new GdkRectangle in the typelib confuses the marshalling code
as PyGObject uses the Python class from the overrides for marshalling
to Python but uses the gtype from the typelib to do
type checking when marshalling from Python.
https://bugzilla.gnome.org/show_bug.cgi?id=749625
|
|
|
|
|
|
|
|
|
|
|
|
| |
work again.
gi_gst_fraction_from_value () in gst-python's gstmodule.c tries to access
the Gst.Fraction class through gi.repository.Gst._overrides_module.Fraction
and failed since _overrides_module was removed in revision 149c31beced944c.
This adds it back pointing to the proxy itself which also contains Gst.Fraction.
https://bugzilla.gnome.org/show_bug.cgi?id=736678#c6
|
|
|
|
|
|
|
| |
Conditionalize Gdk.EventTouch union discrimination. This fixes the
Gdk overrides to continue working with versions of Gdk less than 3.4.
https://bugzilla.gnome.org/show_bug.cgi?id=747717
|
|
|
|
|
|
|
|
|
|
| |
These checks are performed in the actual marshalling code
paths as well, no need to do them twice.
Also move _pygi_g_registered_type_info_check_object() to pygi-info.c
as it's the only place where it is still used.
https://bugzilla.gnome.org/show_bug.cgi?id=746985
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=746985
|
|
|
|
|
|
|
|
| |
They are defined in glib, not gobject and not included in the gir;
Similar constants like G_MAXINT64 are defined in GLib gir and marked
deprecated in the GObject overrides already.
https://bugzilla.gnome.org/show_bug.cgi?id=743514
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a new helper function for overrides to mark a module level attribute
as deprecated. A warning will be emitted every time the attribute gets
accessed.
e.g. when marking GObject.STATUS_FOO as deprecated using
STATUS_FOO = GLib.Status.FOO
deprecated_attr("GObject", "STATUS_FOO", "GLib.Status.FOO")
__all__.append("STATUS_FOO")
accessing it will emit
"GObject.STATUS_FOO is deprecated; use GLib.Status.FOO instead"
https://bugzilla.gnome.org/show_bug.cgi?id=743514
|
|
|
|
|
|
| |
warnings/error messages.
https://bugzilla.gnome.org/show_bug.cgi?id=743468
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=744719
|
| |
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=743278
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=743214
|
|
|
|
|
|
|
|
|
| |
gi tries to import the latest version of typelibs which can cause
existing code to break when a newer typelib is released.
Emit an ImportWarning when gi.require_version() is not used to give
developers this awareness so they can future proof their code.
https://bugzilla.gnome.org/show_bug.cgi?id=727379
|
|
|
|
|
|
|
|
| |
Removes Registry and DynamicModule in favor of a simple module wrapper that
contains only overrides and falls back to the introspection module.
Moves all the overrides logic into gi.overrides; Speeds up module attribute access
https://bugzilla.gnome.org/show_bug.cgi?id=736678
|
|
|
|
|
|
|
|
|
| |
Remove the static implementation of _wrap_pyg_variant_new_tuple with
usage of the dynamic version coming from GI. Array marshalling has
drastically improved in recent years making the dynamic version usable
with a small compatibility shim for the arguments.
https://bugzilla.gnome.org/show_bug.cgi?id=735199
|
|
|
|
|
|
|
|
|
| |
Add EventTouch to get/setattr pass-through to support BEGIN, UPDATE, END,
and CANCEL touch event types. Ensure Gdk.Event methods get_state(),
get_axis(), get_coords(), and get_root_coords() are patched onto
Gdk.EventTouch.
https://bugzilla.gnome.org/show_bug.cgi?id=736380
|
|
|
|
| |
Because this produces a g++ pedantic warning.
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=737874
|
|
|
|
|
|
| |
Always set initial length argument index for arrays to -1. Ensure we don't
attempt retrieving Python cleanup arguments until we know it is valid.
This was causing an invalid read in test_gi.TestArray.test_array_out()
|
|
|
|
|
|
|
|
|
|
|
| |
Replicate struct marshaling logic for determining if struct arguments
to signals should be passed by reference to callbacks.
Maintain a list of these structs and apply an in-place copy of the struct
pointer if the struct wrapper is held longer than the duration of the
Python callback. This allows for both mutation of struct arguments from
callbacks as well as memory safety incase a callbacks holds onto the struct.
https://bugzilla.gnome.org/show_bug.cgi?id=736175
|
|
|
|
|
|
| |
Add struct type check before calling g_struct_info_is_foreign().
https://bugzilla.gnome.org/show_bug.cgi?id=736175
|
|
|
|
|
| |
Structs which don't have a size or constructor should not procuce any doc
string. The trailing "::" was causing a problem with sphinx.
|
|
|
|
| |
Fix error with an untested code path opened up by commit 1f78dc0ace.
|
|
|
|
|
| |
Change skip_return() access into a function call. This was causing
return type doc strings to always be skipped.
|
|
|
|
|
|
|
|
|
|
|
| |
Add a special case which avoids copying of struct arguments marked as output
to signals. Since we don't currently support output arguments, users have
come to rely on a pass-by-reference bug which was fixed and caused this to
regress (bug 722899). Add unittest which is currently failing due to a number
of issues with emit() not supporting type annotations or output arguments
(bug 735693).
https://bugzilla.gnome.org/show_bug.cgi?id=735486
|
|
|
|
|
|
|
|
| |
Add an immediate return in ffi closures if Python is not initialized.
This fixes rare events when which lead to a segfault when a process
is exiting.
https://bugzilla.gnome.org/show_bug.cgi?id=722562
|
|
|
|
|
|
|
|
|
| |
Replace raising a TypeError in gi.types.Boxed() with a warning.
Even though passing arguments or keywords to the parent class is
incorrect here, raising an exception was causing a bit of fallout
in some apps (Gramps).
https://bugzilla.gnome.org/show_bug.cgi?id=727810
|
|
|
|
|
| |
This was accidentally pushed.
Revert commit 35c6540c42a01e1155f44533cc09e6c9f94b6613.
|
|
|
|
|
|
| |
In case PySequence_GetItem() failed, the retured NULL was passed to PyDECREF.
https://bugzilla.gnome.org/show_bug.cgi?id=735201
|
|
|
|
|
|
|
|
|
| |
Remove the static implementation of _wrap_pyg_variant_new_tuple with
usage of the dynamic version coming from GI. Array marshalling has
drastically improved in recent years making the dynamic version usable
with a small compatibility shim for the arguments.
https://bugzilla.gnome.org/show_bug.cgi?id=735199
|
|
|
|
|
|
|
|
| |
Always sink the results of g_variant_new_tuple() in the statically
bound wrapper. This matches the generic GI marshalling behavior
of passing GVariants to Python with transfer-none.
https://bugzilla.gnome.org/show_bug.cgi?id=735166
|
|
|
|
|
|
|
| |
Skip marshalling optional output arguments which are passed NULL
as the memory location. This fixes fallout from bug 727004.
https://bugzilla.gnome.org/show_bug.cgi?id=735090
|
|
|
|
|
|
|
|
|
| |
Break do_get_property() call into a re-usable function.
Call do_get_property() Python implementations instead of going through GObject
machinery for Python GObjects. This gives a performance boost for Python
GObject properties when accessed via. obj.get_property() and obj.props.
https://bugzilla.gnome.org/show_bug.cgi?id=723872
|
|
|
|
|
|
|
|
|
| |
Call the Python implemented fget() when a property is accessed directly
on a Python implemented GObject. This skips going through the GObject
machinery which ends up calling fget() and marshalling the results
through GValues.
https://bugzilla.gnome.org/show_bug.cgi?id=723872
|
|
|
|
|
|
| |
Replace usage of g_type_is_a() with G_VALUE_HOLDS() when extracting
pointers from GValues being marshalled from properties and signals.
This fixes fallout from commit abdfb0f.
|
|
|
|
|
|
|
|
|
|
| |
Attempt marshalling with pygi_value_to_py_basic_type() prior to looking at
GI info. This gives a quick conversion for basic types like bools, ints, and
strings without having to go through GIArgument and GI conversions. This
gives approximately a 3x performance boost for accessing these types with
the unified GValue marshaller.
https://bugzilla.gnome.org/show_bug.cgi?id=726999
|
|
|
|
|
|
|
|
|
| |
Add pygi_value_to_py_basic_type() which is limited to handling basic
types that don't need introspection information when marshalling to Python.
Add pygi_value_to_py_structured_type() for marshalling of structured data
which can eventually accept GI type hints.
https://bugzilla.gnome.org/show_bug.cgi?id=726999
|
|
|
|
|
|
|
|
|
|
|
| |
Consolidate duplicate logic into pygi_get_property_value().
Use the function for GObject.get_property(), GObject.get_properties(),
and GObject.props.
Remove overridden expected failures in TestCGetPropertyMethod which
now work due to the unification.
https://bugzilla.gnome.org/show_bug.cgi?id=733893
https://bugzilla.gnome.org/show_bug.cgi?id=726999
|
|
|
|
|
|
|
|
|
|
|
| |
Merge duplicated GValue marshaling code which has diverged over time
(commits 3606eb20, ee62df4d, e14ebab6, 8cfd596c, 9f50fd21, 0d099bdb, and 216caf59).
Use _pygi_argument_to_array within pygi_get_property_value. This is needed
in the new code for supporting GI_TYPE_TAG_ARRAY and also fixes bug 669496.
Side effects of this change also include support for properties holding
G_TYPE_FLAGS and G_TYPE_PARAM.
https://bugzilla.gnome.org/show_bug.cgi?id=726999
|
|
|
|
|
|
|
|
| |
Always assume transfer-none of GValue arguments to signal handlers.
A signal handler with arguments marked as transfer-full does not
make any sense, so assume they are always transfer-none.
https://bugzilla.gnome.org/show_bug.cgi?id=726999
|
|
|
|
|
|
|
|
|
| |
Always use transfer-none with the results of g_object_get_property()
and assume g_value_unset() will cleanup the results. This gives us
control over memory of properties and limits property anotations to
value typing.
https://bugzilla.gnome.org/show_bug.cgi?id=726999
|