-
-
Notifications
You must be signed in to change notification settings - Fork 33.3k
gh-121711: Set -m asyncio return_code to 1 for ENOTTY
#121714
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
gh-121711: Set -m asyncio return_code to 1 for ENOTTY
#121714
Conversation
| def test_asyncio_repl_is_ok(self): | ||
| assert_python_ok("-m", "asyncio") | ||
| def test_asyncio_repl_no_tty_fails(self): | ||
| assert assert_python_failure("-m", "asyncio") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we now know that the asyncio REPL is not working? Initially, test_asyncio_repl_is_ok was added because the asyncio repl is not working on Windows due to a bug.
Additionally: We don't use assert statement in our test suite.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fact that the new test passes means that assert_python_ok never tested weather the repl works.
I think t should be testet without setting stdin on Popen (inside assert_python_ok).
I can add that test, but it will fail because of another bug I found and am intending to fix soonish (report pending, easy to reproduce by running python -m asyncio from the main branch).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Eclips4 asyncio REPL is currently broken and this wasn't caught.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fact that the new test passes means that
assert_python_oknever tested weather the repl works.I think t should be testet without setting
stdinonPopen(insideassert_python_ok).I can add that test, but it will fail because of another bug I found and am intending to fix soonish (report pending, easy to reproduce by running
python -m asynciofrom the main branch).
Yes, you're right, I'm also experiencing the problem with python -m asyncio:
./python -m asyncio
asyncio REPL 3.14.0a0 (heads/main:dc03ce797a, Jul 13 2024, 15:05:30) [GCC 13.2.0] on linux
Use "await" directly instead of "asyncio.run()".
Type "help", "copyright", "credits" or "license" for more information.
>>> import asyncio
TypeError: run_multiline_interactive_console() missing 1 required positional argument: 'namespace'
Internal error, exiting asyncio REPL...…GH-121714) Set return_code to 1 for ENOTTY (cherry picked from commit a183474) Co-authored-by: Milan Oberkirch <milan.oberkirch@geops.com>
|
GH-121718 is a backport of this pull request to the 3.13 branch. |
…#121714) Set return_code to 1 for ENOTTY
See #121711 for details
python -m asyncioreturns 0 when failing with ENOTTY in the runner thread #121711