Title: bytearray + and += should accept buffer protocol objects
Type: behaviour Severity: normal
Components: Core Versions: Jython 2.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: jamesmudd Nosy List: jamesmudd, jeff.allen
Priority: normal Keywords:

Created on 2019-05-05.09:22:47 by jeff.allen, last changed 2019-07-21.05:44:41 by jeff.allen.

msg12492 (view) Author: Jeff Allen (jeff.allen) Date: 2019-05-05.09:22:47
Already the subject of discussion on GitHub at and

Many other methods of bytearray already support buffers, but not the adds. Watch out for PyUnicode, which will throw a ClassCastException that should raise a TypeError.

We seem to agree with CPython that bufferprotocol + bytearray is an error.
msg12524 (view) Author: Jeff Allen (jeff.allen) Date: 2019-05-17.18:12:57
Now fixed at, thanks James.
Date User Action Args
2019-07-21 05:44:41jeff.allensetstatus: pending -> closed
2019-05-17 18:12:57jeff.allensetstatus: open -> pending
assignee: jamesmudd
resolution: fixed
messages: + msg12524
2019-05-05 09:22:47jeff.allencreate