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

Cython inline seems to be broken for new style classes #2936

Closed
rsaim opened this issue Apr 29, 2019 · 0 comments
Closed

Cython inline seems to be broken for new style classes #2936

rsaim opened this issue Apr 29, 2019 · 0 comments

Comments

@rsaim
Copy link

rsaim commented Apr 29, 2019

In [18]: cython.__version__
Out[18]: '0.29.5'

In [19]: class Bar(object): pass

In [20]: code = "Bar"

In [21]: cython.inline(code, language_level=2)
...
TypeError: descriptor 'mro' of 'type' object needs an argument

This is basically trying to do query mro on type(<class>) which used to work for old style classes:

py3:

In [24]: type(Bar).mro()
...
TypeError: descriptor 'mro' of 'type' object needs an argument

py2:

In [74]: class Foo: pass

In [75]: type(Foo).mro()
Out[75]: [classobj, object]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants