You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Python: a builtin like TimeoutError links an unrelated project class of that name in a file that isn't imported #3232
raise TimeoutError(...) in a file that neither defines nor imports TimeoutError uses Python's builtin. codegraph links it to a project class TimeoutError in an unrelated file.
# other/far.pyclassTimeoutError(Exception):
pass# t.py (no imports)defrun():
raiseTimeoutError("late") # the builtin
Expected: no edge. A bare name a file neither binds nor imports (and doesn't star-import) can only be a builtin.
Projects that define their own TimeoutError, ConnectionError, PermissionError and similar classes are common, so every file that raises the builtin gains an edge to one of them.
Found by diffing codegraph's call edges against scip-python (pyright's references).
Environment: main at f72c9d2 (2026-11-01), built from source, Node 22.22.2, Linux x64, WASM engine (CODEGRAPH_KERNEL=0), fresh codegraph init. A 60b0d7a build (2026-10-29) gives the same edges.
Related: #3230 and #3231 end the same way: a bare Python name falls back to a same-named symbol in a file that isn't imported. #2198 added the local-binding check; a builtin has no binding for it to find.
Edited 2026-11-04: re-checked on main at f72c9d2 (with CODEGRAPH_KERNEL=0 and with the native kernel, Node 22.22.2): still reproduces. Corrected two slips: ValidationError isn't a Python builtin, so I replaced it in the list; and the real-case file does import one project module (openevolve.evaluation_result), just nothing named TimeoutError. Added: ValueError and KeyError leak the same way, and so does return TimeoutError(...); except TimeoutError makes no edge. Cause (inferred): the resolver's built-in list, PYTHON_BUILT_INS, has no exception names.
Thanks for the report, @inth3shadows. A builtin written bare, like raise TimeoutError(…), class Bad(ValueError) or sorted(rows), no longer links to a project class or function of that name in a file the code doesn't import. A name the file defines or imports itself still resolves as before. The fix is #3357. It is merged to main today (2026-11-18) and ships in the next release.
Activity
fix(python): a builtin like TimeoutError no longer links a project na…
fix(python): a builtin like TimeoutError no longer links a project na…
fix(python): a builtin like TimeoutError no longer links a project na…
fix(python): a builtin like TimeoutError no longer links a project na…
fix(python): a builtin like TimeoutError no longer links a project na…
fix(python): a builtin like TimeoutError no longer links a project na…
colbymchenry commentedon Nov 18, 2026
Thanks for the report, @inth3shadows. A builtin written bare, like
raise TimeoutError(…),class Bad(ValueError)orsorted(rows), no longer links to a project class or function of that name in a file the code doesn't import. A name the file defines or imports itself still resolves as before. The fix is #3357. It is merged to main today (2026-11-18) and ships in the next release.fix(python): a builtin like TimeoutError no longer links a project na…