-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dmypy: AssertionError: builtins.int crash for running a second time w/ source changes #14645
Comments
I also get this failure when I check the entire source directory (of an entirely different, closed source, project), and then immediately re-check a simple file with an error (without any changes):
Additional mystery: Why did it take 8 minutes to re-check a single file and reach this failure, when checking the entire |
I've come across this in the course of investigating #15043. This is as small as I can get a failing example:
import math
math.floor(sum(range(1)))
Commands: dmypy run -- foo.py
dmypy run -- bar.py Results: $ dmypy run -- foo.py
Daemon started
Success: no issues found in 1 source file
$ dmypy run -- bar.py
/.../mypy/typeshed/stdlib/builtins.pyi:220: error: INTERNAL ERROR -- Please try using mypy master on GitHub:
https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
Please report a bug at https://github.com/python/mypy/issues
version: 1.9.0+dev.f9e8e0bda5cfbb54d6a8f9e482aa25da28a1a635
/.../mypy/typeshed/stdlib/builtins.pyi: error: INTERNAL ERROR -- Please try using mypy master on GitHub:
https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
Please report a bug at https://github.com/python/mypy/issues
version: 1.9.0+dev.f9e8e0bda5cfbb54d6a8f9e482aa25da28a1a635
Daemon crashed!
Traceback (most recent call last):
File "/.../mypy/dmypy_server.py", line 236, in serve
resp = self.run_command(command, data)
File "/.../mypy/dmypy_server.py", line 285, in run_command
ret = method(self, **data)
File "/.../mypy/dmypy_server.py", line 353, in cmd_run
return self.check(sources, export_types, is_tty, terminal_width)
File "/.../mypy/dmypy_server.py", line 429, in check
messages = self.fine_grained_increment_follow_imports(
File "/.../mypy/dmypy_server.py", line 695, in fine_grained_increment_follow_imports
messages = fine_grained_manager.update([], to_delete)
File "/.../mypy/server/update.py", line 267, in update
result = self.update_one(
File "/.../mypy/server/update.py", line 369, in update_one
result = self.update_module(next_id, next_path, next_id in removed_set, followed)
File "/.../mypy/server/update.py", line 452, in update_module
remaining += propagate_changes_using_dependencies(
File "/.../mypy/server/update.py", line 881, in propagate_changes_using_dependencies
triggered |= reprocess_nodes(manager, graph, id, nodes, deps, processed_targets)
File "/.../mypy/server/update.py", line 1010, in reprocess_nodes
semantic_analysis_for_targets(graph[module_id], nodes, graph, saved_attrs)
File "/.../mypy/semanal_main.py", line 137, in semantic_analysis_for_targets
process_top_levels(graph, [state.id], patches)
File "/.../mypy/semanal_main.py", line 220, in process_top_levels
deferred, incomplete, progress = semantic_analyze_target(
File "/.../mypy/semanal_main.py", line 349, in semantic_analyze_target
analyzer.refresh_partial(
File "/.../mypy/semanal.py", line 597, in refresh_partial
self.refresh_top_level(node)
File "/.../mypy/semanal.py", line 608, in refresh_top_level
self.accept(d)
File "/.../mypy/semanal.py", line 6544, in accept
report_internal_error(err, self.errors.file, node.line, self.errors, self.options)
File "/.../mypy/errors.py", line 1261, in report_internal_error
raise err
File "/.../mypy/semanal.py", line 6542, in accept
node.accept(self)
File "/.../mypy/nodes.py", line 1310, in accept
return visitor.visit_assignment_stmt(self)
File "/.../mypy/semanal.py", line 2860, in visit_assignment_stmt
if self.check_and_set_up_type_alias(s):
File "/.../mypy/semanal.py", line 3617, in check_and_set_up_type_alias
res, alias_tvars, depends_on, qualified_tvars, empty_tuple_index = self.analyze_alias(
File "/.../mypy/semanal.py", line 3506, in analyze_alias
analyzed, depends_on = analyze_type_alias(
File "/.../mypy/typeanal.py", line 156, in analyze_type_alias
res = type.accept(analyzer)
File "/.../mypy/types.py", line 955, in accept
return visitor.visit_unbound_type(self)
File "/.../mypy/typeanal.py", line 259, in visit_unbound_type
typ = self.visit_unbound_type_nonoptional(t, defining_literal)
File "/.../mypy/typeanal.py", line 399, in visit_unbound_type_nonoptional
special = self.try_analyze_special_unbound_type(t, fullname)
File "/.../mypy/typeanal.py", line 624, in try_analyze_special_unbound_type
return self.analyze_literal_type(t)
File "/.../mypy/typeanal.py", line 1470, in analyze_literal_type
analyzed_types = self.analyze_literal_param(i + 1, arg, t)
File "/.../mypy/typeanal.py", line 1536, in analyze_literal_param
fallback = self.named_type(arg.base_type_name)
File "/.../mypy/typeanal.py", line 1735, in named_type
node = self.lookup_fully_qualified(fully_qualified_name)
File "/.../mypy/typeanal.py", line 256, in lookup_fully_qualified
return self.api.lookup_fully_qualified(name)
File "/.../mypy/semanal.py", line 5855, in lookup_fully_qualified
assert ret is not None, fullname
AssertionError: builtins.int |
This issue is very similar to #12744, and I've found two of our checkouts that can reproduce this one with dmypy 1.0.0, steps are below
for me, I get stack trace:
The text was updated successfully, but these errors were encountered: