[issue13342] input() builtin always uses "strict" error handler

2011-11-04 Thread stefanholek
stefanholek added the comment: Thank you Antoine, this looks good. However when I try your example I get sys.stdin = io.TextIOWrapper( sys.stdin.detach(), 'ascii', 'replace') ValueError: underlying buffer has been detached -- __

[issue13342] input() builtin always uses "strict" error handler

2011-11-04 Thread stefanholek
stefanholek added the comment: I am not quite sure how I would write a custom, readline-using input function in Python (access to PyOS_Readline seems required), that's why I did it in C. Have an example? -- ___ Python tracker

[issue13342] input() builtin always uses "strict" error handler

2011-11-04 Thread stefanholek
New submission from stefanholek : The input builtin always uses "strict" error handling for Unicode conversions. This means that when I enter a latin-1 string in a utf-8 environment, input breaks with a UnicodeDecodeError. Now don't tell me not to do that, I have a valid use-c

[issue12186] readline.replace_history_item still leaks memory

2011-06-02 Thread stefanholek
stefanholek added the comment: These undo lists come into existence when history entries are edited interactively (Arrow-Up, edit line, Arrow-Up, edit line, Enter -> undo list of first history entry leaks). -- components: +Extension Modules versions: +Python 2.6, Python 2.7, Pyt

[issue12186] readline.replace_history_item still leaks memory

2011-05-26 Thread stefanholek
New submission from stefanholek : This is a continuation of issue #9450. The 'data' element of a history entry may point to an undo list for the entry. When freeing the entry the associated undo list must be freed as well, and 'free(data)' alone does not cut it. I have not

[issue6953] readline documenation needs work

2010-03-09 Thread stefanholek
stefanholek added the comment: I have read the readline source code, and it does mean just that. :-) Anyway, this does not really apply to the stdlib because unless someone implements 'stifle_history' and friends 'history_base' is going t

[issue6953] readline documenation needs work

2010-03-09 Thread stefanholek
stefanholek added the comment: To be zero-based, get_history_item would need to look like: diff --git a/rl/readline.c b/rl/readline.c index 33e9905..800bc00 100644 --- a/rl/readline.c +++ b/rl/readline.c @@ -559,7 +559,7 @@ get_history_item(PyObject *self, PyObject *args) if