Skip to content

Commit 2dcf9c6

Browse files
Sync main → development (auto-merge conflict fixes)
2 parents ba69fda + 43f262c commit 2dcf9c6

8 files changed

Lines changed: 27 additions & 21 deletions

File tree

licenses/cryptography-wasm.txt

Lines changed: 0 additions & 10 deletions
This file was deleted.

pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,10 @@ dependencies = [
8888
"aiohttp>=3.10.11,<3.11.0; python_version == '3.8'", # Last Py3.8 version (9 known CVEs)
8989
"aiohttp>=3.13.5; python_version >= '3.9'", # Latest with all patches
9090

91-
# cryptography - version split by Python
9291
"cryptography>=46.0.7 ; python_version >= '3.8' and platform_system != 'Emscripten'",
9392
"cryptography>=45.0.7,<46.0 ; python_version == '3.7' and platform_system != 'Emscripten'",
94-
"cryptography-wasm>=42.0.2 ; platform_system == 'Emscripten'",
95-
93+
"cryptography ; platform_system == 'Emscripten'",
94+
9695
# Security scanning
9796
"pip-audit>=2.0.0",
9897

src/omnipkg/common_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,8 @@ def safe_input(prompt: str, default: str = "", auto_value: str = None) -> str:
818818
if msg.get("type") == "stdin_line":
819819
return msg.get("data", default).strip()
820820
except Exception:
821-
pass # relay failed — fall through to non-interactive default
821+
# relay failed — fall through BUT warn so we know why
822+
safe_print(f"[safe_input] relay failed: {e}", file=sys.stderr)
822823
result = auto_value if auto_value is not None else default
823824
safe_print(_("🤖 Auto-selecting: {}").format(result))
824825
return result

src/omnipkg/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9852,7 +9852,6 @@ def heal(self, dry_run: bool = False, force: bool = False) -> int:
98529852
for pkg in sorted(reconciled_plan):
98539853
safe_print(_(' - 🎯 {}').format(pkg))
98549854
safe_print("─" * 60)
9855-
98569855
if dry_run:
98579856
safe_print("\n🔬 Dry run complete. No changes were made.")
98589857
return 0
@@ -9969,6 +9968,7 @@ def get_installed_packages(self, live: bool = False) -> Dict[str, str]:
99699968
return live_packages
99709969
except Exception as e:
99719970
safe_print(_(" ⚠️ Could not perform live package scan: {}").format(e))
9971+
# relay failed — fall through BUT warn so we know why
99729972
return self._installed_packages_cache or {}
99739973
if self._installed_packages_cache is None:
99749974
if not self.cache_client:

src/omnipkg/dispatcher.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2191,6 +2191,7 @@ int main(int argc, char **argv) {
21912191
* that contain the word python (e.g. "info python-dotenv"). */
21922192
int info_python = (is_info && argc >= 3 &&
21932193
strcmp(argv[2], "python") == 0);
2194+
int is_heal = (strcmp(argv[1], "heal") == 0);
21942195
int is_logs_follow = 0;
21952196
if (argc >= 3 && strcmp(argv[1], "daemon") == 0 && strcmp(argv[2], "logs") == 0) {
21962197
for (int _i = 3; _i < argc; _i++) {
@@ -2200,6 +2201,9 @@ int main(int argc, char **argv) {
22002201
}
22012202
}
22022203
}
2204+
int is_stress_test = (strcmp(argv[1], "stress-test") == 0);
2205+
int is_demo = (strcmp(argv[1], "demo") == 0);
2206+
int is_monitor = (strcmp(argv[1], "monitor") == 0);
22032207
/* "uninstall <pkg>" with no version spec needs interactive version picker */
22042208
int is_uninstall_interactive = 0;
22052209
if (argc >= 3 && strcmp(argv[1], "uninstall") == 0) {
@@ -2211,7 +2215,7 @@ int main(int argc, char **argv) {
22112215
}
22122216
}
22132217
}
2214-
is_interactive_command = ((is_info && !info_python) || is_config || is_logs_follow || is_uninstall_interactive);
2218+
is_interactive_command = ((is_info && !info_python) || is_config || is_logs_follow || is_heal || is_stress_test || is_demo || is_monitor || is_uninstall_interactive);
22152219
}
22162220
if (!is_swap_python && !is_interactive_command) {
22172221
try_daemon_cli(target_python, argc, argv, version_injected, forced_version);

src/omnipkg/dispatcher.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,17 @@ def main():
237237
and argv_commands[1] == "logs"
238238
and "-f" in sys.argv
239239
)
240-
is_interactive_command = is_info_command or is_config_command or is_logs_follow
240+
# uninstall without version spec needs interactive picker
241+
is_uninstall_interactive = (
242+
len(argv_commands) >= 2
243+
and argv_commands[0] == "uninstall"
244+
and not any(c in arg for arg in argv_commands[1:] for c in ("=", ">", "<"))
245+
)
246+
is_interactive_command = is_info_command or is_config_command or is_logs_follow or is_uninstall_interactive
241247

242248
# Commands that need a real TTY (streaming output, interactive, long-running).
243249
# Bypass the daemon entirely and run directly as a subprocess.
244-
_DIRECT_COMMANDS = {"stress-test", "demo", "monitor", "logs"}
250+
_DIRECT_COMMANDS = {"stress-test", "demo", "monitor", "heal", "logs"}
245251
is_direct_command = bool(argv_commands) and argv_commands[0] in _DIRECT_COMMANDS
246252

247253
if is_direct_command:

src/omnipkg/integration/ci_integration.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33
import sys
44
from typing import List, Optional
55

6-
import typer
6+
try:
7+
import typer
8+
except ImportError:
9+
typer = None # type: ignore[assignment]
710

8-
app = typer.Typer()
11+
app = typer.Typer() if typer is not None else None
912

1013
from omnipkg.common_utils import safe_print
1114

src/omnipkg/isolation/worker_daemon.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2570,7 +2570,10 @@ def execute_with_activity_monitoring(
25702570
Returns:
25712571
Response dict from worker
25722572
"""
2573-
import psutil
2573+
try:
2574+
import psutil
2575+
except ImportError:
2576+
psutil = None # type: ignore[assignment]
25742577

25752578
try:
25762579
ps_process = psutil.Process(worker_process.pid)

0 commit comments

Comments
 (0)