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.

classification
Title: memoryview of bytes is not readonly
Type: behavior Stage:
Components: Interpreter Core Versions: Python 3.0
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: teoliphant Nosy List: amaury.forgeotdarc, benjamin.peterson, gregory.p.smith, nnorwitz, pitrou, teoliphant, theller
Priority: release blocker Keywords: patch

Created on 2008-04-03 00:26 by amaury.forgeotdarc, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
buffer.patch amaury.forgeotdarc, 2008-04-03 00:26
Messages (6)
msg64886 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008-04-03 00:26
Bytes should be immutable, but in test_socket.py:
    buf = b" "*1024
    nbytes = self.cli_conn.recv_into(buf)

This patch attempts to enforce readonly buffer on bytes
msg64964 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2008-04-05 04:55
Travis, could you take a look?
msg65068 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2008-04-07 07:42
This patch looks good.

One question: in Objects/abstract.c in PyBuffer_FillInfo, why is it even
testing for the PyBUF_LOCK flag at all?  PEP 3118 says its valid for
both reading and writing (if the underlying object supports locked access).

BTW, I is someone is going to merge any py3k buffer api related changes
back into the backport that is in 2.6?
msg70357 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-07-28 17:00
How's this coming?
msg70390 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2008-07-29 13:12
The patch should probably come with a test :)
msg70644 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2008-08-02 21:03
Fixed in r65420, with a test.
History
Date User Action Args
2022-04-11 14:56:32adminsetgithub: 46790
2008-08-02 21:03:18pitrousetstatus: open -> closed
resolution: fixed
messages: + msg70644
2008-07-29 13:13:00pitrousetnosy: + pitrou
messages: + msg70390
2008-07-28 17:00:10benjamin.petersonsetpriority: critical -> release blocker
messages: + msg70357
2008-05-23 22:51:53benjamin.petersonsetnosy: + benjamin.peterson
2008-05-23 22:47:01benjamin.petersonsetpriority: critical
type: behavior
2008-04-30 17:40:36thellersetnosy: + theller
2008-04-07 07:42:05gregory.p.smithsetmessages: + msg65068
2008-04-05 04:55:50nnorwitzsetassignee: teoliphant
messages: + msg64964
nosy: + nnorwitz, teoliphant
2008-04-03 01:17:53gregory.p.smithsetnosy: + gregory.p.smith
2008-04-03 00:26:22amaury.forgeotdarccreate