bpo-30599: Fix test_threaded_import reference leak - #2029
Merged
Merged
Conversation
Mock os.register_at_fork() when importing the random module, since this function doesn't allow to unregister callbacks and so leaked memory.
Member
Author
|
Oh, os.register_at_fork() doesn't exist on Windows, so tests failed on Windows. I fixed the test using: |
pitrou
approved these changes
Jun 10, 2017
pitrou
left a comment
Member
There was a problem hiding this comment.
If that's all it takes to suppress the reference leak, then +1 from me. And thanks Victor for fixing this!
Member
Author
|
Yes, it fixes the reference leak. I prefer to just mock register_at_fork() instead of writing a new module to make sure that we still test the import machinery ;-) Note: PR merged at the beach on my phone in front of the beach ;-) Thank you Brett for the new workflow! 😀 |
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.
Mock os.register_at_fork() when importing the random module, since
this function doesn't allow to unregister callbacks and so leaked
memory.