Unicode string.
This is an incompatible change, but putp() is used to emit terminfo commands,
which are bytes strings, not Unicode strings.
win = curses.newwin(5,5)
win = curses.newwin(5,5, 1,1)
curses.nl() ; curses.nl(1)
- curses.putp('abc')
+ curses.putp(b'abc')
curses.qiflush()
curses.raw() ; curses.raw(1)
curses.setsyx(5,5)
def test_issue10570():
b = curses.tparm(curses.tigetstr("cup"), 5, 3)
assert type(b) is bytes
+ curses.putp(b)
def main(stdscr):
curses.savetty()
Library
-------
-- Issue #10570: curses.tigetstr() is now expecting a byte string, instead of
- a Unicode string.
+- Issue #10570: curses.putp() and curses.tigetstr() are now expecting a byte
+ string, instead of a Unicode string.
- Issue #2892: preserve iterparse events in case of SyntaxError.
{
char *str;
- if (!PyArg_ParseTuple(args,"s;str", &str)) return NULL;
+ if (!PyArg_ParseTuple(args,"y;str", &str))
+ return NULL;
return PyCursesCheckERR(putp(str), "putp");
}