-
Notifications
You must be signed in to change notification settings - Fork 357
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
Fix quirks with import machinery in Python 3.8 #2244
Conversation
Thank you for fast fixing. I tested nest-server on commit
@Helveg: Can you test it on Python3.8? If you also reproduce the same issue, what would be your solution? |
I confimed that the issue of |
Very unexpected behavior, |
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.
LGTM!
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.
This looks pretty clean to me. Many thanks for addressing the issue. I also tested that
mpirun --oversubscribe -np 4 install/bin/nest-server-mpi
works and it does. Thus I'm approving.
@terhorstd: Given the criticality of this, can you please also have a quick look? Thanks! |
Co-authored-by: Jochen Martin Eppler <jougs@gmx.net>
@steffengraber: I will merge this now. Can you please comment here, if there are any problems on Read the Docs caused by the merge? Thanks! |
Apparently
importlib.import_module
sets an attribute on the parent module in python 3.8 (no longer does this in 3.9 it seems, or it was a bug that was fixed?), this didn't play nice with #2220. On top of that, the error of_setattr_error
during theimportlib.import_module
was silenced but would lead to anAttributeError
fornest.<lazy_module>
even though by all means the attribute was declared, likely because_lazy_module_property
usesdelattr
right beforeimport_module
which would then error out, dissapearing the attribute.I also added
nest.server
as a lazy loaded module.closes #2241, closes #2242, closes #2239