-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
gh-139686: Make reloading a lazy module no-op #139857
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
base: main
Are you sure you want to change the base?
Conversation
… in test_lazy.py Without this `./python -m test test_importlib` fails at `test_lazy` although `./python -m test test_importlib.test_lazy` perfectyl succeeds. That is becasue some other tests likely manipulates `util` making the above two out of sync.
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
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.
Minor tweaks to the tests, but otherwise LGTM!
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
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.
I have made the requested changes; please review again
I have made the requested changes; please review again Also, currently the following test:
fails with
because of
at the top level of the |
Thanks for making the requested changes! @brettcannon: please review the changes made to this pull request. |
Currently, reloading a not-yet materialized lazy module fails. This PR changes it to be a no-op. This makes sense since the reloading will happen anyway when the module is materialized e.g. by accessing an attribute.