Skip to content

gh-90102: Fix pyio return value #125089

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

Merged
merged 1 commit into from
Oct 8, 2024
Merged

Conversation

cmaloney
Copy link
Contributor

@cmaloney cmaloney commented Oct 8, 2024

Spotted by @ngnpope (https://github.com/python/cpython/pull/124922/files#r1791363776).

isatty returns False to indicate the file is not a TTY. The C implementation of _io does that (Py_RETURN_FALSE) but I got the bool backwards in the _pyio implementaiton.

cc: @vstinner

Spotted by @ngnpope.

`isatty` returns False to indicate the file is not a TTY. The C
implementation of _io does that (`Py_RETURN_FALSE`) but I got the
bool backwards in the _pyio implementaiton.
@vstinner
Copy link
Member

vstinner commented Oct 8, 2024

Oops, hopefully the bug was spotted quickly :-)

@vstinner vstinner merged commit 43ad3b5 into python:main Oct 8, 2024
34 checks passed
@cmaloney cmaloney deleted the cmaloney/gh90102-fixup branch October 8, 2024 16:16
efimov-mikhail pushed a commit to efimov-mikhail/cpython that referenced this pull request Oct 9, 2024
Spotted by @ngnpope.

`isatty` returns False to indicate the file is not a TTY. The C
implementation of _io does that (`Py_RETURN_FALSE`) but I got the
bool backwards in the _pyio implementaiton.
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.

2 participants