Skip to content

Commit

Permalink
fix locals in InteractiveConsole
Browse files Browse the repository at this point in the history
  • Loading branch information
Michele Bertoldi authored and davidism committed Mar 17, 2020
1 parent 6ff5cd1 commit c761ff8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Expand Up @@ -12,6 +12,8 @@ Unreleased
Policy header. :pr:`1731`
- ``http_date`` zero fills years < 1000 to always output four digits.
:issue:`1739`
- Fix missing local variables in interactive debugger console.
:issue:`1746`


Version 1.0.0
Expand Down
5 changes: 3 additions & 2 deletions src/werkzeug/debug/console.py
Expand Up @@ -148,8 +148,9 @@ def func(source, filename, symbol):

class _InteractiveConsole(code.InteractiveInterpreter):
def __init__(self, globals, locals):
locals = dict(globals)
locals.update(locals)
_locals = dict(globals)
_locals.update(locals)
locals = _locals
locals["dump"] = dump
locals["help"] = helper
locals["__loader__"] = self.loader = _ConsoleLoader()
Expand Down

0 comments on commit c761ff8

Please sign in to comment.