[issue16200] Setting .posix=True for shlex object causes infinite loop in __next__

2015-03-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are 18 public writable attributes in shlex object, and unthinking setting some of them can make shlex to produce incorrect results or create an infinite loop. For example there is nothing to prevent your from setting the eof attribute. Only 14 of 18 at

[issue16200] Setting .posix=True for shlex object causes infinite loop in __next__

2014-10-14 Thread Claudiu Popa
Claudiu Popa added the comment: Here's a refreshed patch, which applies cleanly on tip. Also, I added a test for the code that generates an infinite loop. -- nosy: +Claudiu.Popa versions: +Python 3.5 -Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file36922/issue1

[issue16200] Setting .posix=True for shlex object causes infinite loop in __next__

2012-10-15 Thread Roger Serwy
Roger Serwy added the comment: The shlex_posix_property.patch makes .posix a read/write property that changes .eof appropriately. -- Added file: http://bugs.python.org/file27580/shlex_posix_property.patch ___ Python tracker

[issue16200] Setting .posix=True for shlex object causes infinite loop in __next__

2012-10-15 Thread Ezio Melotti
Ezio Melotti added the comment: Making .posix read-only is technically backward-incompatible, but I'm not sure if there are cases where people might have changed its value without incurring in the bug. Leaving .posix read/writable and changing .eof accordingly might be a better solution. As

[issue16200] Setting .posix=True for shlex object causes infinite loop in __next__

2012-10-14 Thread Roger Serwy
Changes by Roger Serwy : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue16200] Setting .posix=True for shlex object causes infinite loop in __next__

2012-10-11 Thread Roger Serwy
Roger Serwy added the comment: Attached is a patch to make the .posix property read-only, along with a test. The patch is against 3.4. -- keywords: +patch Added file: http://bugs.python.org/file27535/shlex_posix_readonly.patch ___ Python tracker

[issue16200] Setting .posix=True for shlex object causes infinite loop in __next__

2012-10-11 Thread Roger Serwy
New submission from Roger Serwy: The documentation for shlex does not prohibit the user from setting .posix=True after creating a shlex object. When doing so, the .eof attribute is inconsistent, creating an infinite loop in the __next__ method. Here's some sample code to recreate the issue: i