import collections


class deque(collections.deque):

    def __init__(self, iterable=(), maxlen=None):
        super(deque, self).__init__(iterable, maxlen)
self._maxlen = maxlen

@property
def maxlen(self):
    return self._maxlen
Проверьте maxlen deque в python 2.6