From 396fc6cbb24a977bd76018961a032b3a3c9cb688 Mon Sep 17 00:00:00 2001 From: Mariam Ahhttouche Date: Fri, 13 Feb 2026 16:31:02 +0100 Subject: [PATCH] uv_python module: improve latest state check mode to show version that will be installed --- plugins/modules/uv_python.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/modules/uv_python.py b/plugins/modules/uv_python.py index cc68d443a4..d8f29228d9 100644 --- a/plugins/modules/uv_python.py +++ b/plugins/modules/uv_python.py @@ -101,10 +101,11 @@ class UV: def upgrade_python(self): rc, out, _ = self._find_python("--show-version") detected_version = out.split()[0] - if rc == 0 and detected_version == self._get_latest_patch_release(): + latest_version = self._get_latest_patch_release() + if rc == 0 and detected_version == latest_version: return False, out if self.module.check_mode: - return True, "" + return True, latest_version cmd = [self.module.get_bin_path("uv", required=True), "python", "upgrade", self.python_version_str] rc, out, _ = self.module.run_command(cmd, check_rc=True)