[issue26464] str.translate() unexpectedly duplicates characters

2016-03-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6643c5cc9797 by Victor Stinner in branch '3.5': Issue #26464: Fix unicode_fast_translate() again https://hg.python.org/cpython/rev/6643c5cc9797 -- ___ Python tracker

[issue26464] str.translate() unexpectedly duplicates characters

2016-03-01 Thread STINNER Victor
STINNER Victor added the comment: > LGTM. Thanks for the review. I pushed my fix. Sorry for the regression, I hate being responsible of a regression in a core feature :-/ I may even deserve a release, but Python doesn't have the habit of "release often" yet :-( -- nosy: +larry

[issue26464] str.translate() unexpectedly duplicates characters

2016-03-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 27ba9ba5deb1 by Victor Stinner in branch '3.5': Fix str.translate() https://hg.python.org/cpython/rev/27ba9ba5deb1 -- nosy: +python-dev ___ Python tracker

[issue26464] str.translate() unexpectedly duplicates characters

2016-03-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- assignee: serhiy.storchaka -> haypo stage: needs patch -> commit review ___ Python tracker ___

[issue26464] str.translate() unexpectedly duplicates characters

2016-03-01 Thread STINNER Victor
STINNER Victor added the comment: > See change cca6b056236a of issue #21118. The bug was introduced in Python v3.5.0a1. -- ___ Python tracker ___

[issue26464] str.translate() unexpectedly duplicates characters

2016-03-01 Thread STINNER Victor
STINNER Victor added the comment: Oh... I see. It's a bug introduced by the optimization for ASCII replacing one character with another ASCII character or deleting a character: unicode_fast_translate(). See change cca6b056236a of issue #21118. There is a confusion in the code between input

[issue26464] str.translate() unexpectedly duplicates characters

2016-03-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +haypo ___ Python tracker ___ ___

[issue26464] str.translate() unexpectedly duplicates characters

2016-03-01 Thread Eryk Sun
Eryk Sun added the comment: It duplicates translated characters as well. For example: >>> table = str.maketrans('mnopqrb', 'rqponm\u0100', 'a') >>> 'aamnopqrb'.translate(table) 'rqponmrqponmĀ' 3.4 returns the correct result: >>> table = str.maketrans('mnopqrb',

[issue26464] str.translate() unexpectedly duplicates characters

2016-03-01 Thread Eryk Sun
Changes by Eryk Sun : -- versions: +Python 3.6 ___ Python tracker ___ ___