]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-34974: Do not replace unexpected errors in bytes() and bytearray(). (GH-9852)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 14 Oct 2018 21:26:28 +0000 (14:26 -0700)
committerGitHub <noreply@github.com>
Sun, 14 Oct 2018 21:26:28 +0000 (14:26 -0700)
commit1370832af24cc6f0f464354b9ec3ecdb343d35ce
tree93c714cf7ec6865db609ed1addb320a771f7c1fa
parent91b863d93b93e15799af10d9117982840ecf3462
bpo-34974: Do not replace unexpected errors in bytes() and bytearray(). (GH-9852)

bytes and bytearray constructors converted unexpected exceptions
(e.g. MemoryError and KeyboardInterrupt) to TypeError.
(cherry picked from commit e890421e334ccf0c000c6b29c4a521d86cd12f47)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/test/test_bytes.py
Misc/NEWS.d/next/Core and Builtins/2018-10-13-22-24-19.bpo-34974.7LgTc2.rst [new file with mode: 0644]
Objects/bytearrayobject.c
Objects/bytesobject.c