[issue17429] platform.platform() can throw Unicode error

2013-12-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4580976c07cb by Victor Stinner in branch '3.3': Issue #17429: platform.linux_distribution() now decodes files from the UTF-8 http://hg.python.org/cpython/rev/4580976c07cb New changeset 407f18c8ce8a by Victor Stinner in branch 'default': (Merge 3.3)

[issue17429] platform.platform() can throw Unicode error

2013-12-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 831b2c80a9c9 by Victor Stinner in branch 'default': Issue #17429: some PEP 8 compliance fixes for the platform modules, add whitespaces http://hg.python.org/cpython/rev/831b2c80a9c9 -- ___ Python

[issue17429] platform.platform() can throw Unicode error

2013-12-08 Thread STINNER Victor
STINNER Victor added the comment: Thanks Toshio Kuratomi for your patch. I simplified the unit test. I'm not sure that resetlocale restores the locale in its previous state. I don't want to rely on two specific locales ('pt_BR.UTF8' and 'pt_BR.ISO8859-1') for a such simple test. We have

[issue17429] platform.platform() can throw Unicode error

2013-12-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset a951ab03bda0 by Victor Stinner in branch '3.3': Issue #17429: Oops, remove unused import http://hg.python.org/cpython/rev/a951ab03bda0 New changeset 209bf9576dc8 by Victor Stinner in branch 'default': (Merge 3.3) Issue #17429: Oops, remove unused

[issue17429] platform.platform() can throw Unicode error

2013-12-08 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17429 ___

[issue17429] platform.platform() can throw Unicode error

2013-10-18 Thread STINNER Victor
STINNER Victor added the comment: Ping myself, I just installed Fedora 19 and I cannot run the Python test suite with the ASCII locale encoding, because of this bug. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17429

[issue17429] platform.platform() can throw Unicode error

2013-03-25 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Patch fixing the issues raised in r.david.murray's review: * Merged _find_linux_release_file() back into linux_distribution() and broke out _UNIXCONFDIR module level variable to enable mocking of the unittest data * Fix already present style issue in

[issue17429] platform.platform() can throw Unicode error

2013-03-21 Thread R. David Murray
R. David Murray added the comment: Review comments added. -- nosy: +r.david.murray stage: - patch review type: - behavior versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17429

[issue17429] platform.platform() can throw Unicode error

2013-03-20 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Okay, new version of the patch with a unittest. Re: os-release; I don't believe the current code can handle that file. i\It changes format from a simple string (in most Linux distros) to key value pairs. We'll probably need an update to the code to deal

[issue17429] platform.platform() can throw Unicode error

2013-03-20 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Added NEWS file. Rebased against hg default. Ready for review. -- Added file: http://bugs.python.org/file29509/00175-platform-unicode.patch ___ Python tracker rep...@bugs.python.org

[issue17429] platform.platform() can throw Unicode error

2013-03-19 Thread Zbyszek Jędrzejewski-Szmek
Zbyszek Jędrzejewski-Szmek added the comment: At least for /etc/os-release, which is slated to replace /etc/fedora-release and other distribution specific files, the encoding in mandated to be UTF-8: http://www.freedesktop.org/software/systemd/man/os-release.html All strings should be in

[issue17429] platform.platform() can throw Unicode error

2013-03-16 Thread STINNER Victor
STINNER Victor added the comment: 00175-platform-unicode.patch looks good to me, but it lacks an unit test. -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17429 ___

[issue17429] platform.platform() can throw Unicode error

2013-03-16 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: I'm at pycon. I'll find someone during the sprints to teach me how the unittests are organized. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17429

[issue17429] platform.platform() can throw Unicode error

2013-03-15 Thread Toshio Kuratomi
New submission from Toshio Kuratomi: Tested on python-3.2 and python-3.3. platform.platform() looks for a file in /etc/ that looks like it will contain the name of the Linux distribution that python3 is running on. Once found, it reads the contents of the file to have a name for the Linux

[issue17429] platform.platform() can throw Unicode error

2013-03-15 Thread Toshio Kuratomi
Changes by Toshio Kuratomi a.bad...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file29416/00175-platform-unicode.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17429

[issue17429] platform.platform() can throw Unicode error

2013-03-15 Thread Martin v . Löwis
Martin v. Löwis added the comment: What's the most likely encoding? UTF-8? I suggest we assume UTF-8, and use the surrogate-escape error handler to deal with the cases when it isn't. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org

[issue17429] platform.platform() can throw Unicode error

2013-03-15 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: I agree. In my experience, utf-8 is the most common encoding. Updated patch that defaults to utf-8 instead of the user's locale is attached. -- Added file: http://bugs.python.org/file29420/00175-platform-unicode.patch