msg324738 - (view) |
Author: William Grzybowski (wg) * |
Date: 2018-09-07 13:14 |
Issue was spotted by @vstinner while reviewing https://github.com/python/cpython/pull/7081 pwd.getpwnam and grp.getgrnam are susceptible to mojibake as they are using encoded bytes instead of unicode in the error message. |
|
|
msg324772 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2018-09-07 17:10 |
New changeset 28658485a54ad5f9df52ecc12d9046269f1654ec by Victor Stinner (William Grzybowski) in branch 'master': bpo-34604: Fix possible mojibake in pwd.getpwnam() and grp.getgrnam() (GH-9098) https://github.com/python/cpython/commit/28658485a54ad5f9df52ecc12d9046269f1654ec |
|
|
msg324805 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2018-09-07 22:07 |
Wouldn't be better to use %R? The name can contain invisible characters or trailing whitespaces, in which case the traceback can look confusing. Since names are likely created with PyUnicode_DecodeFSDefault(), they can contain undecodable bytes represented as surrogates U+D8XX if the current filesystem encoding doesn't match the filesystem encoding used for creating entries. |
|
|
msg324806 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2018-09-07 22:09 |
%R sounds like a good idea, but I suggest to only use %R in the master branch. |
|
|
msg324831 - (view) |
Author: William Grzybowski (wg) * |
Date: 2018-09-08 11:37 |
What is the policy to amend a new commit to master for %R? Create a new PR? Wont that cause problem with NEWS entry? |
|
|
msg324879 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2018-09-09 11:26 |
New changeset 1bcd891c200b8122493ddad5a203331e1a3bfcb5 by Victor Stinner (William Grzybowski) in branch '3.6': [3.6] bpo-34604: Fix possible mojibake in pwd.getpwnam() and grp.getgrnam() (GH-9098) (GH-9105) https://github.com/python/cpython/commit/1bcd891c200b8122493ddad5a203331e1a3bfcb5 |
|
|
msg324880 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2018-09-09 11:27 |
New changeset 7a633ed79cfba2cfc0f80410ddcaeecadc2030e9 by Victor Stinner (William Grzybowski) in branch '3.7': [3.7] bpo-34604: Fix possible mojibake in pwd.getpwnam() and grp.getgrnam() (GH-9098) (GH-9104) https://github.com/python/cpython/commit/7a633ed79cfba2cfc0f80410ddcaeecadc2030e9 |
|
|
msg324882 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2018-09-09 11:34 |
The bug has been fixed. For %R, does someone want to propose a change for master? William? |
|
|
msg324924 - (view) |
Author: William Grzybowski (wg) * |
Date: 2018-09-10 13:37 |
I can do it if you feel the need. Can this same issue be used? Will the new PR require another NEWS entry? |
|
|
msg324949 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2018-09-10 18:36 |
> I can do it if you feel the need. Can this same issue be used? Will the new PR require another NEWS entry? Sure, reuse the same bpo number. You can modify the NEWS entry that you added ;-) |
|
|
msg331141 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2018-12-05 19:10 |
New changeset 34c7f0c04e2b4e715b2c3df1875af8939fbe7d0b by Serhiy Storchaka (William Grzybowski) in branch 'master': bpo-34604: Use %R because of invisible characters or trailing whitespaces. (GH-9165) https://github.com/python/cpython/commit/34c7f0c04e2b4e715b2c3df1875af8939fbe7d0b |
|
|
msg331170 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2018-12-05 21:23 |
New changeset ac8b47c8b4edd59aaee857717d434df52ec49e6c by Serhiy Storchaka in branch '3.7': bpo-34604: Use %R because of invisible characters or trailing whitespaces. (GH-9165). (GH-10947) https://github.com/python/cpython/commit/ac8b47c8b4edd59aaee857717d434df52ec49e6c |
|
|
msg331181 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2018-12-05 22:04 |
New changeset 3a9b3346b03796d8573c063ab4c2407043609459 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-34604: Use %R because of invisible characters or trailing whitespaces. (GH-9165). (GH-10947) (GH-10954) https://github.com/python/cpython/commit/3a9b3346b03796d8573c063ab4c2407043609459 |
|
|