-
Notifications
You must be signed in to change notification settings - Fork 22
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
lazy_loader.attach_stub
confuses submodule and function of the same name
#54
Comments
You even check for this case in https://github.com/scientific-python/lazy_loader/blob/a6188ac0a4dee20edc6fab099e606b19148de0d4/lazy_loader/__init__.py#L79-L84 Unfortunately I can't reproduce this locally yet to check what is going wrong... |
I suspect this is the following documented issue: https://scientific-python.org/specs/spec-0001/#caveats |
@lagru Did this happen inside of a doctest? The logs are unfortunately no longer accessible for me to check. |
Yeah, we are in luck. Building and testing scikit-image/scikit-image@079962f still works with the current dev environment. I changed the name of back to
Can also be reproduced on current |
At scikit-image, we are seeing that if a submodule and lazy loaded function have the same name, the module is unexpectedly imported instead. This behavior in the case of
rolling_ball
can be seen in scikit-image/scikit-image#7021, scikit-image/scikit-image@079962f, failing CI example.What I find confusing that this does not happen for all jobs, though I haven't figured out a common denominator between the passing and failing group respectively. 🤔
Our approach has been to rename the submodule but this may hint at a deeper issue / limitation / quirk in
lazy_loader
?The text was updated successfully, but these errors were encountered: