Issue2768

classification
Title: bytearray + and += should accept buffer protocol objects
Type: behaviour Severity: normal
Components: Core Versions: Jython 2.7
Milestone:
process
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.

Messages
msg12492 (view) Author: Jeff Allen (jeff.allen) Date: 2019-05-05.09:22:47
Already the subject of discussion on GitHub at https://github.com/jythontools/jython/pull/120 and https://github.com/jythontools/jython/pull/134.

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 https://hg.python.org/jython/rev/4c627b7d4612, thanks James.
History
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