bpo-44131: Py_FrozenMain() uses PyConfig_SetBytesArgv() by vstinner · Pull Request #26201 · python/cpython

Conversation

@vstinner

Moreover, Py_FrozenMain() relies on Py_InitializeFromConfig() to
handle the PYTHONUNBUFFERED environment variable and configure C
stdio streams like stdout (make the stream unbuffered).

https://bugs.python.org/issue44131

@vstinner

@corona10: Would you mind to review this change?

Moreover, Py_FrozenMain() relies on Py_InitializeFromConfig() to
handle the PYTHONUNBUFFERED environment variable and configure C
stdio streams like stdout (make the stream unbuffered).

@vstinner

PR rebased on top of commit 6ba6d06 fix.

@corona10

corona10

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@vstinner

Thanks for the review @corona10.

It's a pleasure to remove code which calls directly Py_DecodeLocale() without preinitializing Python :-p

Labels