[issue10110] Queue doesn't recognize it is full after shrinking maxsize

Raymond Hettinger report at bugs.python.org
Sat Oct 16 00:30:51 CEST 2010


Raymond Hettinger <rhettinger at users.sourceforge.net> added the comment:

That won't be necessary.  The change from == to <= is innocuous.

There's no need to lock-up maxsize in a read-only property.  We're consenting adults.  Besides, it would probably break someone-else's odd use case.  I don't want to expand the API, nor do I want to cripple anyone's ability to do weird stuff with it.

FWIW, the full() and empty() methods are usually not a good idea.  It's better to catch a Full exception.  Otherwise, the information can be out of date by the time you try to use it.

I'm going to mark this as a 3.2 only change.  There were no guarantees about the behavior when maxsize is changed, nor should we make such guarantees.

----------
versions:  -Python 2.7, Python 3.1

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10110>
_______________________________________


More information about the Python-bugs-list mailing list