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" error when using ggplot 0.6.8 with six 1.10.0+ #655

Open
JoshRosen opened this issue Sep 20, 2018 · 0 comments
Open

Comments

@JoshRosen
Copy link

JoshRosen commented Sep 20, 2018

This ticket reports an issue which impacts ggpy 0.6.8, an older version of this library. I am reporting it in order to have a public reference to this issue.

If ggpy 0.6.8 is used with six 1.1.10 or newer then import ggplot will fail with a metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases error.

This is caused by the following unnecessary line of code:

https://github.com/yhat/ggpy/blob/v0.6.6/ggplot/themes/element_target.py#L122

The problem is that this code is using six's with_metaclass to be compatible with both Python 2 and 3 but it's also defining __metaclass__ (which is unnecessary). This pattern happened to work in earlier versions of six but this behavior broke in six 1.1.0 and started triggering errors.

Based on discussion at benjaminp/six#210, the six maintainers don't seem to consider this a regression in six, so ggplot will need to be updated in order to be compatible with newer six versions.

This incompatibility can be resolved by simply deleting the __metaclass__ line I linked above.

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

No branches or pull requests

1 participant