[2.7] bpo-31692: COUNT_ALLOCS now writes into stderr, fix also tests for COUNT_ALLOCS#3910
Closed
vstinner wants to merge 3 commits intopython:2.7from
vstinner:count_allocs27
Closed
[2.7] bpo-31692: COUNT_ALLOCS now writes into stderr, fix also tests for COUNT_ALLOCS#3910vstinner wants to merge 3 commits intopython:2.7from vstinner:count_allocs27
vstinner wants to merge 3 commits intopython:2.7from
vstinner:count_allocs27
Conversation
Statistics are now written into stderr, rather than stdout.
(cherry picked from commit a793037)
* Fix test_abc: Add @requires_type_collecting to test_cache_leak() * Fix test_hash: get_hash() helper function doesn't redirect stderr to stdout anymore, stderr is now redirected to its own pipe which is ignored. * Fix test_regrtest: Skip test_huntrleaks() if COUNT_ALLOCS is defined. * Fix test_warnings: Skip two tests which rely on stderr. * Fix test_sys.test_objecttypes(): Fix the object size when COUNT_ALLOCS is defined * Fix test_json, test_tools, test_sys: Don't check stderr if COUNT_ALLOCS is defined. * Fix test_threading: Don't check stderr if COUNT_ALLOCS is defined * Fix test_subprocess: Skip tests checking stderr. * Fix test_multiprocessing
|
|
||
| # bpo-31692: If COUNT_ALLOCS is defined, stderr is flooded with allocation | ||
| # statistics and so cannot be checked in a reliable way | ||
| skip_unless_usable_stderr = test_support.requires_type_collecting |
Member
There was a problem hiding this comment.
"types are immortal if COUNT_ALLOCS is defined" looks bad skip message for these tests.
| @@ -0,0 +1,2 @@ | |||
| COUNT_ALLOCSi debug mode now writes allocations statistics into stderr, | |||
Member
Author
|
I just wrote PR #3927 which is shorter and adds a new PYTHONSHOWALLOCCOUNT environment variable. |
Member
Author
|
PR #3927 was merged, so I close this one. |
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/issue31692