This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients benjamin.peterson, martin.panter, pitrou, serhiy.storchaka, stutzbach
Date 2016-04-09.22:11:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
On further thought, I think releasing the buffer would not be the best long-term solution. I encountered this bug when wrapping custom AuditableBytesIO objects (Lib/test/ with BufferedWriter, where the raw object just saves each write() buffer in a list for later use.

Serhiy: what you say sounds like what I had in mind, except I suspect it doesn’t matter whether the memoryview is backed by a bytes object or something else. The main point is we allocate a new buffer if the old one is still referenced by the memoryview.

It seems this problem has already been discovered, along with BufferedReader and PyUnicode_Decode(): <>. The BufferedReader case can have more serious consequences because it is writable (Issue 15994).
Date User Action Args
2016-04-09 22:11:44martin.pantersetrecipients: + martin.panter, pitrou, benjamin.peterson, stutzbach, serhiy.storchaka
2016-04-09 22:11:44martin.pantersetmessageid: <>
2016-04-09 22:11:44martin.panterlinkissue26720 messages
2016-04-09 22:11:43martin.pantercreate