X Tutup
The Wayback Machine - https://web.archive.org/web/20221223181238/https://github.com/python/cpython/pull/28916
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.
@bedevere-bot bedevere-bot added the tests Tests in the Lib/test dir label Oct 13, 2021
@vstinner vstinner merged commit 678433f into python:main Oct 13, 2021
11 checks passed
@miss-islington
Copy link
Contributor

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 commented Oct 13, 2021

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request 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>
vstinner added a commit that referenced this pull request 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
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants
X Tutup