From 29083b7c49f790ae570ab00d58b49d3f908ab1a2 Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Mon, 8 Sep 2025 10:33:21 -0400 Subject: [PATCH] python_deploy: update pip prior to refresh Packages updated via PyPI require a recent version of Pip to perform the "dry run" installation used to determine upstream version info. Signed-off-by: Eric Callahan --- moonraker/components/update_manager/app_deploy.py | 1 + moonraker/components/update_manager/python_deploy.py | 1 + 2 files changed, 2 insertions(+) diff --git a/moonraker/components/update_manager/app_deploy.py b/moonraker/components/update_manager/app_deploy.py index 765f491..ccebab0 100644 --- a/moonraker/components/update_manager/app_deploy.py +++ b/moonraker/components/update_manager/app_deploy.py @@ -394,6 +394,7 @@ class AppDeploy(BaseDeploy): self.pip_version = pip_utils.MIN_PIP_VERSION else: self.notify_status("Pip version up to date") + self.pip_version = pip_ver.pip_version except asyncio.CancelledError: raise except Exception as e: diff --git a/moonraker/components/update_manager/python_deploy.py b/moonraker/components/update_manager/python_deploy.py index 0c278f1..dfa92c6 100644 --- a/moonraker/components/update_manager/python_deploy.py +++ b/moonraker/components/update_manager/python_deploy.py @@ -258,6 +258,7 @@ class PythonDeploy(AppDeploy): assert self.pip_cmd is not None pip_args = f"install -U --quiet --dry-run --no-deps --report - {norm_name}" pip_exec = pip_utils.AsyncPipExecutor(self.pip_cmd, self.server) + await self._update_pip(pip_exec) resp = await pip_exec.call_pip_with_response(pip_args) data: Dict[str, Any] = json_wrapper.loads(resp) install_data: List[Dict[str, Any]] = data.get("install", [])