[issue24142] ConfigParser._read doesn't join multi-line values collected while reading if a ParsingError occured
Florian Höch added the comment: > Thanks for your patch! As you can see, 2.7 is no longer touched as the codebases diverged. Thanks, although I have to say it's a little bit unfortunate that Python 2.7 will be left in a worse state than 2.6 where this bug did not exist. -- ___ Python tracker <http://bugs.python.org/issue24142> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24142] ConfigParser._read doesn't join multi-line values collected while reading if a ParsingError occured
Florian Höch added the comment: It seems this hasn't landed yet? -- ___ Python tracker <http://bugs.python.org/issue24142> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22862] os.walk fails on undecodable filenames
New submission from Florian Höch: If 'top' is an unicode directory name, os.listdir can still return non-unicode filenames if they can't be decoded. This case is not handled in the Python 2.x standard library version of os.walk and will cause join(top, name) to fail on such filenames with an UnicodeDecodeError. -- components: Library (Lib) messages: 231110 nosy: fhoech priority: normal severity: normal status: open title: os.walk fails on undecodable filenames type: behavior versions: Python 2.7 ___ Python tracker <http://bugs.python.org/issue22862> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22862] os.walk fails on undecodable filenames
Florian Höch added the comment: This problem only affects Linux as far as I know (in my case I'm using Fedora 21 Beta). -- ___ Python tracker <http://bugs.python.org/issue22862> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22862] os.walk fails on undecodable filenames
Florian Höch added the comment: 1) Is not yet possible for me unfortunately, some libraries I require are not yet available for Python 3 (but in the long run, this would be my preferred solution) 2) Would necessitate too many changes in a carefully crafted, unicode-only application. I think I'll just override os.listdir and filter out filenames that are not decodable, or override os.walk and do something equivalent. -- ___ Python tracker <http://bugs.python.org/issue22862> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22862] os.walk fails on undecodable filenames
Florian Höch added the comment: > I'm curious, which libraries? wxPython and wexpect (wexpect I could probably port myself, so the problem is mainly with wx) > Oh, I forgot to say that it's not possible to fix this issue in Python 2. > Backporting the PEP 383 in Python 2 requires deep changes in the Unicode > machinery, starting by the UTF-8 codec. Ok, that's understandable of course. -- ___ Python tracker <http://bugs.python.org/issue22862> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24142] ConfigParser._read doesn't join multi-line values collected while reading if a ParsingError occured
New submission from Florian Höch: If a ParsingError occurs while reading a config file, the multi-line values collected while reading will never be joined because the error is raised before this can happen. This leads to very unexpected results, e.g. consider the following config.ini: [DEFAULT] test = test invalid >>> cfg = ConfigParser.ConfigParser() >>> cfg.read(['config.ini']) This will raise a ParsingError as expected. But the option values that were parsed without error are now all lists instead of strings: >>> cfg.get('DEFAULT', test') ['test'] Patch attached. -- components: Library (Lib) files: ConfigParser.py.patch keywords: patch messages: 242718 nosy: fhoech priority: normal severity: normal status: open title: ConfigParser._read doesn't join multi-line values collected while reading if a ParsingError occured type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file39312/ConfigParser.py.patch ___ Python tracker <http://bugs.python.org/issue24142> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24142] ConfigParser._read doesn't join multi-line values collected while reading if a ParsingError occured
Florian Höch added the comment: [Btw, you might want to fix the contributor agreement form - I can't sign it because it shows no text, so I don't know what I'm supposed to enter in the fields (Firefox 37.0.2)] -- ___ Python tracker <http://bugs.python.org/issue24142> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com