[issue5666] Py_BuildValue(c) should return bytes?

2009-04-03 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Applied the patch in r71107. The issues these depend on can be fixed now. -- nosy: +benjamin.peterson resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org

[issue5666] Py_BuildValue(c) should return bytes?

2009-04-02 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: This is related to #5499. PyArg_ParseTuple treats c as bytes of 1 length now, but Py_BuildValue still treats c as unicode of 1 length. -- components: Interpreter Core files: py3k_build_value.patch keywords: patch

[issue5666] Py_BuildValue(c) should return bytes?

2009-04-02 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5666 ___ ___

[issue5666] Py_BuildValue(c) should return bytes?

2009-04-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Let's try grep on py3k: grep 'Py_BuildValue([^]*c' $(find -name *.c) Py_BuildValue(c) is used for: - mmap.read_byte() result - curses window.getkey() result: this method returns also unicode string = your patch breaks getkey()!

[issue5666] Py_BuildValue(c) should return bytes?

2009-04-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: C format, but... it doesn't exist for Py_BuildValue Ooops, it does exist but it looks that nobody uses it. It's also not documented :-( I wrote a new patch: - document C format for Py_BuildValue (fix also a typo) - use C format