-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
bpo-28254: Add a C-API for controlling the state of the garbage collector #25687
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
6229a31
bpo-28254: Add a C-API for controlling the state of the garbage colle…
scoder bfbadb9
bpo-28254: Improve markup and add a What's New entry.
scoder f41d269
Apply suggestions from code review
pablogsal 56465a9
bpo-28254: Return the previous GC state from the Enable/Disable funct…
scoder 7b6e320
Update Modules/_testcapimodule.c
pablogsal b7e4ee3
Update Modules/_testcapimodule.c
pablogsal 4e11560
Update Modules/_testcapimodule.c
pablogsal e5f0077
bpo-28254: Formatting.
scoder c64aa42
bpo-28254: Move new functions to a better place (not cutting into the…
scoder cbee918
Remove an incorrect part of a comment: PyGC_Collect() actually does n…
scoder 0f7e608
bpo-28254: Add documentation for the PyGC_*() functions.
scoder 80c3625
bpo-28254: Add new PyGC_*() functions to the stable ABI list.
scoder 25fb2aa
bpo-28254: Apply suggestions from doc review.
scoder 10ad929
Apply suggestions from doc review
scoder 1ffe937
Add a word on how PyGC_Collect() and gc.collect() differ.
scoder d517665
Fix version marker.
scoder 84fb2af
Fix version marker (II).
8000
scoder File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
bpo-28254: Return the previous GC state from the Enable/Disable funct…
…ions to make it easy for users to ('atomically') know whether they actually changed something and what state to go back to later. Also, returning an "int" may make it easier to add error handling later, if that becomes needed at some point.
- Loading branch information
commit 56465a9c1b8ab8b5c4d0b203abd0881db9187aff
There are no files selected for viewing
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
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
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
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.
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.
Bugs are unlikely. IMO using assert() is good enough for _testcapi tests. You can leave the code as it is ;-)
See for example test_refcount_funcs() which uses assert().
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.
I was thinking that assertions can be compiled out, which is decidedly not intended here.
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.
In general yes, but _testcapimodule.c starts with:
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.
Good to know! I'd keep the test as it is though. It doesn't really hurt, I think.