From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E916A1584AD for ; Sat, 12 Apr 2025 11:49:23 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id C6E6A343A90 for ; Sat, 12 Apr 2025 11:49:23 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id EB6FE1104B7; Sat, 12 Apr 2025 11:49:18 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id E1C991104B7 for ; Sat, 12 Apr 2025 11:49:18 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8819F343A6D for ; Sat, 12 Apr 2025 11:49:18 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A64B81688 for ; Sat, 12 Apr 2025 11:49:16 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1744458552.191628c88adbee083e9cb95eb45f6306754121d7.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/uv/files/, dev-python/uv/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/uv/files/uv-0.6.13-test-ws.patch dev-python/uv/uv-0.6.13.ebuild X-VCS-Directories: dev-python/uv/files/ dev-python/uv/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 191628c88adbee083e9cb95eb45f6306754121d7 X-VCS-Branch: master Date: Sat, 12 Apr 2025 11:49:16 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: bac89fde-f018-4e42-92b0-a69a1eb5bb7e X-Archives-Hash: 579241a88dd0ce09504fa7082b08c1ca commit: 191628c88adbee083e9cb95eb45f6306754121d7 Author: Michał Górny gentoo org> AuthorDate: Sat Apr 12 11:40:08 2025 +0000 Commit: Michał Górny gentoo org> CommitDate: Sat Apr 12 11:49:12 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=191628c8 dev-python/uv: Fix test failure with Python 3.12.10 Signed-off-by: Michał Górny gentoo.org> dev-python/uv/files/uv-0.6.13-test-ws.patch | 241 ++++++++++++++++++++++++++++ dev-python/uv/uv-0.6.13.ebuild | 5 + 2 files changed, 246 insertions(+) diff --git a/dev-python/uv/files/uv-0.6.13-test-ws.patch b/dev-python/uv/files/uv-0.6.13-test-ws.patch new file mode 100644 index 000000000000..bda1b6d0c93a --- /dev/null +++ b/dev-python/uv/files/uv-0.6.13-test-ws.patch @@ -0,0 +1,241 @@ +From 5c69e6e3ed1df9b7a2c85b981129a59bf9aec357 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Sat, 12 Apr 2025 13:20:44 +0200 +Subject: [PATCH] Collapse whitespace in python_list tests + +Collapse whitespace into a single space in python_list tests, in order +to make them agnostic of padding, and therefore pass both with Python +3.12.9 and Python 3.12.10. + +Fixes #12799 +--- + crates/uv/tests/it/common/mod.rs | 7 ++++ + crates/uv/tests/it/python_list.rs | 64 ++++++++++++++++--------------- + 2 files changed, 41 insertions(+), 30 deletions(-) + +diff --git a/crates/uv/tests/it/common/mod.rs b/crates/uv/tests/it/common/mod.rs +index 0c6d491f2..09bbbb2b1 100644 +--- a/crates/uv/tests/it/common/mod.rs ++++ b/crates/uv/tests/it/common/mod.rs +@@ -319,6 +319,13 @@ impl TestContext { + self + } + ++ /// Add a filter that collapses duplicate whitespace. ++ #[must_use] ++ pub fn with_collapsed_whitespace(mut self) -> Self { ++ self.filters.push((r"[ \t]+".to_string(), " ".to_string())); ++ self ++ } ++ + /// Add extra directories and configuration for managed Python installations. + #[must_use] + pub fn with_managed_python_dirs(mut self) -> Self { +diff --git a/crates/uv/tests/it/python_list.rs b/crates/uv/tests/it/python_list.rs +index 347993934..657667861 100644 +--- a/crates/uv/tests/it/python_list.rs ++++ b/crates/uv/tests/it/python_list.rs +@@ -7,7 +7,8 @@ use crate::common::{uv_snapshot, TestContext}; + fn python_list() { + let mut context: TestContext = TestContext::new_with_versions(&["3.11", "3.12"]) + .with_filtered_python_symlinks() +- .with_filtered_python_keys(); ++ .with_filtered_python_keys() ++ .with_collapsed_whitespace(); + + uv_snapshot!(context.filters(), context.python_list().env(EnvVars::UV_TEST_PYTHON_PATH, ""), @r" + success: true +@@ -22,8 +23,8 @@ fn python_list() { + success: true + exit_code: 0 + ----- stdout ----- +- cpython-3.12.[X]-[PLATFORM] [PYTHON-3.12] +- cpython-3.11.[X]-[PLATFORM] [PYTHON-3.11] ++ cpython-3.12.[X]-[PLATFORM] [PYTHON-3.12] ++ cpython-3.11.[X]-[PLATFORM] [PYTHON-3.11] + + ----- stderr ----- + "); +@@ -33,7 +34,7 @@ fn python_list() { + success: true + exit_code: 0 + ----- stdout ----- +- cpython-3.12.[X]-[PLATFORM] [PYTHON-3.12] ++ cpython-3.12.[X]-[PLATFORM] [PYTHON-3.12] + + ----- stderr ----- + "); +@@ -43,7 +44,7 @@ fn python_list() { + success: true + exit_code: 0 + ----- stdout ----- +- cpython-3.11.[X]-[PLATFORM] [PYTHON-3.11] ++ cpython-3.11.[X]-[PLATFORM] [PYTHON-3.11] + + ----- stderr ----- + "); +@@ -53,8 +54,8 @@ fn python_list() { + success: true + exit_code: 0 + ----- stdout ----- +- cpython-3.12.[X]-[PLATFORM] [PYTHON-3.12] +- cpython-3.11.[X]-[PLATFORM] [PYTHON-3.11] ++ cpython-3.12.[X]-[PLATFORM] [PYTHON-3.12] ++ cpython-3.11.[X]-[PLATFORM] [PYTHON-3.11] + + ----- stderr ----- + "); +@@ -64,7 +65,7 @@ fn python_list() { + success: true + exit_code: 0 + ----- stdout ----- +- cpython-3.12.[X]-[PLATFORM] [PYTHON-3.12] ++ cpython-3.12.[X]-[PLATFORM] [PYTHON-3.12] + + ----- stderr ----- + "); +@@ -74,7 +75,7 @@ fn python_list() { + success: true + exit_code: 0 + ----- stdout ----- +- cpython-3.12.[X]-[PLATFORM] [PYTHON-3.12] ++ cpython-3.12.[X]-[PLATFORM] [PYTHON-3.12] + + ----- stderr ----- + "); +@@ -87,7 +88,7 @@ fn python_list() { + success: true + exit_code: 0 + ----- stdout ----- +- cpython-3.12.[X]-[PLATFORM] [PYTHON-3.12] ++ cpython-3.12.[X]-[PLATFORM] [PYTHON-3.12] + + ----- stderr ----- + "); +@@ -108,8 +109,8 @@ fn python_list() { + success: true + exit_code: 0 + ----- stdout ----- +- cpython-3.12.[X]-[PLATFORM] [PYTHON-3.12] +- cpython-3.11.[X]-[PLATFORM] [PYTHON-3.11] ++ cpython-3.12.[X]-[PLATFORM] [PYTHON-3.12] ++ cpython-3.11.[X]-[PLATFORM] [PYTHON-3.11] + + ----- stderr ----- + "); +@@ -119,7 +120,7 @@ fn python_list() { + success: true + exit_code: 0 + ----- stdout ----- +- cpython-3.11.[X]-[PLATFORM] [PYTHON-3.11] ++ cpython-3.11.[X]-[PLATFORM] [PYTHON-3.11] + + ----- stderr ----- + "); +@@ -129,7 +130,8 @@ fn python_list() { + fn python_list_pin() { + let context: TestContext = TestContext::new_with_versions(&["3.11", "3.12"]) + .with_filtered_python_symlinks() +- .with_filtered_python_keys(); ++ .with_filtered_python_keys() ++ .with_collapsed_whitespace(); + + // Pin to a version + uv_snapshot!(context.filters(), context.python_pin().arg("3.12"), @r###" +@@ -146,8 +148,8 @@ fn python_list_pin() { + success: true + exit_code: 0 + ----- stdout ----- +- cpython-3.12.[X]-[PLATFORM] [PYTHON-3.12] +- cpython-3.11.[X]-[PLATFORM] [PYTHON-3.11] ++ cpython-3.12.[X]-[PLATFORM] [PYTHON-3.12] ++ cpython-3.11.[X]-[PLATFORM] [PYTHON-3.11] + + ----- stderr ----- + "); +@@ -157,8 +159,8 @@ fn python_list_pin() { + success: true + exit_code: 0 + ----- stdout ----- +- cpython-3.12.[X]-[PLATFORM] [PYTHON-3.12] +- cpython-3.11.[X]-[PLATFORM] [PYTHON-3.11] ++ cpython-3.12.[X]-[PLATFORM] [PYTHON-3.12] ++ cpython-3.11.[X]-[PLATFORM] [PYTHON-3.11] + + ----- stderr ----- + "); +@@ -171,7 +173,8 @@ fn python_list_venv() { + .with_filtered_python_keys() + .with_filtered_exe_suffix() + .with_filtered_python_names() +- .with_filtered_virtualenv_bin(); ++ .with_filtered_virtualenv_bin() ++ .with_collapsed_whitespace(); + + // Create a virtual environment + uv_snapshot!(context.filters(), context.venv().arg("--python").arg("3.12").arg("-q"), @r###" +@@ -187,8 +190,8 @@ fn python_list_venv() { + success: true + exit_code: 0 + ----- stdout ----- +- cpython-3.12.[X]-[PLATFORM] [PYTHON-3.12] +- cpython-3.11.[X]-[PLATFORM] [PYTHON-3.11] ++ cpython-3.12.[X]-[PLATFORM] [PYTHON-3.12] ++ cpython-3.11.[X]-[PLATFORM] [PYTHON-3.11] + + ----- stderr ----- + "); +@@ -198,8 +201,8 @@ fn python_list_venv() { + success: true + exit_code: 0 + ----- stdout ----- +- cpython-3.12.[X]-[PLATFORM] [PYTHON-3.12] +- cpython-3.11.[X]-[PLATFORM] [PYTHON-3.11] ++ cpython-3.12.[X]-[PLATFORM] [PYTHON-3.12] ++ cpython-3.11.[X]-[PLATFORM] [PYTHON-3.11] + + ----- stderr ----- + "); +@@ -285,7 +288,8 @@ fn python_list_unsupported_version() { + fn python_list_duplicate_path_entries() { + let context: TestContext = TestContext::new_with_versions(&["3.11", "3.12"]) + .with_filtered_python_symlinks() +- .with_filtered_python_keys(); ++ .with_filtered_python_keys() ++ .with_collapsed_whitespace(); + + // Construct a `PATH` with all entries duplicated + let path = std::env::join_paths( +@@ -298,8 +302,8 @@ fn python_list_duplicate_path_entries() { + success: true + exit_code: 0 + ----- stdout ----- +- cpython-3.12.[X]-[PLATFORM] [PYTHON-3.12] +- cpython-3.11.[X]-[PLATFORM] [PYTHON-3.11] ++ cpython-3.12.[X]-[PLATFORM] [PYTHON-3.12] ++ cpython-3.11.[X]-[PLATFORM] [PYTHON-3.11] + + ----- stderr ----- + "); +@@ -320,8 +324,8 @@ fn python_list_duplicate_path_entries() { + success: true + exit_code: 0 + ----- stdout ----- +- cpython-3.12.[X]-[PLATFORM] [PYTHON-3.12] +- cpython-3.11.[X]-[PLATFORM] [PYTHON-3.11] ++ cpython-3.12.[X]-[PLATFORM] [PYTHON-3.12] ++ cpython-3.11.[X]-[PLATFORM] [PYTHON-3.11] + + ----- stderr ----- + "); +@@ -341,8 +345,8 @@ fn python_list_duplicate_path_entries() { + success: true + exit_code: 0 + ----- stdout ----- +- cpython-3.12.[X]-[PLATFORM] [PYTHON-3.12]-link/python3 +- cpython-3.11.[X]-[PLATFORM] [PYTHON-3.11]-link/python3 ++ cpython-3.12.[X]-[PLATFORM] [PYTHON-3.12]-link/python3 ++ cpython-3.11.[X]-[PLATFORM] [PYTHON-3.11]-link/python3 + + ----- stderr ----- + "); diff --git a/dev-python/uv/uv-0.6.13.ebuild b/dev-python/uv/uv-0.6.13.ebuild index fa89cd13ee49..e98d57c5adae 100644 --- a/dev-python/uv/uv-0.6.13.ebuild +++ b/dev-python/uv/uv-0.6.13.ebuild @@ -88,6 +88,11 @@ pkg_setup() { } src_prepare() { + local PATCHES=( + # https://github.com/astral-sh/uv/pull/12851 + "${FILESDIR}/${P}-test-ws.patch" + ) + default # force thin lto, makes build much faster and less memory hungry