Accessing a Werkzeug-Application with an active LintMiddleware raises an error:
AttributeError: 'ClosingIterator' object has no attribute 'next'
That's because this part of it is not Python 3 compatible:
|
class GuardedIterator(object): |
|
def __init__(self, iterator, headers_set, chunks): |
|
self._iterator = iterator |
|
self._next = iter(iterator).next |
|
self.closed = False |
|
self.headers_set = headers_set |
|
self.chunks = chunks |
A possible fix would be to set self._next to iter(iterator).__next__ if run under Python 3.
Accessing a Werkzeug-Application with an active LintMiddleware raises an error:
That's because this part of it is not Python 3 compatible:
werkzeug/src/werkzeug/middleware/lint.py
Lines 127 to 133 in a220671
A possible fix would be to set
self._nexttoiter(iterator).__next__if run under Python 3.