Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Lib/pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
from contextlib import contextmanager
from rlcompleter import Completer
from types import CodeType
from warnings import deprecated


class Restart(Exception):
Expand Down Expand Up @@ -418,6 +419,16 @@ def setup(self, f, tb):
]
self.rcLines = []

@property
@deprecated('Use curframe.f_locals instead')
def curframe_locals(self):
return self.curframe.f_locals

@curframe_locals.setter
@deprecated('Use curframe.f_locals instead')
def curframe_locals(self, value):
pass

# Override Bdb methods

def user_call(self, frame, argument_list):
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_pyclbr.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def test_others(self):
cm(
'pdb',
# pyclbr does not handle elegantly `typing` or properties
ignore=('Union', '_ModuleTarget', '_ScriptTarget', '_ZipTarget'),
ignore=('Union', '_ModuleTarget', '_ScriptTarget', '_ZipTarget', 'curframe_locals'),
)
cm('pydoc', ignore=('input', 'output',)) # properties

Expand Down
Loading