| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM.
In Py_Main(), read_command_line() is called after _Py_InitializeCore, so after the interpreter had been already created and after the sys module has been initialized.
For example, in Python 3.5, Py_Initialize() was only called after the command line has been parsed.
It seems like past changes now make this change possible and correct.
Sorry, something went wrong.
|
Oh, test_showrefcount() of test_cmd_line fails. You have to check sys._xoptions['showrefcount'] before calling _PyDebug_PrintTotalRefs(). Move the following _PyDebug_PrintTotalRefs() code: xoptions = PySys_GetXOptions();
if (xoptions == NULL)
return;
value = _PyDict_GetItemId(xoptions, &PyId_showrefcount);
if (value == Py_True)
in Py_FinalizeEx(), before _PyImport_Fini(). Since _PyDebug_PrintTotalRefs() is private, it's ok to rewrite it to move the test into the caller. But you have to take care of "#ifdef Py_REF_DEBUG". |
Sorry, something went wrong.
There was a problem hiding this comment.
If you use #ifdef Py_REF_DEBUG, maybe _PY_DEBUG_PRINT_TOTAL_REFS() macro can go away.
Sorry, something went wrong.
|
Yeah, that's what I did. |
Sorry, something went wrong.
There was a problem hiding this comment.
Ah yes, you removed the macro. Nice.
LGTM.
Sorry, something went wrong.
This reverts commit 8728018.
| Back | FazBrowse Home | New Git URL |
Resolves bpo-31420.
https://bugs.python.org/issue30860