bpo-40173: Remove redundant import module of import_fresh_module()#19390
Closed
shihai1991 wants to merge 1 commit into
Closed
bpo-40173: Remove redundant import module of import_fresh_module()#19390shihai1991 wants to merge 1 commit into
shihai1991 wants to merge 1 commit into
Conversation
iritkatriel
reviewed
Aug 24, 2020
iritkatriel
left a comment
Member
There was a problem hiding this comment.
This PR needs a unit test.
Member
Author
Thanks for your comment. I have forget this PR's detail. test.support need many test cases. |
Member
|
Up to you, but I think it will be easier for reviewers to see what issue the PR is trying to fix if it included tests. |
Comment on lines
+245
to
+246
| sys.modules.clear() | ||
| sys.modules.update(orig_modules) |
Member
There was a problem hiding this comment.
I considered this option, but some modules can not support re-importing. So it is safer to restore only explicitly mentioned modules and their submodules.
See #28654.
Member
Author
There was a problem hiding this comment.
Oh, sorry, Serhiy. I missed your PR :(
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://bugs.python.org/issue40173