Commit 976d105
authored
Fix couple crashes in dmypy (python#18098)
Fixes python#18019
Fixes python#17775
These two are essentially variations of the same thing. Instead of
adding e.g. `types` to `SENSITIVE_INTERNAL_MODULES` (which would be
fragile and re-introduce same crashes whenever we add a new "core"
module) I add _all stdlib modules_. The only scenario when stdlib
changes is when a version of mypy changes, and in this case the daemon
will be (or should be) restarted anyway.
While adding tests for these I noticed a discrepancy in
`--follow-imports=normal` in the daemon: the files explicitly added on
the command line should be always treated as changed, since otherwise we
will not detect errors if a file was removed from command line in an
intermediate run.
Finally the tests also discovered a spurious error when cache is
disabled (via `/dev/null`).1 parent 1de4871 commit 976d105
File tree
6 files changed
+75
-21
lines changed- mypy
- server
- test-data/unit
6 files changed
+75
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1050 | 1050 | | |
1051 | 1051 | | |
1052 | 1052 | | |
1053 | | - | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
1054 | 1057 | | |
1055 | 1058 | | |
1056 | 1059 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
625 | 625 | | |
626 | 626 | | |
627 | 627 | | |
| 628 | + | |
| 629 | + | |
628 | 630 | | |
629 | 631 | | |
630 | 632 | | |
| |||
888 | 890 | | |
889 | 891 | | |
890 | 892 | | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
891 | 909 | | |
892 | 910 | | |
893 | 911 | | |
| |||
903 | 921 | | |
904 | 922 | | |
905 | 923 | | |
906 | | - | |
907 | | - | |
908 | | - | |
909 | | - | |
910 | | - | |
911 | | - | |
912 | | - | |
913 | | - | |
914 | | - | |
915 | | - | |
916 | | - | |
917 | 924 | | |
918 | 925 | | |
919 | 926 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
| 149 | + | |
154 | 150 | | |
155 | 151 | | |
156 | 152 | | |
| |||
162 | 158 | | |
163 | 159 | | |
164 | 160 | | |
165 | | - | |
| 161 | + | |
166 | 162 | | |
167 | 163 | | |
168 | 164 | | |
169 | | - | |
| 165 | + | |
| 166 | + | |
170 | 167 | | |
171 | 168 | | |
172 | 169 | | |
| |||
406 | 403 | | |
407 | 404 | | |
408 | 405 | | |
409 | | - | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
870 | 870 | | |
871 | 871 | | |
872 | 872 | | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
873 | 885 | | |
874 | 886 | | |
875 | 887 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
266 | 298 | | |
267 | 299 | | |
268 | 300 | | |
| |||
0 commit comments