-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Support importing native modules in native packages. #2657
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
Conversation
This only fixes the `import` portion. It doesn't actually change reference behavior because modules within a package could already be referenced through the parent package even though an error should have been thrown.
So the claim is that
would work with this fix, right? If so, it is really great, thanks for taking care of it! @dpgeorge Damien, do you think this could be merged into |
@tannewt thanks for the note, I'll look into incorporating this or similar. I didn't yet look in detail but this might be related: micropython#4731 |
See micropython#5701 for the equivalent change upstream. Thanks for suggesting this, I think it's a much better approach than micropython#4731 Some minor notes on this PR:
|
Thanks @jimmo and @dpgeorge. Will keep an eye on upstream and plan on replacing this PR next time we merge from upstream. @jimmo Good idea on the type check. I've added it and confirmed we can't |
@jepler I think this is ready to merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor nit.
Testing performed: merged with ulab branch and:
>>> import ulab.fft as fft
>>> fft.spectrum
<function>
@jepler Removed! Please take another look! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! And thanks for your patience while I missed the notification for 2 days.
I'm going to assume these "cancelled checks" are nothing to worry about.
This only fixes the
import
portion. It doesn't actually changereference behavior because modules within a package could already
be referenced through the parent package even though an error should
have been thrown.