-
-
Couldn't load subscription status.
- Fork 33.3k
gh-139951: Test on GC collection disabled if threshold is zero #140304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-139951: Test on GC collection disabled if threshold is zero #140304
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is better to set gc_threshold(0) to keep other values defaults.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Overall, I believe it is worth to add such test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks.
|
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.