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

2010-10-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: Applied in r86049. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Py

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

2010-10-15 Thread Jason R. Coombs
Jason R. Coombs added the comment: Thanks! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

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

2010-10-15 Thread Raymond Hettinger
Raymond Hettinger 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

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

2010-10-15 Thread Jason R. Coombs
Jason R. Coombs added the comment: I'm not sure what our use case is. I discovered this when I was looking at our project's util library, and we have a Queue subclass that overrides _full to handle the scenario where the queue shrinks. I'm guessing it's being used to dynamically adjust the qu

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

2010-10-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: I've briefly looked at the patch and it seems reasonable. Will look it in more detail by 3.2 goes out. I'm curious about your use case for wanting to change the maxsize of an existing Queue that is already in use. That seems like a odd design.

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

2010-10-15 Thread Jason R. Coombs
Jason R. Coombs added the comment: I should point out that in Python 2.5, it was possible for a subclass to override the _full method to account for this situation, but with Python 2.6 and later, the calculation in _full was hand-inlined... so it's not readily possible for a subclass to corre

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

2010-10-15 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger priority: normal -> low ___ Python tracker ___ ___ Python-bugs-list mailing

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

2010-10-15 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

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

2010-10-15 Thread Ned Deily
Changes by Ned Deily : -- nosy: +rhettinger stage: -> patch review versions: -Python 2.5, Python 2.6, Python 3.3 ___ Python tracker ___

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

2010-10-14 Thread Jason R. Coombs
New submission from Jason R. Coombs : The Queue object has a maxsize parameter and attribute, but due to the test for a full queue, shrinking the maxsize could result in the Queue not recognizing that it is full. The attached patch (against the Python 3 trunk) demonstrates this limitation wit