gh-139686: Make reloading a lazy module no-op#139857
gh-139686: Make reloading a lazy module no-op#139857brettcannon merged 10 commits intopython:mainfrom
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 |
brettcannon
left a comment
There was a problem hiding this comment.
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 |
QEDady
left a comment
There was a problem hiding this comment.
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. |
brettcannon
left a comment
There was a problem hiding this comment.
I just realized we should probably update the docs for importlib.reload to mention the new semantics.
|
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 |
|
I have made the requested changes; please review again. |
|
Thanks for making the requested changes! @brettcannon: please review the changes made to this pull request. |
|
This “broke” buildbots :( |
|
…e no-op (pythonGH-139857)" (python#143584) This reverts commits 57db125 and 0a97941.
…e no-op (pythonGH-139857)" (python#143584) This reverts commits 57db125 and 0a97941.
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.