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

Don't recommend --prerelease=allow during build requirement resolution errors #8192

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

charliermarsh
Copy link
Member

Summary

Closes #3686.

@charliermarsh charliermarsh changed the title Don't recommend --prerelease=allow for source dist builds Don't recommend --prerelease=allow for source dist builds Oct 15, 2024
@charliermarsh charliermarsh added bug Something isn't working error messages Messaging when something goes wrong labels Oct 15, 2024
@zanieb
Copy link
Member

zanieb commented Oct 15, 2024

I don't entirely follow the motivation in the issue. Can you explain a bit?

@charliermarsh
Copy link
Member Author

We don't pass the --prerelease flag to source distribution builds. Recommending --prerelease=allow has no effect.

@zanieb
Copy link
Member

zanieb commented Oct 15, 2024

Like.. all source distribution builds including those from the registry that are prereleases? Or non-registry ones like local directories or Git repositories?

@charliermarsh
Copy link
Member Author

I don't fully follow the distinction you're referencing but we never pass the --prerelease flag to source distribution builds. Specifically, when we resolve build-system.requires, we don't propagate --prerelease, --resolution, or --no-deps. That applies to all source distribution builds (but only to the build-system.requires, like requires = ["setuptools>=40.8.0"]).

@charliermarsh
Copy link
Member Author

In the linked issue, we failed to resolve requires = ["setuptools>=40.8.0"] when building some package. We then recommended passing --prerelease=allow, but doing so has no effect.

@charliermarsh
Copy link
Member Author

We removed that propagation in #1607 if you want to see a few linked issues. I think it's unclear whether --prerelease should be propagated (--resolution definitely should not, I think that one is much clearer), but it's reasonable for it not to be IMO.

@charliermarsh charliermarsh merged commit c683191 into main Oct 15, 2024
60 of 61 checks passed
@charliermarsh charliermarsh deleted the charlie/pre-error branch October 15, 2024 01:04
@zanieb
Copy link
Member

zanieb commented Oct 15, 2024

Ah thanks for clarifying. I somehow missed that we're talking about an error when resolving build requirements. Hence my extreme confusion and dumb questions. This change makes a ton of sense. Can you rephrase the title to make it a bit more obvious? Like...

Don't recommend --prerelease=allow during build requirement resolution errors

@charliermarsh
Copy link
Member Author

Yeah for sure.

@charliermarsh charliermarsh changed the title Don't recommend --prerelease=allow for source dist builds Don't recommend --prerelease=allow during build requirement resolution errors Oct 15, 2024
@charliermarsh
Copy link
Member Author

Thank you!

tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Oct 16, 2024
This MR contains the following updates:

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

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.4.22`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#0422)

[Compare Source](astral-sh/uv@0.4.21...0.4.22)

##### Enhancements

-   Respect `[tool.uv.sources]` in build requirements ([#&#8203;7172](astral-sh/uv#7172))

##### Preview features

-   Add a dedicated `uv publish` error message for missing usernames ([#&#8203;8045](astral-sh/uv#8045))
-   Support interactive input in `uv publish` ([#&#8203;8158](astral-sh/uv#8158))
-   Use raw filenames in `uv publish` ([#&#8203;8204](astral-sh/uv#8204))

##### Performance

-   Reuse the result of `which git` ([#&#8203;8224](astral-sh/uv#8224))

##### Bug fixes

-   Avoid environment check optimization for `uv pip install --exact` ([#&#8203;8219](astral-sh/uv#8219))
-   Do not use free-threaded interpreters without a free-threaded request ([#&#8203;8191](astral-sh/uv#8191))
-   Don't recommend `--prerelease=allow` during build requirement resolution errors ([#&#8203;8192](astral-sh/uv#8192))
-   Prefer optimized builds for free-threaded Python downloads ([#&#8203;8196](astral-sh/uv#8196))
-   Retain old `python-build-standalone` releases ([#&#8203;8216](astral-sh/uv#8216))
-   Run `uv build` builds in the source distribution bucket ([#&#8203;8220](astral-sh/uv#8220))

</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 error messages Messaging when something goes wrong
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hint to "try: --prerelease=allow" when I already am
2 participants