[issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception

2016-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good catch! Thanks Xiang. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception

2016-10-02 Thread Xiang Zhang
Xiang Zhang added the comment: Serhiy, in 05788a9a0b88, test_invalid_sequences seems don't have to stay in CAPITest. -- ___ Python tracker ___ __

[issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception

2016-10-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception

2016-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Additional tests are always nice. Thank you for your report and your patch Xiang. -- ___ Python tracker ___ _

[issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception

2016-10-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset ac838bf5499d by Serhiy Storchaka in branch '3.5': Issue #28295: Fixed the documentation and added tests for PyUnicode_AsUCS4(). https://hg.python.org/cpython/rev/ac838bf5499d New changeset 3efeafc6517a by Serhiy Storchaka in branch '3.6': Issue #282

[issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception

2016-10-02 Thread Xiang Zhang
Xiang Zhang added the comment: Yes. Changing the implementation or the doc is still in question so in the title I just use conflicts. Scanning unicodeobject.c there seems no general rules about which to use. But actually I'm in favour of ValueError. From the description in https://docs.python.

[issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception

2016-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The remaining question is what should be the type of the exception. ValueError is documented exception, but SystemError is actually raised exception (and it always was raised). PyUnicode_AsUCS4() is used 6 times in 3 files in CPython code, and it should neve

[issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception

2016-10-02 Thread Xiang Zhang
Xiang Zhang added the comment: v3 resolves comments on v2. -- Added file: http://bugs.python.org/file44928/PyUnicode_AsUCS4_v3.patch ___ Python tracker ___ __

[issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception

2016-09-29 Thread Xiang Zhang
Xiang Zhang added the comment: v2 now adds more tests and change the problematic variable name. -- Added file: http://bugs.python.org/file44889/PyUnicode_AsUCS4_v2.patch ___ Python tracker _

[issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception

2016-09-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In general the patch LGTM. I have small doubt about the name of one variable, and may be worth to add yet few tests. -- ___ Python tracker __

[issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception

2016-09-28 Thread Xiang Zhang
Xiang Zhang added the comment: Here is the patch. -- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file44870/PyUnicode_AsUCS4.patch ___ Python tracker _

[issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception

2016-09-28 Thread Xiang Zhang
New submission from Xiang Zhang: PyUnicode_AsUCS4 declares to raise ValueError if buffer length is smaller than string length. But now the implementation raises SystemError. -- components: Interpreter Core messages: 277595 nosy: haypo, serhiy.storchaka, xiang.zhang priority: normal seve