Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
_ast_unparse
  • Loading branch information
youknowone committed Jan 24, 2026
commit 968771dcbbefb279713d56a516efef5a61b4d63f
3 changes: 3 additions & 0 deletions scripts/update_lib/deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ def clear_import_graph_caches() -> None:
"abc": {
"hard_deps": ["_py_abc.py"],
},
"ast": {
"hard_deps": ["_ast_unparse.py"],
},
"codecs": {
"hard_deps": ["_pycodecs.py"],
},
Expand Down
8 changes: 7 additions & 1 deletion scripts/update_lib/show_todo.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,14 @@ def get_untracked_files(
) -> list[str]:
"""Get files that exist in cpython/Lib but not in our Lib.

Excludes files that belong to tracked modules (shown in library todo).
Excludes files that belong to tracked modules (shown in library todo)
and hard_deps of those modules.
Includes all file types (.py, .txt, .pem, .json, etc.)

Returns:
Sorted list of relative paths (e.g., ["foo.py", "data/file.txt"])
"""
from update_lib.deps import resolve_hard_dep_parent
from update_lib.show_deps import get_all_modules

cpython_lib = pathlib.Path(cpython_prefix) / "Lib"
Expand Down Expand Up @@ -184,6 +186,10 @@ def get_untracked_files(
if module_name in tracked_modules:
continue

# Check if this is a hard_dep of a tracked module
if resolve_hard_dep_parent(module_name) is not None:
continue

# Check if exists in local lib
local_file = local_lib / rel_path
if not local_file.exists():
Expand Down