Skip to content

DebugApplication(..., pin_security=False) no longer works #3075

Closed

Description

@living180

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'

Environment:

  • Python version: 3.12
  • Werkzeug version: 3.1.4

Appears to have been introduced by 0c49ff0#diff-83867b1c4c9b75c728654ed284dc98f7c8d4e8bd682fc31b977d122dd045178a

Activity

  1. added this to the 3.1.5 milestone on Jan 2, 2026
  2. locked as resolved and limited conversation to collaborators on Jan 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions