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

Adjust for no __new__ method on MicroPython #88

Open
krzema12 opened this issue Nov 30, 2021 · 1 comment
Open

Adjust for no __new__ method on MicroPython #88

krzema12 opened this issue Nov 30, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@krzema12
Copy link
Owner

When trying to run e2e tests for MicroPython, the constructors test fails with:

  File "python/e2e-tests/out/python-consumer.py", line 6, in <module>
  File "/home/piotr/repos/priv/kotlin-python/python/e2e-tests/out/compiled.py", line 13692, in multi12
  File "/home/piotr/repos/priv/kotlin-python/python/e2e-tests/out/compiled.py", line 13670, in MultiConstructors1_init__Create_
AttributeError: type object 'MultiConstructors1' has no attribute '__new__'

Looks like __new__ is another magic method unavailable on MicroPython. We had to use + instead of __add__ already. Not sure if there's an equivalent here, but still it's a must to fix it given we want to support MP.

@krzema12 krzema12 added this to the MicroPython support milestone Nov 30, 2021
@krzema12 krzema12 added the bug Something isn't working label Nov 30, 2021
@krzema12 krzema12 changed the title AttributeError: type object 'MultiConstructors1' has no attribute '__new__' Adjust for no __new__ method on MicroPython Nov 30, 2021
@krzema12
Copy link
Owner Author

krzema12 commented Dec 1, 2021

TODO: check why __new__ (magic method) was used, and if some non-magic method can be used instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant