← 输入框|github.com|刷新
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ flamescope.json
/.cargo/config

extra_tests/snippets/resources
extra_tests/snippets/not_impl.py
extra_tests/not_impl.py
11 changes: 9 additions & 2 deletions extra_tests/not_impl_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@
"xdrlib",
}

# CPython specific modules (mostly consisting of templates/tests)
CPYTHON_SPECIFIC_MODS = {
'xxmodule', 'xxsubtype', 'xxlimited', '_xxtestfuzz'
'_testbuffer', '_testcapi', '_testimportmultiple', '_testinternalcapi', '_testmultiphase',
}

IGNORED_MODULES = {'this', 'antigravity'} | PEP_594_MODULES | CPYTHON_SPECIFIC_MODS

sys.path = [
path
Expand Down Expand Up @@ -210,7 +217,7 @@ def gen_modules():
# e.g. printing something or opening a webpage
modules = {}
for mod_name in scan_modules():
if mod_name in ("this", "antigravity") or mod_name in PEP_594_MODULES:
if mod_name in IGNORED_MODULES:
continue
# when generating CPython list, ignore items defined by other modules
dir_result = dir_of_mod_or_error(mod_name, keep_other=False)
Expand Down Expand Up @@ -372,5 +379,5 @@ def remove_one_indent(s):
compare_src = inspect.getsourcelines(compare)[0][1:]
output += "".join(remove_one_indent(line) for line in compare_src)

with open("snippets/not_impl.py", "w") as f:
with open("not_impl.py", "w") as f:
f.write(output + "\n")
2 changes: 1 addition & 1 deletion whats_left.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ fi
# run whats_left
cargo build --release

cargo run --release -q -- extra_tests/snippets/not_impl.py
cargo run --release -q -- extra_tests/not_impl.py