# HG changeset patch # User Denis Laxalde # Date 1464882763 -7200 # Node ID 0b38e373b9856d2a73e3d16cc322e07504579295 # Parent 581b5b64b3826284d6598ee8b19eddf4cbc2ec9e [migration] Drop custom "readfunc" for code.interact in shell As the referenced bug http://bugs.python.org/issue1288615 got fixed in Python 2.6, this is no longer needed. Furthermore the implementation is not Python 3 compatible (raw_input, unicode). diff -r 581b5b64b382 -r 0b38e373b985 cubicweb/migration.py --- a/cubicweb/migration.py Thu Jun 02 09:41:24 2016 +0200 +++ b/cubicweb/migration.py Thu Jun 02 17:52:43 2016 +0200 @@ -269,10 +269,7 @@ banner = """entering the migration python shell just type migration commands or arbitrary python code and type ENTER to execute it type "exit" or Ctrl-D to quit the shell and resume operation""" - # give custom readfunc to avoid http://bugs.python.org/issue1288615 - def unicode_raw_input(prompt): - return unicode(raw_input(prompt), sys.stdin.encoding) - interact(banner, readfunc=unicode_raw_input, local=local_ctx) + interact(banner, local=local_ctx) try: readline.write_history_file(histfile) except IOError: