Skip to content

Commit

Permalink
Merge pull request #1741 from mbertoldi/1.0.x
Browse files Browse the repository at this point in the history
Fix locals in InteractiveConsole
  • Loading branch information
davidism authored Mar 17, 2020
2 parents 6ff5cd1 + c761ff8 commit 32f3b07
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 32f3b07

Please sign in to comment.