Queue._init needs to set self.maxsize on Python <= 2.5

This commit is contained in:
Ask Solem 2011-04-05 16:13:54 +02:00
parent ea6fed6efe
commit 39e4ec68c7
2 changed files with 4 additions and 2 deletions

View File

@ -8,8 +8,9 @@
=====
:release-date: 2011-04-05 15:51 P.M CEST
* 1.1.0 broke Python 2.4 and 2.5 compatibility by using
LifoQueue.
* 1.1.0 started using ``Queue.LifoQueue`` which is only available
in Python 2.6+ (Issue #33). We now ship with our own LifoQueue.
.. _version-1.1.0:

View File

@ -253,6 +253,7 @@ class LifoQueue(Queue):
def _init(self, maxsize):
self.queue = []
self.maxsize = maxsize
def _qsize(self, len=len):
return len(self.queue)