bpo-36016: Allow gc.getobjects to return the objects in a specific generation#11909
bpo-36016: Allow gc.getobjects to return the objects in a specific generation#11909methane merged 9 commits intopython:masterfrom
Conversation
Doc/library/gc.rst
Outdated
|
|
||
| .. versionchanged:: 3.8 | ||
| If generation is not None, return only the objects tracked by the | ||
| collector that are in that generation. |
There was a problem hiding this comment.
Document about option in function document, and simplify this.
And use versionadded instead.
There was a problem hiding this comment.
@methane Done in 1294e7d
I am not sure what do you have in mind for the versionadded section. Please, check that what was done in 1294e7d makes sense. :)
There was a problem hiding this comment.
And use
versionaddedinstead.
IMHO versionadded should be reserved to new functions/constants (ex: posix_spawn added to Python 3.8).
Doc/library/gc.rst
Outdated
|
|
||
| .. versionchanged:: 3.8 | ||
| If generation is not None, return only the objects tracked by the | ||
| collector that are in that generation. |
There was a problem hiding this comment.
And use
versionaddedinstead.
IMHO versionadded should be reserved to new functions/constants (ex: posix_spawn added to Python 3.8).
|
When you're done making the requested changes, leave the comment: |
pitrou
left a comment
There was a problem hiding this comment.
Looks like a worthwhile addition to me. Some comments below.
|
I have made the requested changes; please review again |
|
Thanks for making the requested changes! @vstinner: please review the changes made to this pull request. |
Co-Authored-By: pablogsal <Pablogsal@gmail.com>
Co-Authored-By: pablogsal <Pablogsal@gmail.com>
|
I didn't review the code closely but adding this functionality seems like an okay idea. It is relatively easy to implement and provides a more detailed view into what the GC is doing. |
https://bugs.python.org/issue36016