Commit 3090694
committed
Fix compileall.py so that it fails on SyntaxErrors
The changes cause compilation failures in any file in the Python
installation lib directory to cause the install to fail. It looks
like compileall.py intended to behave this way, but a change to
py_compile.py and a separate bug defeated it.
Fixes SF bug #412436
This change affects the test suite, which contains several files that
contain intentional errors. The solution is to extend compileall.py
with the ability to skip compilation of selected files.
In the test suite, rename nocaret.py and test_future[3..7].py to start
with badsyntax_nocaret.py and badsyntax_future[3..7].py. Update the
makefile to skip compilation of these files. Update the tests to use
the name names for imports.
NB compileall.py is changed so that compile_dir() returns success only
if all recursive calls to compile_dir() also check success.1 parent bc41957 commit 3090694Copy full SHA for 3090694
10 files changed
+11-16Lines changed: 11 additions & 16 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- Lib/test
- output
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Lib/test/test_future3.py Lib/test/badsyntax_future3.pyLib/test/test_future3.py renamed to Lib/test/badsyntax_future3.py
Copy file name to clipboardFile renamed without changes.
Collapse file
Lib/test/test_future4.py Lib/test/badsyntax_future4.pyLib/test/test_future4.py renamed to Lib/test/badsyntax_future4.py
Copy file name to clipboardFile renamed without changes.
Collapse file
Lib/test/test_future5.py Lib/test/badsyntax_future5.pyLib/test/test_future5.py renamed to Lib/test/badsyntax_future5.py
Copy file name to clipboardFile renamed without changes.
Collapse file
Lib/test/test_future6.py Lib/test/badsyntax_future6.pyLib/test/test_future6.py renamed to Lib/test/badsyntax_future6.py
Copy file name to clipboardFile renamed without changes.
Collapse file
Lib/test/test_future7.py Lib/test/badsyntax_future7.pyLib/test/test_future7.py renamed to Lib/test/badsyntax_future7.py
Copy file name to clipboardFile renamed without changes.
Collapse file
Lib/test/nocaret.py Lib/test/badsyntax_nocaret.pyLib/test/nocaret.py renamed to Lib/test/badsyntax_nocaret.py
Copy file name to clipboardFile renamed without changes.
Collapse file
Lib/test/output/test_future
Copy file name to clipboard+5-5Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | 2 | |
3 | 3 | |
4 | | - |
5 | | - |
6 | | - |
7 | | - |
8 | | - |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
Collapse file
-5Lines changed: 0 additions & 5 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
199 | 199 | |
200 | 200 | |
201 | 201 | |
202 | | - |
203 | | - |
204 | | - |
205 | | - |
206 | | - |
207 | 202 | |
208 | 203 | |
209 | 204 | |
|
Collapse file
+5-5Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
19 | 19 | |
20 | 20 | |
21 | 21 | |
22 | | - |
| 22 | + |
23 | 23 | |
24 | 24 | |
25 | 25 | |
26 | 26 | |
27 | | - |
| 27 | + |
28 | 28 | |
29 | 29 | |
30 | 30 | |
31 | 31 | |
32 | | - |
| 32 | + |
33 | 33 | |
34 | 34 | |
35 | 35 | |
36 | 36 | |
37 | | - |
| 37 | + |
38 | 38 | |
39 | 39 | |
40 | 40 | |
41 | 41 | |
42 | | - |
| 42 | + |
43 | 43 | |
44 | 44 | |
Collapse file
+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
22 | 22 | |
23 | 23 | |
24 | 24 | |
25 | | - |
| 25 | + |
26 | 26 | |
27 | 27 | |
28 | 28 | |
|
0 commit comments