Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Oct 30, 2020

The last GC collection is now done before clearing builtins and sys
dictionaries. Add also assertions to ensure that gc.collect() is no
longer called after _PyGC_Fini().

Pass also the tstate to PyInterpreterState_Clear() to pass the
correct tstate to _PyGC_CollectNoFail() and _PyGC_Fini().

https://bugs.python.org/issue42208

The last GC collection is now done before clearing builtins and sys
dictionaries. Add also assertions to ensure that gc.collect() is no
longer called after _PyGC_Fini().

Pass also the tstate to PyInterpreterState_Clear() to pass the
correct tstate to _PyGC_CollectNoFail() and _PyGC_Fini().
@vstinner vstinner requested a review from pablogsal as a code owner October 30, 2020 20:50
@vstinner vstinner merged commit eba5bf2 into python:master Oct 30, 2020
@vstinner vstinner deleted the interp_clear branch October 30, 2020 21:51
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
…honGH-23044)

The last GC collection is now done before clearing builtins and sys
dictionaries. Add also assertions to ensure that gc.collect() is no
longer called after _PyGC_Fini().

Pass also the tstate to PyInterpreterState_Clear() to pass the
correct tstate to _PyGC_CollectNoFail() and _PyGC_Fini().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants