-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
gh-137780: Python - Windows: Fix Unicode abort in AI gen'd code #137781
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
Conversation
…ing an abort With the rise of AI generate code, python Windows is suffering from this bug at an exponentiate rate. I hope that this commit can be accepted is, or a conversation can be had about the proper target for a fix like this. Perhaps `textio.c` is too coarse grained, and it needs to be an attribute to the print function (and logging).
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
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.
Unfortunately, this is a breaking change. We can't just change default values in public interfaces without a deprecation period (which is now supposed to be five years).
This is also something that needs a test case, but let's discuss on the issue whether this is worth doing first.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
The amount of AI emoticons are exploding. It's a bad situation. Python windows is just breaking everywhere now. Anyway to elevate? People don't like emoticons, AI loves it. |
@zackees Please respond on the issue. It's not clear what problem you are trying to solve. |
The author cannot reproduce, issue has been closed. |
I have reproduced this issue in Python 3.13.6. The problem occurs whenever output containing a non-ASCII character is redirected. I've attached a zip archive with a trivial demo and a screenshot of the output: Can issue #137780 be reopened? Note: this was apparently caused by the same issue: The workaround is: |
Just tried to repro this and couldn't with python 3.13.7 |
I just installed 3.13.7 and the problem still occurs. To reproduce it, just unzip the contents of python_bug_137781_demo_for_zackees2.zip into a folder and run python_bug_137781_demo_for_zackees.bat from a command prompt, from either cmd or PowerShell, in either normal mode or Administrator mode. python_bug_137781_demo_for_zackees2.zip There's a screenshot in there, too. |
@zackees @burtonsys please continue discussion on the issue rather than a closed PR. |
With the rise of AI generate code, python Windows is suffering from this bug at an exponentiate rate. I hope that this commit can be accepted as-is, or a conversation can be had about the proper target for a fix like this. Perhaps
textio.c
is too coarse grained, and it needs to be an attribute to the print function (and logging).#137780
This commit represents fixing it for a whole class of the python standard library functions.