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-45453: Fix test_embed.StdPrinterTests #28916

Merged
merged 1 commit into from Oct 13, 2021
Merged

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Oct 13, 2021

test_embed.StdPrinterTests now always use the file descriptor 1 for
stdout, rather than using sys.stdout.fileno().
PyFile_NewStdPrinter() does crash if the parameter is not 1 or 2.

Fix also a few pyflakes warnings: remove unused import and variables.

https://bugs.python.org/issue45453

test_embed.StdPrinterTests now always use the file descriptor 1 for
stdout, rather than using sys.__stdout__.fileno().
PyFile_NewStdPrinter() does crash if the parameter is not 1 or 2.

Fix also a few pyflakes warnings: remove unused import and variables.
@vstinner vstinner merged commit 678433f into python:main Oct 13, 2021
11 checks passed
@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Oct 13, 2021

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒🤖

@vstinner vstinner deleted the test_embed branch Oct 13, 2021
@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented Oct 13, 2021

GH-28917 is a backport of this pull request to the 3.10 branch.

miss-islington added a commit to miss-islington/cpython that referenced this issue Oct 13, 2021
test_embed.StdPrinterTests now always use the file descriptor 1 for
stdout, rather than using sys.__stdout__.fileno().
PyFile_NewStdPrinter() does crash if the argument is not 1 or 2.

Fix also a few pyflakes warnings: remove unused import and variables.
(cherry picked from commit 678433f25e0d08dad7edf72be8f0cf9420e4ed2c)

Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner added a commit that referenced this issue Oct 13, 2021
test_embed.StdPrinterTests now always use the file descriptor 1 for
stdout, rather than using sys.__stdout__.fileno().
PyFile_NewStdPrinter() does crash if the argument is not 1 or 2.

Fix also a few pyflakes warnings: remove unused import and variables.
(cherry picked from commit 678433f)

Co-authored-by: Victor Stinner <vstinner@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants