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年04月30日 11:12 by rnash, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Messages (5) | |||
|---|---|---|---|
| msg292624 - (view) | Author: Rupert Nash (rnash) * | Date: 2017年04月30日 11:12 | |
According to the docs this method should return a str, but it returns bytes https://docs.python.org/3.6/library/xdrlib.html#xdrlib.Unpacker.unpack_string I can see three options: a default encoding should be applied the documentation updated to make clear this returns bytes the method removed and just rely on the existing unpack_bytes which does what you'd expect (and in fact the two methods are aliases) |
|||
| msg292629 - (view) | Author: Xiang Zhang (xiang.zhang) * (Python committer) | Date: 2017年04月30日 12:59 | |
xdrlib doc seems still remain in 2.x world. 'string' is used to represent 'bytes'. And some methods' names like pack_fstring, pack_string seem not suitable in 3.x world. |
|||
| msg292635 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2017年04月30日 15:46 | |
The term "string" in names like "pack_string" refers to the XDR standard (RFC 1014). They have to stay, but the documentation must be updated to make clear that they work with bytes. |
|||
| msg294696 - (view) | Author: Jan Hnatek (hnhn) * | Date: 2017年05月29日 14:37 | |
There's a patch for xdrlib documentation in Issue9544. Would that solve this issue? |
|||
| msg294701 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2017年05月29日 16:20 | |
Partially. Thank you for pointing on the predecessor Jan. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:45 | admin | set | github: 74402 |
| 2017年05月29日 16:20:32 | serhiy.storchaka | set | messages: + msg294701 |
| 2017年05月29日 16:18:16 | serhiy.storchaka | set | status: open -> closed superseder: [doc] xdrlib.Packer().pack_fstring throws a TypeError when called with a str() resolution: duplicate stage: needs patch -> resolved |
| 2017年05月29日 14:37:00 | hnhn | set | nosy:
+ hnhn messages: + msg294696 |
| 2017年04月30日 15:57:25 | xiang.zhang | set | stage: needs patch versions: + Python 3.5, Python 3.7 |
| 2017年04月30日 15:46:33 | serhiy.storchaka | set | messages: + msg292635 |
| 2017年04月30日 12:59:51 | xiang.zhang | set | nosy:
+ xiang.zhang, vstinner, serhiy.storchaka messages: + msg292629 |
| 2017年04月30日 11:12:49 | rnash | create | |