[issue37335] Add 646 ASCII alias to locale coercion tests.

2019-06-26 Thread STINNER Victor
STINNER Victor added the comment: > what you propose is to rewrite current replaces to use > "codecs.lookup(encoding).name" instead and then push it into the master? I suggest to remove the code which does the .replace(), but instead normalize the encoding when checking for the expected

[issue37335] Add 646 ASCII alias to locale coercion tests.

2019-06-26 Thread Jakub Kulik
Jakub Kulik added the comment: I just added that in the way it was already there but I see why the current solution is not the best. Also I wanted to push this into 3.7 only as this problem is not present in 3.8 (as discussed in the PR 11195 opened incorrectly against the master). Just to

[issue37335] Add 646 ASCII alias to locale coercion tests.

2019-06-24 Thread STINNER Victor
STINNER Victor added the comment: test_c_locale_coerce should use "codecs.lookup(encoding).name" to get the normalized name of an encoding, rather than fragile: data = data.replace(b"ANSI_X3.4-1968", b"ascii") data = data.replace(b"US-ASCII", b"ascii") the proposed pattern

[issue37335] Add 646 ASCII alias to locale coercion tests.

2019-06-21 Thread Jakub Kulik
Change by Jakub Kulik : -- pull_requests: +14107 pull_request: https://github.com/python/cpython/pull/14285 ___ Python tracker ___

[issue37335] Add 646 ASCII alias to locale coercion tests.

2019-06-19 Thread Jakub Kulik
Change by Jakub Kulik : -- keywords: +patch pull_requests: +14063 stage: -> patch review pull_request: https://github.com/python/cpython/pull/11195 ___ Python tracker ___

[issue37335] Add 646 ASCII alias to locale coercion tests.

2019-06-19 Thread Jakub Kulik
New submission from Jakub Kulik : Locale coercion tests on Solaris are failing because 646 ASCII alias is not recognized. Its addition into the _handle_output_variations function fixes this problem. This was changed/fixed in Python 3.8 and later, where aliases are correctly translated to