[issue23301] ConfigParser does not handle square brackets in section name

2015-01-22 Thread Sebastian Bank
New submission from Sebastian Bank: ConfigParser parses section lines containing square brackets like '[spam [eggs] spam]' up to the first instead of the last occurrence of ']' preventing roundtrips: s = StringIO() c1 = ConfigParser() c1.add_section('spam [eggs]') c1.write(s) s.seek(0

[issue20923] ConfigParser should nested [] in section names.

2015-01-29 Thread Sebastian Bank
Sebastian Bank added the comment: If this is the intended behaviuour, I guess ConfigParser should warn the user if he supplies a section name with a ']' (prevent failed roundtrips). See http://bugs.python.org/issue23301 The current behaviour looks like the opposite of Postel's law

[issue20923] ConfigParser should nested [] in section names.

2015-11-24 Thread Sebastian Bank
Sebastian Bank added the comment: Terry: I am not so sure about that interpretation. Do we agree that the INI-files are the data/message? ConfigParser refuses to accept dirty INI-Files (with ']' in section names) but will produce this kind of files. I we see the arguments given to ConfigParser

[issue26327] File > Save in IDLE shell window not working

2016-02-10 Thread Sebastian Bank
New submission from Sebastian Bank: Under Python 2.7.11 (Win 7), saving of the IDLE shell output produces no file if the output contains non-ASCII characters, e.g. after doing (before this, it does work): >>> print u'sp\xe4m' späm >>> When saving (generally), the

[issue19764] subprocess: use PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUPINFOEX on Windows Vista

2018-06-30 Thread Sebastian Bank
Sebastian Bank added the comment: AFAIU, this change broke the following usage of subprocess on Windows (re-using a subprocess.STARTUPINFO instance to hide the command window): import os, subprocess STARTUPINFO = subprocess.STARTUPINFO() STARTUPINFO.dwFlags

[issue15927] csv.reader() does not support escaped newline when quoting=csv.QUOTE_NONE

2018-01-11 Thread Sebastian Bank
Sebastian Bank <sebastian.b...@uni-leipzig.de> added the comment: I am not sure about the design vs. code bug distinction, but what makes me think this should be fixed is primarily the broken round-trip (already mentioned above): >>> import io, csv >>> def roun

[issue31590] CSV module incorrectly treats escaped newlines as new records if unquoted

2018-01-11 Thread Sebastian Bank
Sebastian Bank <sebastian.b...@uni-leipzig.de> added the comment: https://bugs.python.org/issue15927#msg309811 gives sme code examples illustrating why I think this should be backported (and also the documentation should be changed for both Python 2 and 3). -- nosy:

[issue12178] csv writer doesn't escape escapechar

2018-01-11 Thread Sebastian Bank
Sebastian Bank <sebastian.b...@uni-leipzig.de> added the comment: Hi, is there something we can do to get this going? As the issue breaks round-trip, it currently requires work-arounds like this: https://github.com/cldf/csvw/blob/1324550266c821ef32d1e79c124191e93aefbfa8/csvw/dsv.py#L

[issue15927] csv.reader() does not support escaped newline when quoting=csv.QUOTE_NONE

2018-01-12 Thread Sebastian Bank
Sebastian Bank <sebastian.b...@uni-leipzig.de> added the comment: To be complete, the docs of Dialect.escapechar should probably also say that it is used to escape itself. However, note that csw.writer currently only does this with csv.QUOTE_NONE (breaking round-trip otherwise:

[issue34044] subprocess: reusing STARTUPINFO breaks under 3.7 (Windows)

2018-07-05 Thread Sebastian Bank
Sebastian Bank added the comment: Perfect, thanks for the quick fix. -- ___ Python tracker <https://bugs.python.org/issue34044> ___ ___ Python-bugs-list mailin

[issue34044] subprocess: reusing STARTUPINFO breaks under 3.7 (Windows)

2018-07-04 Thread Sebastian Bank
New submission from Sebastian Bank : AFAIU, the change for https://bugs.python.org/issue19764 broke the following usage of subprocess on Windows (re-using a subprocess.STARTUPINFO instance to hide the command window): import os, subprocess STARTUPINFO = subprocess.STARTUPINFO

[issue19764] subprocess: use PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUPINFOEX on Windows Vista

2018-07-04 Thread Sebastian Bank
Sebastian Bank added the comment: Thanks Eryk. Done: https://bugs.python.org/issue34044 -- ___ Python tracker <https://bugs.python.org/issue19764> ___ ___ Pytho

[issue37549] os.dup() fails for standard streams on Windows 7

2019-07-21 Thread Sebastian Bank
Change by Sebastian Bank : -- nosy: +xflr6 ___ Python tracker <https://bugs.python.org/issue37549> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12178] csv writer doesn't escape escapechar

2021-07-13 Thread Sebastian Bank
Sebastian Bank added the comment: Thanks Tal. AFAICT there was an undocumented change in behaviour related to this fix. Python 3.9 quotes values with escapechar: ``` import csv import io kwargs = {'escapechar': '\\'} value = 'spam\\eggs' print(value) with io.StringIO() as buf

[issue44861] csv.writer stopped to quote values with escapechar with csv.QUOTE_MINIMAL in Python 3.10

2021-08-07 Thread Sebastian Bank
Sebastian Bank added the comment: IIUC there is no way to work around this from client/downstream code (to get the olf 3.6 to 3.9 behaviour), so this might break assertions on the output of `csv.writer` for users of `escapechar` whenever the data to be written contains the escapcechar (e.g

[issue44861] csv.writer stopped to quote values with escapechar with csv.QUOTE_MINIMAL in Python 3.10

2021-08-07 Thread Sebastian Bank
New submission from Sebastian Bank : AFAICT there was an undocumented change in behaviour related to the fix of https://bugs.python.org/issue12178 (also reported in https://bugs.python.org/issue12178#msg397440): Python 3.9 quotes values with escapechar: ``` import csv import io kwargs

[issue44861] csv.writer stopped to quote values with escapechar with csv.QUOTE_MINIMAL in Python 3.10

2021-08-07 Thread Sebastian Bank
Sebastian Bank added the comment: The 3.9 behaviour is write: "spam\eggs" The 3.10 behaviour is write: spam\\eggs I think at least the change in csv.QUOTE_MINIMAL behviour should be documented (maybe adding hint to avoid the `escapechar` option for consist