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.
Created on 2017年05月03日 07:37 by xiang.zhang, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 1421 | merged | xiang.zhang, 2017年05月03日 07:38 | |
| PR 3561 | merged | xiang.zhang, 2017年09月14日 03:01 | |
| Messages (5) | |||
|---|---|---|---|
| msg292854 - (view) | Author: Xiang Zhang (xiang.zhang) * (Python committer) | Date: 2017年05月03日 07:37 | |
There are several error messages only mention bytes. But they may also accept string or other bytes-like objects. |
|||
| msg292859 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2017年05月03日 08:01 | |
"unpack requires a bytes-like object of length %zd" is not correct too. array.array('i', [1, 2, 3]) has length 3, but Struct('3b').unpack doesn't accept it. The more correct error message is "unpack requires an object containing %zd bytes" (or "a buffer"). The similar issue was discussed some time ago, but I don't remember what module was discussed and who participated in that discussion.
|
|||
| msg302116 - (view) | Author: Martin Panter (martin.panter) * (Python committer) | Date: 2017年09月13日 21:04 | |
FWIW a similar change to the Struct constructor message was also proposed in Issue 19985. |
|||
| msg302137 - (view) | Author: Xiang Zhang (xiang.zhang) * (Python committer) | Date: 2017年09月14日 02:33 | |
New changeset c3e97d9d984130d1c2aceedc4dfcd603b3162688 by Xiang Zhang in branch 'master': bpo-30246: fix several error messages which only mention bytes in struct (#1421) https://github.com/python/cpython/commit/c3e97d9d984130d1c2aceedc4dfcd603b3162688 |
|||
| msg302139 - (view) | Author: Xiang Zhang (xiang.zhang) * (Python committer) | Date: 2017年09月14日 03:22 | |
New changeset fa82dda1012b406a7091587fc65384ce11528346 by Xiang Zhang in branch '3.6': [3.6] bpo-30246: fix several error messages which only mention bytes in struct (#3561) https://github.com/python/cpython/commit/fa82dda1012b406a7091587fc65384ce11528346 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:46 | admin | set | github: 74432 |
| 2017年09月14日 03:25:33 | xiang.zhang | link | issue19985 dependencies |
| 2017年09月14日 03:23:45 | xiang.zhang | set | status: open -> closed stage: patch review -> resolved resolution: fixed versions: - Python 3.5 |
| 2017年09月14日 03:22:26 | xiang.zhang | set | messages: + msg302139 |
| 2017年09月14日 03:01:50 | xiang.zhang | set | keywords:
+ patch pull_requests: + pull_request3552 |
| 2017年09月14日 02:33:28 | xiang.zhang | set | messages: + msg302137 |
| 2017年09月13日 21:04:38 | martin.panter | set | messages: + msg302116 |
| 2017年05月03日 08:01:44 | serhiy.storchaka | set | nosy:
+ serhiy.storchaka, berker.peksag, r.david.murray, mark.dickinson, meador.inge, martin.panter messages: + msg292859 |
| 2017年05月03日 07:38:47 | xiang.zhang | set | pull_requests: + pull_request1527 |
| 2017年05月03日 07:37:18 | xiang.zhang | create | |