[issue16200] Setting .posix=True for shlex object causes infinite loop in __next__
Serhiy Storchaka
report at bugs.python.org
Tue Mar 10 10:44:23 CET 2015
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 attributes is documented and posix is not in this set.
One of solutions is just does nothing. We are all consenting adults here.
More protective solution is to make undocumented attributes (filestack, posix, pushback, state) private. For backward compatibility we can temporary add properties that will emit deprecation warnings.
----------
nosy: +serhiy.storchaka
versions: -Python 2.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16200>
_______________________________________
More information about the Python-bugs-list
mailing list