This repository has been archived by the owner on Aug 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Debugger should not stop on GeneratorExit and StopIteration exceptions.
Fixes #1959
- Loading branch information
Showing
8 changed files
with
1,413 additions
and
1,275 deletions.
There are no files selected for viewing
2,579 changes: 1,322 additions & 1,257 deletions
2,579
src/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_cython.c
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/ptvsd/_vendored/pydevd/build_tools/check_no_git_modifications.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import sys | ||
|
||
|
||
def main(): | ||
import subprocess | ||
process = subprocess.Popen( | ||
'git status --porcelain'.split(), stderr=subprocess.STDOUT, stdout=subprocess.PIPE) | ||
output, _ = process.communicate() | ||
if output: | ||
if sys.version_info[0] > 2: | ||
output = output.decode('utf-8') | ||
|
||
files = set() | ||
for line in output.splitlines(): | ||
filename = line[3:] | ||
files.add(filename.strip()) | ||
|
||
files.discard('.travis_install_python_deps.sh') | ||
files.discard('miniconda.sh') | ||
if files: | ||
# If there are modifications, show a diff of the modifications and fail the script. | ||
# (we're mostly interested in modifications to the .c generated files by cython). | ||
print('Found modifications in git:\n%s ' % (output,)) | ||
print('Files: %s' % (files,)) | ||
print('----------- diff -------------') | ||
subprocess.call('git diff'.split()) | ||
print('----------- end diff -------------') | ||
sys.exit(1) | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/ptvsd/_vendored/pydevd/tests_python/resources/_debugger_case_ignore_exceptions.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import sys | ||
if __name__ == '__main__': | ||
|
||
a = [1, 2, 3, 4] | ||
b = [2, 7] | ||
|
||
assert any(x in a for x in b) | ||
|
||
def gen(): | ||
yield 1 | ||
|
||
for i in gen(): | ||
pass | ||
|
||
def gen2(): | ||
yield 2 | ||
if sys.version_info[:2] < (3, 7): | ||
# On Python 3.7 onwards this will generate an unhandled exception, which | ||
# is not what we want. | ||
raise StopIteration() | ||
|
||
for i in gen2(): | ||
pass | ||
|
||
print('TEST SUCEEDED!') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters