Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
86900a49
Commit
86900a49
authored
Mar 12, 2019
by
Anthony Sottile
Committed by
Lisa Roach
Mar 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix stepping into a frame without a __name__ (GH-12064)
parent
839b925f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
0 deletions
+11
-0
Lib/bdb.py
Lib/bdb.py
+2
-0
Lib/test/test_bdb.py
Lib/test/test_bdb.py
+7
-0
Misc/NEWS.d/next/Library/2019-02-26-22-41-38.bpo-36130._BnZOo.rst
...S.d/next/Library/2019-02-26-22-41-38.bpo-36130._BnZOo.rst
+2
-0
No files found.
Lib/bdb.py
View file @
86900a49
...
...
@@ -190,6 +190,8 @@ class Bdb:
def
is_skipped_module
(
self
,
module_name
):
"Return True if module_name matches any skip pattern."
if
module_name
is
None
:
# some modules do not have names
return
False
for
pattern
in
self
.
skip
:
if
fnmatch
.
fnmatch
(
module_name
,
pattern
):
return
True
...
...
Lib/test/test_bdb.py
View file @
86900a49
...
...
@@ -730,6 +730,13 @@ class StateTestCase(BaseTestCase):
with
TracerRun
(
self
,
skip
=
skip
)
as
tracer
:
tracer
.
runcall
(
tfunc_import
)
def
test_skip_with_no_name_module
(
self
):
# some frames have `globals` with no `__name__`
# for instance the second frame in this traceback
# exec(compile('raise ValueError()', '', 'exec'), {})
bdb
=
Bdb
(
skip
=
[
'anything*'
])
self
.
assertIs
(
bdb
.
is_skipped_module
(
None
),
False
)
def
test_down
(
self
):
# Check that set_down() raises BdbError at the newest frame.
self
.
expect_set
=
[
...
...
Misc/NEWS.d/next/Library/2019-02-26-22-41-38.bpo-36130._BnZOo.rst
0 → 100644
View file @
86900a49
Fix ``pdb`` with ``skip=...`` when stepping into a frame without a
``__name__`` global. Patch by Anthony Sottile.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment