gh-139951: Test on GC collection disabled if threshold is zero#140304
gh-139951: Test on GC collection disabled if threshold is zero#140304markshannon merged 2 commits intopython:mainfrom
Conversation
Lib/test/test_gc.py
Outdated
| gc.enable() | ||
|
|
||
| # Ensure that setting *threshold0* to zero disables collection. | ||
| @gc_threshold(0, 0, 0) |
There was a problem hiding this comment.
It is better to set gc_threshold(0) to keep other values defaults.
sergey-miryanov
left a comment
There was a problem hiding this comment.
Looks good to me. Overall, I believe it is worth to add such test.
|
Thanks @efimov-mikhail for the PR, and @markshannon for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
…ythonGH-140304) (cherry picked from commit 5d0abb6) Co-authored-by: Mikhail Efimov <[email protected]>
…ythonGH-140304) (cherry picked from commit 5d0abb6) Co-authored-by: Mikhail Efimov <[email protected]>
|
GH-140362 is a backport of this pull request to the 3.14 branch. |
|
GH-140363 is a backport of this pull request to the 3.13 branch. |
|
…GH-140304) (#140363) gh-139951: Test on GC collection disabled if threshold is zero (GH-140304) (cherry picked from commit 5d0abb6) Co-authored-by: Mikhail Efimov <[email protected]>
…GH-140304) (#140362) gh-139951: Test on GC collection disabled if threshold is zero (GH-140304) (cherry picked from commit 5d0abb6) Co-authored-by: Mikhail Efimov <[email protected]>
This PR just adds small test.
I've noticed that there's no such test because CI is green for this PR:
#140262, but it has such a flaw.