Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metaclass conflict calling Gdk.Display.get_default() #19

Open
garyvdm opened this issue Aug 6, 2015 · 2 comments
Open

metaclass conflict calling Gdk.Display.get_default() #19

garyvdm opened this issue Aug 6, 2015 · 2 comments
Labels

Comments

@garyvdm
Copy link

garyvdm commented Aug 6, 2015

When I run Gdk.Display.get_default() I get a TypeError: metaclass conflict:

>>> from pgi.repository import Gdk
>>> Gdk.Display.get_default()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<string>", line 10, in get_default
  File "/home/garyvdm/dev/welkom/ve/lib/python3.4/site-packages/pgi/codegen/ctypes_backend/types_interface.py", line 99, in get_class_func
    pytype = gtype.pytype
  File "/home/garyvdm/dev/welkom/ve/lib/python3.4/site-packages/pgi/util.py", line 281, in __get__
    obj.__dict__[self.__name__] = result = self.fget(obj)
  File "/home/garyvdm/dev/welkom/ve/lib/python3.4/site-packages/pgi/gtype.py", line 123, in pytype
    cls = new_class_from_gtype(self)
  File "/home/garyvdm/dev/welkom/ve/lib/python3.4/site-packages/pgi/obj.py", line 386, in new_class_from_gtype
    cls = type(gtype.name, bases, dict(_Object.__dict__))
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
@lazka lazka added the bug label Aug 6, 2015
@Julian
Copy link

Julian commented Dec 27, 2015

+1, same here.

I'm random shotgun coding to see if I can get the app I want to run, but in doing so it seems likely that Object.__cmp__ should be removed, and Object.__eq__ needs a if not isinstance(other, self.__class__): return NotImplemented, otherwise that line continues to fail even after I filter out the NoneType (which I have no idea is the right thing to do there but gets me further) (http://characteristic.readthedocs.org/en/stable/ is a nice thing).

@lazka
Copy link
Member

lazka commented Jan 31, 2016

While the underlying problem probably isn't fixed it works in master (I think due to auto importing of GdkX11) and I've pushed a new release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants