[issue27460] Change bytes exception when overflow

2016-07-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset f9481e5f1792 by Serhiy Storchaka in branch 'default': Issue #27460: Unified error messages in bytes constructor for integers https://hg.python.org/cpython/rev/f9481e5f1792 -- nosy: +python-dev ___ Python

[issue27460] Change bytes exception when overflow

2016-07-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution Xiang Zhang. -- components: +Interpreter Core resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue27460] Change bytes exception when overflow

2016-07-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is enough. -- stage: -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue27460] Change bytes exception when overflow

2016-07-06 Thread Xiang Zhang
Xiang Zhang added the comment: The constructor has been well tested in https://hg.python.org/cpython/file/tip/Lib/test/test_bytes.py#l111. It looks like that the original author only wants to guarantee the exception type but not message. So I didn't add a assertRaisesRegex test. -- _

[issue27460] Change bytes exception when overflow

2016-07-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. Are there any tests for these cases? -- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka ___ Python tracker ___ __

[issue27460] Change bytes exception when overflow

2016-07-06 Thread Xiang Zhang
Changes by Xiang Zhang : Removed file: http://bugs.python.org/file43637/bytes_exception_msg.patch ___ Python tracker ___ ___ Python-bugs-list

[issue27460] Change bytes exception when overflow

2016-07-06 Thread Xiang Zhang
Changes by Xiang Zhang : Added file: http://bugs.python.org/file43643/bytes_exception_msg.patch ___ Python tracker ___ ___ Python-bugs-list ma

[issue27460] Change bytes exception when overflow

2016-07-06 Thread Xiang Zhang
Changes by Xiang Zhang : -- type: -> enhancement versions: +Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue27460] Change bytes exception when overflow

2016-07-06 Thread Xiang Zhang
New submission from Xiang Zhang: I suggest change `bytes` exception message when an iterable containing overflow integers. Right now, bytes([sys.maxsize+1]) emits ValueError: cannot fit 'int' into an index-sized integer "ValueError: cannot fit 'int' into an index-sized integer". I think actua