[issue25416] Add encoding aliases from the (HTML5) Encoding Standard

2018-11-02 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

Please note that we can only add aliases if the encodings are indeed the same. 
Given that WhatWG has made changes to several standard encodings, this is 
especially important, since our codecs are mostly based on what the Unicode 
consortium defines as these encodings.

Tests for aliases can be minimal: just verify that the codecs subsystem detects 
them and results in the correct codec being used. There's no need to download 
any WhatWG specs for this.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25416] Add encoding aliases from the (HTML5) Encoding Standard

2018-11-01 Thread Felipe Rodrigues


Felipe Rodrigues  added the comment:

Ezio, I have issued a simple PR that adds just the two aliases cited in the 
issue's initial message. I would like to implement tests but as I wrote in the 
PR's message, I'm not really sure how to proceed with that. bpo-18624 is really 
related to this issue and in there is a reference to a test_codecs.py file that 
I did not find.

If you could give me a few pointer on how to proceed, I'll be glad to improve 
my PR, add tests and even add all the other aliases that are missing.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25416] Add encoding aliases from the (HTML5) Encoding Standard

2018-10-31 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25416] Add encoding aliases from the (HTML5) Encoding Standard

2018-10-31 Thread Ezio Melotti


Ezio Melotti  added the comment:

Adding those aliases sounds good to me.  I think it would be good to add some 
tests first (possibly as a separate issue/pr), even though I'm not sure what 
would be the best way to test the aliases.

Testing if the list is complete/correct should be done against the 
HTML5/Unicode specs, but that, if automated, would require downloading/parsing 
the specs and is probably not worth doing it.

We can also check that all the aliases are accepted by str.encode/decode, and 
all corresponding aliases should give the same result, however if 
str.encode/decode use the aliases dict, the test is nothing more than a sanity 
check and won't detect e.g. typos in the aliases names, or wrongly assigned 
aliases.

--
nosy: +fbidu
stage: patch review -> test needed
versions: +Python 3.8 -Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25416] Add encoding aliases from the (HTML5) Encoding Standard

2018-10-30 Thread Felipe Rodrigues


Change by Felipe Rodrigues :


--
keywords: +patch
pull_requests: +9549
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25416] Add encoding aliases from the (HTML5) Encoding Standard

2015-10-15 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
components: +Unicode
nosy: +ezio.melotti, haypo, lemburg, loewis
stage:  -> needs patch
versions: +Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com