[issue10117] Tools/scripts/reindent.py fails on non-UTF-8 encodings

2020-09-18 Thread STINNER Victor
STINNER Victor added the comment: > Committed in r85695. Leaving open to discuss whether anything can/should be > done for the case when reindent acts as an stdin to stdout filter. Also, > what is the policy on backporting Tools' bug fixes? This is the commit: commit 4a98e3b6d06e5477e5d62

[issue10117] Tools/scripts/reindent.py fails on non-UTF-8 encodings

2020-09-18 Thread Irit Katriel
Irit Katriel added the comment: Since there won't be a python 2.7 backport, should this issue be closed? -- nosy: +iritkatriel status: pending -> open ___ Python tracker ___ _

[issue10117] Tools/scripts/reindent.py fails on non-UTF-8 encodings

2018-04-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with Éric. Standard input and output are text streams in Python 3. The user can control their encoding by setting locale or PYTHONIOENCODING. I think this issue can be closed now unless somebody want to backport the fix to 2.7. -- status:

[issue10117] Tools/scripts/reindent.py fails on non-UTF-8 encodings

2012-10-13 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue10117] Tools/scripts/reindent.py fails on non-UTF-8 encodings

2011-07-08 Thread Éric Araujo
Éric Araujo added the comment: Even with PYTHONIOENCODING? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10117] Tools/scripts/reindent.py fails on non-UTF-8 encodings

2011-07-07 Thread STINNER Victor
STINNER Victor added the comment: > When working as a filter, reindent should use sys.{stdin,stdout}.encoding > (defaulting to sys.getdefaultencoding()) for reading and writing, > respectively. It just doesn't work: you cannot read a ISO-8859-1 file from UTF-8 (if your locale encoding is UTF-8

[issue10117] Tools/scripts/reindent.py fails on non-UTF-8 encodings

2011-07-07 Thread Éric Araujo
Éric Araujo added the comment: This is a lot more code than what I’d have expected. What is your opinion on my previous message? -- ___ Python tracker ___ _

[issue10117] Tools/scripts/reindent.py fails on non-UTF-8 encodings

2011-07-07 Thread STINNER Victor
STINNER Victor added the comment: reindent_coding.py: patch fixing reindent.py when using pipes (stdin and stdout). -- versions: +Python 3.3 Added file: http://bugs.python.org/file22611/reindent_coding.py ___ Python tracker

[issue10117] Tools/scripts/reindent.py fails on non-UTF-8 encodings

2011-07-07 Thread STINNER Victor
STINNER Victor added the comment: > Leaving open to discuss whether anything can/should be done > for the case when reindent acts as an stdin sys.stdin.buffer and sys.stdout.buffer should be used with tokenize.detect_encoding(). We may read first stdin and write it into a BytesIO object to be

[issue10117] Tools/scripts/reindent.py fails on non-UTF-8 encodings

2010-10-21 Thread Éric Araujo
Éric Araujo added the comment: When working as a filter, reindent should use sys.{stdin,stdout}.encoding (defaulting to sys.getdefaultencoding()) for reading and writing, respectively. Detecting encoding on streams is not worth it IMO. People can set PYTHONIOENCODING for baroque needs. ---

[issue10117] Tools/scripts/reindent.py fails on non-UTF-8 encodings

2010-10-18 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed in r85695. Leaving open to discuss whether anything can/should be done for the case when reindent acts as an stdin to stdout filter. Also, what is the policy on backporting Tools' bug fixes? -- __

[issue10117] Tools/scripts/reindent.py fails on non-UTF-8 encodings

2010-10-15 Thread Georg Brandl
Georg Brandl added the comment: LGTM. -- nosy: +georg.brandl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue10117] Tools/scripts/reindent.py fails on non-UTF-8 encodings

2010-10-15 Thread Éric Araujo
Éric Araujo added the comment: +1. -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue10117] Tools/scripts/reindent.py fails on non-UTF-8 encodings

2010-10-15 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +christian.heimes, flox, tim_one ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue10117] Tools/scripts/reindent.py fails on non-UTF-8 encodings

2010-10-15 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : Tools/scripts/reindent.py -d Lib/test/encoded_modules/module_koi8_r.py Traceback (most recent call last): File "Tools/scripts/reindent.py", line 310, in main() File "Tools/scripts/reindent.py", line 93, in main check(arg) File "Tools/scrip