Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Cleanup whats_left.py #5654

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

Merged
merged 2 commits into from
Apr 2, 2025
Merged
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
45 changes: 9 additions & 36 deletions whats_left.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,53 +55,26 @@ def parse_args():
action="store_true",
help="print output as JSON (instead of line by line)",
)
parser.add_argument(
"--features",
action="store",
help="which features to enable when building RustPython (default: ssl)",
default="ssl",
)

args = parser.parse_args()
return args


args = parse_args()


# modules suggested for deprecation by PEP 594 (www.python.org/dev/peps/pep-0594/)
# some of these might be implemented, but they are not a priority
PEP_594_MODULES = {
"aifc",
"asynchat",
"asyncore",
"audioop",
"binhex",
"cgi",
"cgitb",
"chunk",
"crypt",
"formatter",
"fpectl",
"imghdr",
"imp",
"macpath",
"msilib",
"nntplib",
"nis",
"ossaudiodev",
"parser",
"pipes",
"smtpd",
"sndhdr",
"spwd",
"sunau",
"telnetlib",
"uu",
"xdrlib",
}

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

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

sys.path = [
path
Expand Down Expand Up @@ -446,9 +419,9 @@ def remove_one_indent(s):
f.write(output + "\n")


subprocess.run(["cargo", "build", "--release", "--features=ssl"], check=True)
subprocess.run(["cargo", "build", "--release", f"--features={args.features}"], check=True)
result = subprocess.run(
["cargo", "run", "--release", "--features=ssl", "-q", "--", GENERATED_FILE],
["cargo", "run", "--release", f"--features={args.features}", "-q", "--", GENERATED_FILE],
env={**os.environ.copy(), "RUSTPYTHONPATH": "Lib"},
text=True,
capture_output=True,
Expand Down
Loading