Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark sync::sync_dry_run test as requiring python-managed #11415

Merged
merged 1 commit into from
Feb 11, 2025

Conversation

mgorny
Copy link
Contributor

@mgorny mgorny commented Feb 11, 2025

Summary

Mark sync::sync_dry_run as requiring python-managed, as it fails with system Python executables due to extraneous Python packages being installed:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Snapshot Summary ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Snapshot: sync_dry_run
Source: crates/uv/tests/it/sync.rs:6574
────────────────────────────────────────────────────────────────────────────────
Expression: snapshot
────────────────────────────────────────────────────────────────────────────────
-old snapshot
+new results
────────────┬───────────────────────────────────────────────────────────────────
    5     5 │ Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
    6     6 │ Would create virtual environment at: .venv
    7     7 │ Resolved 2 packages in [TIME]
    8     8 │ Would create lockfile at: uv.lock
    9       │-Would download 1 package
   10       │-Would install 1 package
   11       │- + iniconfig==2.0.0
          9 │+Would uninstall 1310 packages
         10 │+ - a2wsgi==1.10.8
[…]

Test Plan

cargo test --no-default-features --features=python,pypi,git

Mark `sync::sync_dry_run` as requiring `python-managed`, as it fails
with system Python executables due to extraneous Python packages being
installed:

```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Snapshot Summary ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Snapshot: sync_dry_run
Source: crates/uv/tests/it/sync.rs:6574
────────────────────────────────────────────────────────────────────────────────
Expression: snapshot
────────────────────────────────────────────────────────────────────────────────
-old snapshot
+new results
────────────┬───────────────────────────────────────────────────────────────────
    5     5 │ Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
    6     6 │ Would create virtual environment at: .venv
    7     7 │ Resolved 2 packages in [TIME]
    8     8 │ Would create lockfile at: uv.lock
    9       │-Would download 1 package
   10       │-Would install 1 package
   11       │- + iniconfig==2.0.0
          9 │+Would uninstall 1310 packages
         10 │+ - a2wsgi==1.10.8
[…]
```
@mgorny
Copy link
Contributor Author

mgorny commented Feb 11, 2025

Looks like macOS failed due to a flaky test.

@konstin konstin added the internal A refactor or improvement that is not user-facing label Feb 11, 2025
@konstin konstin merged commit 0735be2 into astral-sh:main Feb 11, 2025
73 checks passed
@mgorny mgorny deleted the dry-run-mark branch February 11, 2025 09:17
@mgorny
Copy link
Contributor Author

mgorny commented Feb 11, 2025

Thanks!

@zanieb
Copy link
Member

zanieb commented Feb 11, 2025

This seems wrong... cc @charliermarsh

Related #11376

@zanieb
Copy link
Member

zanieb commented Feb 11, 2025

It looks like we say

Would replace existing virtual environment at: .venv

then perform the sync dry-run against the interpreter's environment instead of an empty one?

@mgorny
Copy link
Contributor Author

mgorny commented Feb 11, 2025

Oops, so I've found a serious bug? :-)

@charliermarsh
Copy link
Member

Haha, well it's just dry-run reporting (doesn't modify the environment at all), so not serious, but definitely wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal A refactor or improvement that is not user-facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants