[issue30003] Remove hz codec

2017-05-12 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +1652 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue30003] Remove hz codec

2017-04-07 Thread Ma Lin
Ma Lin added the comment: >From my subjective feelings, probably no old archives still exist, but I can't >assert it. That's why I suggest remove it, or at least don't fix it. Ah, let's slow down the pace, this bug exists over a dacade, we don't need to solve it at once. I closed #24117, beca

[issue30003] Remove hz codec

2017-04-07 Thread STINNER Victor
STINNER Victor added the comment: "But for any codec, there might be archives, even if the codec is not used for new files." The bug is in the encoder. The codec is still usable to *decode* files. So maybe a few people use it but didn't notice the encoder bug? -- __

[issue30003] Remove hz codec

2017-04-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: We seldom just remove things; we usually deprecate in the doc and if possible, issue a runtime warning. This is probably not the only obsolete codec. There should be a uniform policy for deprecation and removal, if ever. But for any codec, there might be ar

[issue30003] Remove hz codec

2017-04-06 Thread Ma Lin
Ma Lin added the comment: I tried to fix this two years ago, here is the patch (not merged): http://bugs.python.org/review/24117/diff/14803/Modules/cjkcodecs/_codecs_cn.c But later, I thought it's a good opportunity to remove this codec, this serious bug indicates that almost no one is using it

[issue30003] Remove hz codec

2017-04-06 Thread STINNER Victor
STINNER Victor added the comment: Can't we fix the bug instead of removing the whole codec? Or do you know other bugs? The bug is only on the encoder part, right? I see unit test for '~' on the hz decoder. -- ___ Python tracker

[issue30003] Remove hz codec

2017-04-05 Thread Ma Lin
New submission from Ma Lin: hz is a Simplified Chinese codec, available in Python since around 2004. However, hz encoder has a serious bug, it forgets to escape ~ >>> 'hi~'.encode('hz') b'hi~'# the correct output should be b'hi~~' As a result, we can't finish a roundtrip: >>> b'hi~'.decode(