bpo-36124: Add PyInterpreterState.dict.#12132
bpo-36124: Add PyInterpreterState.dict.#12132ericsnowcurrently merged 4 commits intopython:masterfrom
Conversation
|
FWIW, I'm not convinced we should add this (as I noted on the tracker issue). So I've marked the PR |
|
interp->dict leaks when the PyInterpreterState is destroyed. Please Py_CLEAR() it! Also, make sure it is done at the very last moment; otherwise, race conditions can recreate interp->dict after it was cleared, and then that would leak. |
|
@arigo, thanks for noticing that. Something was nagging at me and I couldn't figure out what. You saved me some time. :) That's what I get for hurrying out a PR at the end of the day! When you are talking about "at the very last moment", you mean after everything has been cleared which might cause |
63223af to
524ea7d
Compare
8aca567 to
5e576bb
Compare
5e576bb to
e306c42
Compare
|
Thanks! At least, the cffi tests pass with PyInterpreter_GetDict(). |
This parallels
PyThreadState.dict. Likewise we addPyInterpreterState_GetDict().https://bugs.python.org/issue36124