Closed kaiw closed 5 years ago
Somewhat fixed with https://github.com/pygobject/pgi/commit/f9329ff0b7923dc1ec3b5adeb03e5fd7c5dd3dfd
Yeah that seems to fix these cases for stub generation, thanks! There's one more odd one which is _Value__data__union
in GObject
, but I'm pretty sure that's a different problem.
As far as I'm concerned this is fixed, but I don't know whether you want to leave this open.
There's one more odd one which is
_Value__data__union
inGObject
That's in the gir as well, don't know. I'd say it's fine to just backlist some things in glib/gobject if they make problems.
As far as I'm concerned this is fixed, but I don't know whether you want to leave this open.
I'm fine with it.. the longterm goal is to get rid of pgi anyway.
See e.g., https://lazka.github.io/pgi-docs/#GLib-2.0/classes/MemVTable.html for an example of this. The
calloc
field is of typeobject
; the other fields have incorrect annotations of the top-level function.calloc
is the only field that is not exposed as a top-level function.I've chased this down as far as
pgi.util.import_attribute()
, invoked fromInterfaceField.setup()
. While I'm not familiar with the code, I feel like using the imported module attribute as thepy_type
here is the problem, but... I'm just not confident.This causes errors in the generated typing stubs, e.g.,