Issue3797
Created on 2008-09-06 20:46 by gregory.p.smith, last changed 2022-04-11 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| mmap-dbm-oss_bytes.patch | gregory.p.smith, 2008-09-06 20:46 | PyByteArray -> PyBytes | ||
| marshal-winreg_bytes.patch | gregory.p.smith, 2008-09-06 20:50 | more PyByteArray -> PyBytes | ||
| Messages (8) | |||
|---|---|---|---|
| msg72691 - (view) | Author: Gregory P. Smith (gregory.p.smith) * ![]() |
Date: 2008-09-06 20:46 | |
As noted in issue #3492 the following py3k modules still erroneously return bytearray objects instead of bytes objects from their read functions: mmap dbm ossaudiodev Attached is a trivial patch to fix those. |
|||
| msg72693 - (view) | Author: Gregory P. Smith (gregory.p.smith) * ![]() |
Date: 2008-09-06 20:50 | |
attached a patch for PC/winreg.c and Python/marshal.c. |
|||
| msg72696 - (view) | Author: Hirokazu Yamamoto (ocean-city) * ![]() |
Date: 2008-09-06 21:14 | |
Hello. I confirmed test_winreg.py passed after applied marshal-winreg_bytes.patch. |
|||
| msg72698 - (view) | Author: Antoine Pitrou (pitrou) * ![]() |
Date: 2008-09-06 21:18 | |
Tests pass here as well, under Windows and Linux. |
|||
| msg72699 - (view) | Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * ![]() |
Date: 2008-09-06 21:19 | |
- PyBytes_Resize takes a PyObject**, you should pass &rv. Didn't you get a compiler warning? - Here is an additional test for the winreg module, your patch is needed for it to pass. |
|||
| msg72700 - (view) | Author: Antoine Pitrou (pitrou) * ![]() |
Date: 2008-09-06 21:20 | |
As for ossaudiodev: - PyByteArray_Resize(rv, count); + _PyBytes_Resize(rv, count); I think this should be _PyBytes_Resize(&rv, count) instead. |
|||
| msg72701 - (view) | Author: Antoine Pitrou (pitrou) * ![]() |
Date: 2008-09-06 21:21 | |
Amaury beat me to the punch :-o |
|||
| msg72706 - (view) | Author: Gregory P. Smith (gregory.p.smith) * ![]() |
Date: 2008-09-06 21:35 | |
heh indeed it should be &rv. i made the patch on a mac and hadn't run it on my linux host before opening the issue. fixed locally and given all of the reviews across all relevant platforms.. committing. py3k r66273. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:56:38 | admin | set | github: 48047 |
| 2008-09-06 21:35:20 | gregory.p.smith | set | status: open -> closed resolution: fixed messages: + msg72706 keywords: patch, patch, easy, needs review |
| 2008-09-06 21:21:18 | pitrou | set | keywords:
patch, patch, easy, needs review messages: + msg72701 |
| 2008-09-06 21:20:42 | pitrou | set | keywords:
patch, patch, easy, needs review messages: + msg72700 |
| 2008-09-06 21:19:11 | amaury.forgeotdarc | set | keywords:
patch, patch, easy, needs review nosy: + amaury.forgeotdarc messages: + msg72699 |
| 2008-09-06 21:18:48 | pitrou | set | keywords:
patch, patch, easy, needs review nosy: + pitrou messages: + msg72698 |
| 2008-09-06 21:14:29 | ocean-city | set | keywords:
patch, patch, easy, needs review nosy: + ocean-city messages: + msg72696 |
| 2008-09-06 20:50:08 | gregory.p.smith | set | keywords:
patch, patch, easy, needs review files: + marshal-winreg_bytes.patch messages: + msg72693 title: mmap, dbm and ossaudiodev return bytearray instead of bytes -> mmap, dbm, ossaudiodev, marshal & winreg return bytearray instead of bytes |
| 2008-09-06 20:46:13 | gregory.p.smith | create | |
