Skip to content

Commit e500216

Browse files
authored
Use Packse for the Android lock test (#20602)
`lock_android` fails because PyPI no longer serves any `deltachat-rpc-server` distributions before the test's `2025-06-01` cutoff. Serve an equivalent cross-platform wheel set from Packse so the test continues to verify that only Android wheels are retained in the lockfile, without depending on mutable PyPI state. Keep the locked and offline checks on the same local index. Closes astral-sh#352. Co-authored-by: zaniebot <[email protected]>
1 parent 4cd7a98 commit e500216

2 files changed

Lines changed: 34 additions & 7 deletions

File tree

‎crates/uv/tests/lock/lock.rs‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36369,6 +36369,7 @@ async fn lock_circular_path_dependency_explicit_index() -> Result<()> {
3636936369
#[cfg(feature = "test-universal")]
3637036370
#[test]
3637136371
fn lock_android() -> Result<()> {
36372+
let server = PackseServer::new("wheels/android.toml");
3637236373
let context = uv_test::test_context!("3.12").with_exclude_newer("2025-06-01T00:00:00Z");
3637336374

3637436375
let pyproject_toml = context.temp_dir.child("pyproject.toml");
@@ -36387,7 +36388,7 @@ fn lock_android() -> Result<()> {
3638736388
"#,
3638836389
)?;
3638936390

36390-
uv_snapshot!(context.filters(), context.lock(), @"
36391+
uv_snapshot!(context.filters(), context.lock().arg("--index-url").arg(server.index_url()), @"
3639136392
success: true
3639236393
exit_code: 0
3639336394
----- stdout -----
@@ -36419,11 +36420,11 @@ fn lock_android() -> Result<()> {
3641936420
[[package]]
3642036421
name = "deltachat-rpc-server"
3642136422
version = "1.159.5"
36422-
source = { registry = "https://pypi.org/simple" }
36423-
sdist = { url = "https://files.pythonhosted.org/packages/c4/59/fd0dee6b1c950ba5c93e02ed6692990bffd6e843710f0c1b547de661534b/deltachat_rpc_server-1.159.5.tar.gz", hash = "sha256:7e015f9f8a8400133648971049032851c560729c6e9807f865a3f026b74b13a0", size = 1471, upload-time = "2025-05-14T17:35:33.428Z" }
36423+
source = { registry = "http://[LOCALHOST]/simple/" }
36424+
sdist = { url = "http://[LOCALHOST]/files/deltachat_rpc_server-1.159.5.tar.gz", hash = "sha256:b923352b2b7253d068cdba7d1d23f36bc82a8dc7eb7f0e3860a1379324c62c32", upload-time = "2024-03-24T00:00:00Z" }
3642436425
wheels = [
36425-
{ url = "https://files.pythonhosted.org/packages/c0/47/97e67319025afedb8cc5fc4e8e3779ef407836dbe2c111eeb403a7a83e8c/deltachat_rpc_server-1.159.5-py3-none-android_21_arm64_v8a.whl", hash = "sha256:3fb08568e12984cb2fc85409d6bc5bfa5b965b834c5d45fecd2f63ad3893396c", size = 10495646, upload-time = "2025-05-14T17:35:07.189Z" },
36426-
{ url = "https://files.pythonhosted.org/packages/1d/93/d470afef50ddd4b101d78401f8aaf5adbaa7c27a984a151017bc3c449171/deltachat_rpc_server-1.159.5-py3-none-android_21_armeabi_v7a.whl", hash = "sha256:560178de3f61dc9ef1c69b7d9bd238b45b07b98331d85d074d8652babac9de49", size = 8821626, upload-time = "2025-05-14T17:35:09.645Z" },
36426+
{ url = "http://[LOCALHOST]/files/deltachat_rpc_server-1.159.5-py3-none-android_21_arm64_v8a.whl", hash = "sha256:a09292118bd3cbe9133c410c8228399a65467f1bcacbfbd35ffa27a2c1e8b3c3", upload-time = "2024-03-24T00:00:00Z" },
36427+
{ url = "http://[LOCALHOST]/files/deltachat_rpc_server-1.159.5-py3-none-android_21_armeabi_v7a.whl", hash = "sha256:fcedd34dfec4397a5f516266e7d38237b01133e2fbfe29f08140d04cf8ea5b64", upload-time = "2024-03-24T00:00:00Z" },
3642736428
]
3642836429

3642936430
[[package]]
@@ -36441,7 +36442,7 @@ fn lock_android() -> Result<()> {
3644136442
});
3644236443

3644336444
// Re-run with `--locked`.
36444-
uv_snapshot!(context.filters(), context.lock().arg("--locked"), @"
36445+
uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--index-url").arg(server.index_url()), @"
3644536446
success: true
3644636447
exit_code: 0
3644736448
----- stdout -----
@@ -36452,7 +36453,7 @@ fn lock_android() -> Result<()> {
3645236453

3645336454
// Re-run with `--offline`. We shouldn't need a network connection to validate an
3645436455
// already-correct lockfile with immutable metadata.
36455-
uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache"), @"
36456+
uv_snapshot!(context.filters(), context.lock().arg("--locked").arg("--offline").arg("--no-cache").arg("--index-url").arg(server.index_url()), @"
3645636457
success: true
3645736458
exit_code: 0
3645836459
----- stdout -----

‎test/scenarios/wheels/android.toml‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name = "android"
2+
description = "Android wheels are available alongside wheels for other platforms."
3+
4+
[root]
5+
requires = ["deltachat-rpc-server"]
6+
7+
[expected]
8+
satisfiable = true
9+
10+
[packages.deltachat-rpc-server.versions."1.159.5"]
11+
wheel_tags = [
12+
"py3-none-android_21_arm64_v8a",
13+
"py3-none-android_21_armeabi_v7a",
14+
"py3-none-linux_armv6l",
15+
"py3-none-linux_armv7l.manylinux_2_17_armv7l.manylinux2014_armv7l.musllinux_1_1_armv7l",
16+
"py3-none-macosx_10_7_x86_64",
17+
"py3-none-macosx_11_0_arm64",
18+
"py3-none-manylinux_2_12_i686.manylinux2010_i686.musllinux_1_1_i686",
19+
"py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64",
20+
"py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.musllinux_1_1_x86_64",
21+
"py3-none-win32",
22+
"py3-none-win_amd64",
23+
]
24+
25+
[testgen]
26+
disable = true

0 commit comments

Comments
 (0)