(Merge 3.2) Issue #10570: curses.tigetstr() is now expecting a byte string,

instead of a Unicode string.

This is an incompatible change, but the previous behaviour was completly wrong.
This commit is contained in:
Victor Stinner 2011-11-02 23:47:58 +01:00
commit df5bccc8a3
4 changed files with 11 additions and 3 deletions

View file

@ -190,7 +190,7 @@ def module_funcs(stdscr):
curses.tigetflag('hc')
curses.tigetnum('co')
curses.tigetstr('cr')
curses.tparm('cr')
curses.tparm(b'cr')
curses.typeahead(sys.__stdin__.fileno())
curses.unctrl('a')
curses.ungetch('a')
@ -280,6 +280,10 @@ def test_unget_wch(stdscr):
if read != ch:
raise AssertionError("%r != %r" % (read, ch))
def test_issue10570():
b = curses.tparm(curses.tigetstr("cup"), 5, 3)
assert type(b) is bytes
def main(stdscr):
curses.savetty()
try:
@ -289,6 +293,7 @@ def main(stdscr):
test_resize_term(stdscr)
test_issue6243(stdscr)
test_unget_wch(stdscr)
test_issue10570()
finally:
curses.resetty()