Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-44131: Py_FrozenMain() uses PyConfig_SetBytesArgv() #26201

Merged
merged 1 commit into from May 20, 2021

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

@vstinner vstinner commented May 17, 2021

@corona10: Would you mind to review this change?

@corona10 corona10 self-requested a review 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).
@vstinner
Copy link
Member Author

@vstinner vstinner commented May 18, 2021

PR rebased on top of commit 6ba6d06 fix.

@corona10
Copy link
Member

@corona10 corona10 commented May 18, 2021

@vstinner I will review this PR tonight :)

Copy link
Member

@corona10 corona10 left a comment

lgtm

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

@vstinner vstinner commented May 20, 2021

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.

None yet

4 participants