
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2009-03-18 10:40 bypitrou, last changed2022-04-11 14:56 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| bytesiobuf2.patch | pitrou,2010-09-03 17:53 | |||
| Messages (7) | |||
|---|---|---|---|
| msg83740 -(view) | Author: Antoine Pitrou (pitrou)*![]() | Date: 2009-03-18 10:40 | |
It may be logical for BytesIO to support the buffer protocol (readable/and/ writable). | |||
| msg85504 -(view) | Author: Georg Brandl (georg.brandl)*![]() | Date: 2009-04-05 14:41 | |
Is this still unimplemented? | |||
| msg85507 -(view) | Author: Antoine Pitrou (pitrou)*![]() | Date: 2009-04-05 14:52 | |
Yes.I don't remember which use case I was thinking about when I suggestedthis, but it may be useful to e.g. write() all the data to a file objectwithout actually making a copy (getvalue() does). | |||
| msg115304 -(view) | Author: Antoine Pitrou (pitrou)*![]() | Date: 2010-09-01 14:48 | |
Thinking about it, I'm not sure this would be a good idea to do this by default. There is an ambiguity where it's not obvious if the buffer would contain the whole data or only the bytes after the current position.I think perhaps an explicit method (getbuffer()?) could be used to export a buffer-compatible object, without copying. Perhaps a memoryview; this would imply defining bf_releasebuffer without bf_getbuffer. | |||
| msg115476 -(view) | Author: Antoine Pitrou (pitrou)*![]() | Date: 2010-09-03 17:49 | |
Here is a patch implementing getbuffer(), together with tests. | |||
| msg115479 -(view) | Author: Antoine Pitrou (pitrou)*![]() | Date: 2010-09-03 17:53 | |
There was an unused "weakreflist" member. | |||
| msg115728 -(view) | Author: Antoine Pitrou (pitrou)*![]() | Date: 2010-09-06 18:50 | |
This was committed inr84562. | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:56:46 | admin | set | github: 49756 |
| 2010-09-06 18:50:12 | pitrou | set | status: open -> closed resolution: fixed messages: +msg115728 stage: patch review -> resolved |
| 2010-09-03 17:53:48 | pitrou | set | nosy: +amaury.forgeotdarc,benjamin.peterson components: + IO |
| 2010-09-03 17:53:33 | pitrou | set | files: -bytesiobuf2.patch |
| 2010-09-03 17:53:24 | pitrou | set | files: +bytesiobuf2.patch messages: +msg115479 |
| 2010-09-03 17:49:12 | pitrou | set | files: +bytesiobuf2.patch keywords: +patch messages: +msg115476 stage: needs patch -> patch review |
| 2010-09-01 14:48:06 | pitrou | set | messages: +msg115304 stage: test needed -> needs patch |
| 2010-08-09 03:55:35 | terry.reedy | set | versions: + Python 3.2, - Python 3.1 |
| 2009-04-05 14:52:09 | pitrou | set | messages: +msg85507 |
| 2009-04-05 14:41:01 | georg.brandl | set | nosy: +georg.brandl messages: +msg85504 |
| 2009-03-18 10:40:11 | pitrou | create | |