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

Include Git member information when getting metadata from cache #9388

Merged
merged 4 commits into from
Dec 3, 2024

Conversation

ericmarkmartin
Copy link
Contributor

@ericmarkmartin ericmarkmartin commented Nov 23, 2024

Summary

Include the git_member when fetching metadata from cache.

h/t to @PhilipVinc for the suggested fix

Resolves #8887

Test Plan

Pending

@ericmarkmartin
Copy link
Contributor Author

ericmarkmartin commented Nov 23, 2024

It looks like some of the failing tests are the "too many requests" thing I alluded to in my comment on the issue

@charliermarsh
Copy link
Member

Yeah I think something is up with that index. I should look into removing our dependency on it.

Copy link
Member

@charliermarsh charliermarsh left a comment

Choose a reason for hiding this comment

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

This seems right, but is there a way to test it?

@charliermarsh charliermarsh added the bug Something isn't working label Nov 24, 2024
@ericmarkmartin
Copy link
Contributor Author

This seems right, but is there a way to test it?

Could we set up a packse like the example given in the issue (see https://github.com/PhilipVinc/uvtest/tree/dab673b4ad5c6f1335c491baf49ad4965562e876)?

Also, I generally am pretty clueless about uv's testing story (I know it's snapshot based, but that's about it) but would be eager to learn by writing some tests here

@zanieb
Copy link
Member

zanieb commented Nov 25, 2024

If it would help we could add a repository in our test org, e.g. https://github.com/astral-test/uv-submodule-pypackage

I'm not sure I understand the issue here though.

@ericmarkmartin
Copy link
Contributor Author

If it would help we could add a repository in our test org, e.g. https://github.com/astral-test/uv-submodule-pypackage

That could be helpful. I take it that'd be easier than getting packse to serve git repos? One maybe relevant question here is whether we can use git+ with file-scheme urls?

@zanieb
Copy link
Member

zanieb commented Nov 26, 2024

I take it that'd be easier than getting packse to serve git repos?

Yeah this would probably be a pain.

One maybe relevant question here is whether we can use git+ with file-scheme urls?

I don't quite follow, perhaps you should tell me what a test case would look like given a uv binary and I can help construct it? Perhaps as an answer to your question, a test could just clone a repository to a temporary directory then pass that path to uv?

@ericmarkmartin
Copy link
Contributor Author

ericmarkmartin commented Nov 26, 2024

Perhaps as an answer to your question, a test could just clone a repository to a temporary directory then pass that path to uv?

For sure, I just wasn't at my computer earlier. I just confirmed that using git+ with file:// urls works, though unfortunately testing this with @PhilpVinc's test repository (see linked issue) had the conflicting URL issue reoccur 😞

@konstin
Copy link
Member

konstin commented Nov 26, 2024

If you need inspiration for tests, there are transitive_dep_in_git_workspace_no_root and transitive_dep_in_git_workspace_with_root from previous bug fixes in the area

@charliermarsh
Copy link
Member

I'd like to get this merged today so we can release it. I'll add a test if needed.

@ericmarkmartin
Copy link
Contributor Author

ericmarkmartin commented Dec 2, 2024 via email

@charliermarsh
Copy link
Member

@ericmarkmartin -- No problem at all!

@charliermarsh charliermarsh enabled auto-merge (squash) December 3, 2024 04:52
@charliermarsh charliermarsh changed the title include git_member when getting metadata from cache Include Git member information when getting metadata from cache Dec 3, 2024
@charliermarsh charliermarsh enabled auto-merge (squash) December 3, 2024 04:53
@charliermarsh charliermarsh merged commit 16ca0c3 into astral-sh:main Dec 3, 2024
64 checks passed
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Dec 5, 2024
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [astral-sh/uv](https://github.com/astral-sh/uv) | patch | `0.5.5` -> `0.5.6` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>astral-sh/uv (astral-sh/uv)</summary>

### [`v0.5.6`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#056)

[Compare Source](astral-sh/uv@0.5.5...0.5.6)

##### Enhancements

-   Add `--dry-run` to `uv pip uninstall` ([#&#8203;9557](astral-sh/uv#9557))
-   Allow `--constraints` and `--overrides` in `uv tool install` ([#&#8203;9547](astral-sh/uv#9547))
-   Display removed Python executables on uninstall ([#&#8203;9459](astral-sh/uv#9459))
-   Warn when keyring has no password for `uv publish` ([#&#8203;8827](astral-sh/uv#8827))
-   Add suggested action when `.python-version` pin is incompatible with the project ([#&#8203;9590](astral-sh/uv#9590))
-   Improve error messages for mismatches in `tool.uv.sources` ([#&#8203;9482](astral-sh/uv#9482))
-   Use constraints in trace rather than irrelevant `requires-python` ([#&#8203;9529](astral-sh/uv#9529))

##### Preview features

-   Add `uv python install --default` ([#&#8203;8650](astral-sh/uv#8650))
-   Fix Python executable installation when multiple patch versions are requested ([#&#8203;9607](astral-sh/uv#9607))
-   Build backend: Revamp `include` / `exclude` ([#&#8203;9525](astral-sh/uv#9525))
-   Build backend: Add fast path  ([#&#8203;9556](astral-sh/uv#9556))
-   Build backend: Add functions to collect file list ([#&#8203;9602](astral-sh/uv#9602))
-   Build backend: Default excludes ([#&#8203;9552](astral-sh/uv#9552))
-   Build backend: Refactoring before list ([#&#8203;9558](astral-sh/uv#9558))
-   Build backend: Warn when visiting over 10k files  ([#&#8203;9523](astral-sh/uv#9523))

##### Configuration

-   Make `check-url` available in configuration files ([#&#8203;9032](astral-sh/uv#9032))

##### Performance

-   Avoid adding non-extra package with extra dependencies ([#&#8203;9540](astral-sh/uv#9540))
-   Avoid cloning `String` in marker evaluation ([#&#8203;9598](astral-sh/uv#9598))

##### Rust API

-   `uv-pep508`: Add more methods for simplifying `extra`-related expressions ([#&#8203;9469](astral-sh/uv#9469))

##### Bug fixes

-   Allow `file:` URLs to include package names ([#&#8203;9493](astral-sh/uv#9493))
-   Avoid using IDs across PubGrub states ([#&#8203;9538](astral-sh/uv#9538))
-   Consistently enforce requested-vs.-built metadata when retrieving wheels ([#&#8203;9484](astral-sh/uv#9484))
-   Do not show empty version specifier in `uv tool list` ([#&#8203;9605](astral-sh/uv#9605))
-   Include Git member information when getting metadata from cache ([#&#8203;9388](astral-sh/uv#9388))
-   Include base installation directory in uv run PATH ([#&#8203;9585](astral-sh/uv#9585))
-   Insert backslash when appending to system drive ([#&#8203;9488](astral-sh/uv#9488))
-   Normalize paths when lowering Git dependencies ([#&#8203;9595](astral-sh/uv#9595))
-   Omit origin when comparing requirements ([#&#8203;9570](astral-sh/uv#9570))
-   Override `manylinux_compatible` with `--python-platform` ([#&#8203;9526](astral-sh/uv#9526))
-   Pass extra when evaluating lockfile markers ([#&#8203;9539](astral-sh/uv#9539))
-   Propagate markers for recursive extras in resolver ([#&#8203;9509](astral-sh/uv#9509))
-   Respect path dependencies within Git dependencies ([#&#8203;9594](astral-sh/uv#9594))
-   Support recursive extras with marker in `pip compile -r pyproject.toml` ([#&#8203;9535](astral-sh/uv#9535))
-   Don't emit unpinned warning for proxy packages ([#&#8203;9497](astral-sh/uv#9497))
-   Fix `--refresh-package` flag mentioned as `--refresh-dependency` ([#&#8203;9486](astral-sh/uv#9486))
-   Handle Windows AV/EDR file locks during script installations ([#&#8203;9543](astral-sh/uv#9543))
-   Re-enable conflicting extra/group tests and fix regression from [#&#8203;9540](astral-sh/uv#9540) ([#&#8203;9582](astral-sh/uv#9582))

##### Documentation

-   Add missing word to docs for `run.md` ([#&#8203;9527](astral-sh/uv#9527))
-   Add policies reference section and license document ([#&#8203;9367](astral-sh/uv#9367))
-   Fix typo in entry point docs ([#&#8203;9491](astral-sh/uv#9491))
-   Fix up version in prior uninstall instructions ([#&#8203;9485](astral-sh/uv#9485))
-   Mention `uv pip` behavior in build system note ([#&#8203;9586](astral-sh/uv#9586))
-   Update build failures document ([#&#8203;9584](astral-sh/uv#9584))
-   Correct wording for multiple sources section ([#&#8203;9504](astral-sh/uv#9504))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

uv add workspace fails misteriously from git but not locally
4 participants