Skip to content
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

Add notice for PyPy users #829

Merged
merged 1 commit into from
Aug 26, 2024
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
15 changes: 15 additions & 0 deletions dissect/target/tools/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import logging
import os
import pathlib
import platform
import pydoc
import random
import re
Expand Down Expand Up @@ -1442,6 +1443,20 @@
if args.quiet:
logging.getLogger("dissect").setLevel(level=logging.ERROR)

# PyPy < 3.10.14 readline is stuck in Python 2.7
if platform.python_implementation() == "PyPy":
major, minor, patch = tuple(map(int, platform.python_version_tuple()))
if major <= 3 and minor <= 10 and patch < 14:
print(

Check warning on line 1450 in dissect/target/tools/shell.py

View check run for this annotation

Codecov / codecov/patch

dissect/target/tools/shell.py#L1450

Added line #L1450 was not covered by tests
"\n".join(
[
"Note for users of PyPy < 3.10.14:",
"Autocomplete might not work due to an outdated version of pyrepl/readline.py",
"To fix this, please update your version of PyPy.",
]
)
)

try:
open_shell(args.targets, args.python, args.registry)
except TargetError as e:
Expand Down