Skip to content

Commit

Permalink
Add notice for PyPy users (DIS-3295)
Browse files Browse the repository at this point in the history
  • Loading branch information
cecinestpasunepipe committed Aug 20, 2024
1 parent 6894023 commit 5dfc347
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 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,18 @@ def main() -> None:
if args.quiet:
logging.getLogger("dissect").setLevel(level=logging.ERROR)

# PyPy readline is stuck in Python 2.7
if platform.python_implementation() == "PyPy":
print(

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

View check run for this annotation

Codecov / codecov/patch

dissect/target/tools/shell.py#L1448

Added line #L1448 was not covered by tests
"\n".join(
[
"Note for users of PyPy:",
"Autocomplete might not work due to an outdated version of pyrepl/readline.py",
"To fix this, please manually overwrite with latest dev-version from their source.",
]
)
)

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

0 comments on commit 5dfc347

Please sign in to comment.