[issue33568] Inconsistent behavior of non-ascii handling in EmailPolicy.fold
Change by Licht Takeuchi <lich...@outlook.jp>: -- keywords: +patch pull_requests: +6639 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33568> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33568] Inconsistent behavior of non-ascii handling in EmailPolicy.fold
Change by Licht Takeuchi <lich...@outlook.jp>: -- type: -> behavior ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33568> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33568] Inconsistent behavior of non-ascii handling in EmailPolicy.fold
New submission from Licht Takeuchi <lich...@outlook.jp>: policy.utf8 is False, but non-ascii are not well-handled. Repro. code. ``` Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 18:10:19) [GCC 7.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from email.message import EmailMessage >>> from email.policy import default >>> >>> policy = default.clone() >>> policy.utf8 False >>> msg = EmailMessage() >>> msg["Subject"] = "á" >>> policy.fold("Subject", msg["Subject"]) 'Subject: =?utf-8?q?=C3=A1?=\n' >>> policy.fold("Subject", 'á') 'Subject: á\n' ``` -- components: Library (Lib) messages: 317025 nosy: licht-t priority: normal severity: normal status: open title: Inconsistent behavior of non-ascii handling in EmailPolicy.fold versions: Python 3.6, Python 3.7, Python 3.8 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33568> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33524] non-ascii characters in headers causes TypeError on email.policy.Policy.fold
Change by Licht Takeuchi <lich...@outlook.jp>: -- keywords: +patch pull_requests: +6625 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33524> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33525] os.spawnvpe() returns error code 127 instead of raising when env argument is invalid.
Change by Licht Takeuchi <lich...@outlook.jp>: -- keywords: +patch pull_requests: +6578 stage: needs patch -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33525> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33471] string format with 'n' failling with french locales
Change by Licht Takeuchi <lich...@outlook.jp>: -- keywords: +patch pull_requests: +6535 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33471> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33471] string format with 'n' failling with french locales
Licht Takeuchi <lich...@outlook.jp> added the comment: I am working on this and have found why this is happening. I'll make PR in few days. -- nosy: +licht-t ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33471> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20087] Mismatch between glibc and X11 locale.alias
Licht Takeuchi <lich...@outlook.jp> added the comment: Hi all, The locale in the latest Ubuntu 18.04 contains en_IL as valid locale, but Python cannot resolve this. This makes test failure in pandas. https://github.com/pandas-dev/pandas/issues/20957 en_IL has significant impact because this is English locale and now supported in the latest Ubuntu. Is there any plan to add only en_IL? (Note that I've already created the PR. ( https://github.com/python/cpython/pull/6707 )) ``` (pandas-dev) [pandas] locale -a C C.UTF-8 en_AG en_AG.utf8 en_AU.utf8 en_BW.utf8 en_CA.utf8 en_DK.utf8 en_GB.utf8 en_HK.utf8 en_IE.utf8 en_IL en_IL.utf8 en_IN en_IN.utf8 en_NG en_NG.utf8 en_NZ.utf8 en_PH.utf8 en_SG.utf8 en_US.utf8 en_ZA.utf8 en_ZM en_ZM.utf8 en_ZW.utf8 ja_JP.utf8 POSIX ``` -- nosy: +licht-t ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue20087> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33432] No locale alias mapping key for en_IL
Licht Takeuchi <lich...@outlook.jp> added the comment: en_IL has significant impact because this is English locale and now supported in the latest Ubuntu. Is there any plan to add only en_IL? -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33432> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33432] No locale alias mapping key for en_IL
Change by Licht Takeuchi <lich...@outlook.jp>: -- keywords: +patch pull_requests: +6400 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33432> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33432] No locale alias mapping key for en_IL
New submission from Licht Takeuchi <lich...@outlook.jp>: The new locale en_IL is added to glibc. But there is no key for this in the locale alias mapping. https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=146ffc146fe3bf97cd3bc1a649f1ffa8acfa4a0d https://github.com/python/cpython/blob/master/Lib/locale.py#L850 The locale in latest Ubuntu 18.04 contains en_IL as valid locale, but Python cannot resolve this. This makes test failure in pandas. https://github.com/pandas-dev/pandas/issues/20957 ``` (pandas-dev) [pandas] locale -a C C.UTF-8 en_AG en_AG.utf8 en_AU.utf8 en_BW.utf8 en_CA.utf8 en_DK.utf8 en_GB.utf8 en_HK.utf8 en_IE.utf8 en_IL en_IL.utf8 en_IN en_IN.utf8 en_NG en_NG.utf8 en_NZ.utf8 en_PH.utf8 en_SG.utf8 en_US.utf8 en_ZA.utf8 en_ZM en_ZM.utf8 en_ZW.utf8 ja_JP.utf8 POSIX ``` -- components: Library (Lib) messages: 316206 nosy: licht-t priority: normal severity: normal status: open title: No locale alias mapping key for en_IL type: behavior versions: Python 3.6 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33432> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue32255] csv.writer converts None to '""\n' when it is first line, otherwise '\n'
Licht Takeuchi <lich...@outlook.jp> added the comment: PR is now fixed so as to follow the behavior on Python 2.7! -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32255> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue32255] csv.writer converts None to '""\n' when it is first line, otherwise '\n'
Licht Takeuchi <lich...@outlook.jp> added the comment: Thanks for your investigation! Would you mind if I create a new patch? -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32255> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue32255] csv.writer converts None to '""\n' when it is first line, otherwise '\n'
Licht Takeuchi <lich...@outlook.jp> added the comment: The current implementation does not quote in most case. IOW, the patch which makes all '' is quoted is the breaking change (Note that there are some applications does not use quoting). -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32255> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue32255] csv.writer converts None to '""\n' when it is first line, otherwise '\n'
Licht Takeuchi <lich...@outlook.jp> added the comment: I think the first one is buggy and there are two reasons. 1. The both are valid CSV. The double quoting is unnecessary. Some other applications, eg. Excel, does not use the double quoting. Also, the current implementation make to quote only if the string is '' and the output is at the first line. 2. '' is not quoted when the two columns case. ## Input: ``` import csv fp = open('test.csv', 'w') w = csv.writer(fp, dialect=None) w.writerow(['', '']) w.writerow(['3', 'a']) fp.close() ``` ## Output: ``` , 3,a ``` These seem inconsistent and the quoting is unnecessary in this case. # References http://www.ietf.org/rfc/rfc4180.txt -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32255> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue32255] csv.writer converts None to '""\n' when it is first line, otherwise '\n'
Change by Licht Takeuchi <lich...@outlook.jp>: -- keywords: +patch pull_requests: +4672 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32255> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue32255] csv.writer converts None to '""\n' when it is first line, otherwise '\n'
New submission from Licht Takeuchi <lich...@outlook.jp>: Inconsistent behavior while reading a single column CSV. I have the patch and waiting for the CLA response. # Case 1 ## Input ``` import csv fp = open('test.csv', 'w') w = csv.writer(fp) w.writerow(['']) w.writerow(['1']) fp.close() ``` ## Output ``` "" 1 ``` # Case 2 ## Input ``` import csv fp = open('test.csv', 'w') w = csv.writer(fp) w.writerow(['1']) w.writerow(['']) fp.close() ``` ## Output ``` 1 ``` -- components: IO messages: 307851 nosy: licht-t priority: normal severity: normal status: open title: csv.writer converts None to '""\n' when it is first line, otherwise '\n' type: behavior versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32255> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com