pallets-eco / flask-debugtoolbar

A toolbar overlay for debugging Flask applications
https://flask-debugtoolbar.readthedocs.io
BSD 3-Clause "New" or "Revised" License
953 stars 146 forks source link

Incompatible with werkzeug 1.0.0 #144

Closed romabysen closed 4 years ago

romabysen commented 4 years ago

After upgrading to werkzeug 1.0.0, the debug toolbar no longer works. Flask-DebugToolbar==0.10.1

Traceback (most recent call last):
  File ".venv/lib/python3.6/site-packages/flask/app.py", line 2463, in __call__
    return self.wsgi_app(environ, start_response)
  File ".venv/lib/python3.6/site-packages/flask/app.py", line 2449, in wsgi_app
    response = self.handle_exception(e)
  File ".venv/lib/python3.6/site-packages/flask/app.py", line 1866, in handle_exception
    reraise(exc_type, exc_value, tb)
  File ".venv/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File ".venv/lib/python3.6/site-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File ".venv/lib/python3.6/site-packages/flask/app.py", line 1952, in full_dispatch_request
    return self.finalize_request(rv)
  File ".venv/lib/python3.6/site-packages/flask/app.py", line 1969, in finalize_request
    response = self.process_response(response)
  File ".venv/lib/python3.6/site-packages/flask/app.py", line 2266, in process_response
    response = handler(response)
  File ".venv/lib/python3.6/site-packages/flask_debugtoolbar/__init__.py", line 182, in process_response
    not real_request.is_xhr):
AttributeError: 'Request' object has no attribute 'is_xhr'
jeffwidman commented 4 years ago

Thanks for the bug report!