Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented May 17, 2021

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
Copy link
Member Author

@corona10: Would you mind to review this change?

@corona10 corona10 self-requested a review May 17, 2021 23:45
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
Copy link
Member Author

PR rebased on top of commit 6ba6d06 fix.

@corona10
Copy link
Member

@vstinner I will review this PR tonight :)

Copy link
Member

@corona10 corona10 left a comment

Choose a reason for hiding this comment

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

lgtm

@vstinner vstinner merged commit 58a9939 into python:main May 20, 2021
@vstinner vstinner deleted the frozenmain_argv branch May 20, 2021 10:08
@vstinner
Copy link
Member Author

Thanks for the review @corona10.

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

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.

4 participants