Skip to content

Commit 91409ff

Browse files
authored
Fix compiled dmypy on Windows (#7929)
The issue was that the mechanism for transmitting Options to the daemon on Windows used snapshot/apply_changes and those don't play well with read-only attributes when compiled. I've fixed this in the most expedient way for now but will do some follow ups to clean up this mechanism and hopefully test this on Windows in CI.
1 parent a8befe7 commit 91409ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypy/options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def snapshot(self) -> object:
275275
# Under mypyc, we don't have a __dict__, so we need to do worse things.
276276
d = dict(getattr(self, '__dict__', ()))
277277
for k in get_class_descriptors(Options):
278-
if hasattr(self, k):
278+
if hasattr(self, k) and k != "new_semantic_analyzer":
279279
d[k] = getattr(self, k)
280280
del d['per_module_cache']
281281
return d

0 commit comments

Comments
 (0)