-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
gh-141615: Check stdin instead of stdout for use_rawinput in pdb #141616
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
base: main
Are you sure you want to change the base?
Conversation
|
Maybe I'm crazy but @iritkatriel could you double check this? It's very hard for me to believe this has been in our code base for 20 years. |
iritkatriel
left a comment
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.
Yeah, I guess nobody tried it.
I was able to reproduce the bug and see that this PR fixed it.
Cam you think of anything that used to work and will not with this change?
|
There are some very theoretical and artificial behavior changes. For example, if the code used the default stdin, but a customized out, the prompt would now be passed to stdout instead of customized out now - which is the correct behavior. Also the completer would work properly now. I think the key is - I think this is just a typo and it does not quite make sense to determine whether to use raw input based on stdout. |
|
I agree, it's a big fix. But I think worth a whatsnew entry in case someone is surprised by something. |
|
This feels like really minor to be put on whatsnew. I doubt if anyone is affected by this. To be honest, if someone is using it, we should've gotten a bug report in the last 20 years... |
|
Are you all sure? The way I see it, since Not that I fully understand pdb.py any more... There are many calls to |
|
I actually thought about that. The reason I did not convince myself is this:
But now that @gvanrossum mentioned it, I took a look at the docs of
FIrst of all, it's obviously wrong about However, I'm still not 100% convinced. Let's say we are using the real keyboard as stdin, and we are trying to redirect the output data to a different out. Would it make more sense to have a prompt showing on my screen to "prompt" me for typing, or to send the prompt to the out channel and leave me an empty screen? Is the latter more intuitive than the former? |
|
I see. It is indeed defensible that with So I will approve your change. |
|
Thanks. I'll leave this PR open for a day or two and see if anyone objects this. |
Uh oh!
There was an error while loading. Please reload this page.