You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DebugApplication(..., pin_security=False) no longer works #3075
Starting with werkzeug 3.1.4, passing pin_security=False to DebugApplication() raises an exception:
from django.core.wsgi import get_wsgi_application
from werkzeug.debug import DebuggedApplication
application = DebuggedApplication(get_wsgi_application(), evalex=True, pin_security=False)
File "/home/<redacted>/code/<redacted>/wsgi.py", line 6, in <module>
application = DebuggedApplication(get_wsgi_application(), evalex=True, pin_security=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/<redacted>/.virtualenvs/<redacted>/lib/python3.12/site-packages/werkzeug/debug/__init__.py", line 303, in _
_init__
self.pin = None
^^^^^^^^
File "/home/<redacted>/.virtualenvs/<redacted>/lib/python3.12/site-packages/werkzeug/debug/__init__.py", line 323, in p
in
del self._pin
^^^^^^^^^
AttributeError: 'DebuggedApplication' object has no attribute '_pin'
Activity
Fix: initialize _pin in DebuggedApplication.__init__ to avoid Attribu…