Skip to content

Conversation

zanieb
Copy link
Member

@zanieb zanieb commented Mar 21, 2025

Requires #12380
Extends new tests from #12374

Is waiting for dependent PRs to merge; for early review see a27c93e

@zanieb zanieb added the testing Internal testing of behavior label Mar 21, 2025
@zanieb zanieb changed the base branch from main to zb/python-list-test March 21, 2025 18:56
@zanieb zanieb changed the base branch from zb/python-list-test to zb/list-tests March 21, 2025 18:56
let context: TestContext = TestContext::new_with_versions(&[]).with_filtered_python_keys();

// We show all interpreters
uv_snapshot!(context.filters(), context.python_list().env_remove("UV_PYTHON_DOWNLOADS"), @r"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might not actually be cross-platform. Testing in CI.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not, so we'll filter to a subset of Python versions on top of #12375

@zanieb
Copy link
Member Author

zanieb commented Mar 21, 2025

Interesting, both Linux and Windows have a couple 3.7 versions

Snapshot: python_list_downloads
Source: crates/uv/tests/it/python_list.rs:143
────────────────────────────────────────────────────────────────────────────────
Expression: snapshot
────────────────────────────────────────────────────────────────────────────────
-old snapshot
+new results
────────────┬───────────────────────────────────────────────────────────────────
    8     8 │ cpython-3.11.11-[PLATFORM]                  <download available>
    9     9 │ cpython-3.10.16-[PLATFORM]                  <download available>
   10    10 │ cpython-3.9.21-[PLATFORM]                   <download available>
   11    11 │ cpython-3.8.20-[PLATFORM]                   <download available>
         12 │+cpython-3.7.9-[PLATFORM]                    <download available>
   12    13 │ pypy-3.11.11-[PLATFORM]                     <download available>
   13    14 │ pypy-3.10.16-[PLATFORM]                     <download available>
   14    15 │ pypy-3.9.19-[PLATFORM]                      <download available>
   15    16 │ pypy-3.8.16-[PLATFORM]                      <download available>
         17 │+pypy-3.7.13-[PLATFORM]                      <download available>
   16    18 │ 
   17    19 │ ----- stderr -----
────────────┴───────────────────────────────────────────────────────────────────

@zanieb zanieb force-pushed the zb/list-tests-downloads branch 2 times, most recently from e403ad1 to a27c93e Compare March 21, 2025 22:26
Base automatically changed from zb/list-tests to main March 23, 2025 02:57
zanieb added a commit that referenced this pull request Mar 23, 2025
Allows `uv python list <request>` to filter the installed list. I often
want this and it's not hard to add.

I tested the remote download filtering locally (#12381 is needed for
snapshot tests)

```
❯ cargo run -q -- python list --all-versions 3.13
cpython-3.13.2-macos-aarch64-none    <download available>
cpython-3.13.1-macos-aarch64-none    /opt/homebrew/opt/[email protected]/bin/python3.13 -> ../Frameworks/Python.framework/Versions/3.13/bin/python3.13
cpython-3.13.1-macos-aarch64-none    <download available>
cpython-3.13.0-macos-aarch64-none    /Users/zb/.local/share/uv/python/cpython-3.13.0-macos-aarch64-none/bin/python3.13
❯ cargo run -q -- python list --all-versions 3.13 --only-installed
cpython-3.13.1-macos-aarch64-none    /opt/homebrew/opt/[email protected]/bin/python3.13 -> ../Frameworks/Python.framework/Versions/3.13/bin/python3.13
cpython-3.13.0-macos-aarch64-none    /Users/zb/.local/share/uv/python/cpython-3.13.0-macos-aarch64-none/bin/python3.13
```
@zanieb zanieb force-pushed the zb/list-tests-downloads branch from a27c93e to 6cda803 Compare April 21, 2025 19:43
@zanieb zanieb force-pushed the zb/list-tests-downloads branch from 6cda803 to d386b41 Compare April 21, 2025 19:46
@zanieb zanieb force-pushed the zb/list-tests-downloads branch from d386b41 to 8800d5b Compare April 21, 2025 22:16
@zanieb zanieb marked this pull request as ready for review April 21, 2025 22:16
@zanieb zanieb enabled auto-merge (squash) April 21, 2025 22:16
@zanieb zanieb merged commit b594c2d into main Apr 21, 2025
75 checks passed
@zanieb zanieb deleted the zb/list-tests-downloads branch April 21, 2025 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Internal testing of behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants