-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add dependabot support #2512
Comments
We don't have a lockfile standard here at uv so I think that the |
Fair enough! As a secondary point, it might be useful to work with the dependabot maintainers to allow them to use uv for dependency resolution. We have some repositories which dependabot times out trying to solve, and uv solves pretty much instantaneously. Given they explicitly support poetry (including generating a lock file), there's definitely precedent for it, and the goal of pip compatibility means that this could just be a straight swap in some repositories. |
Do you have a concrete example? Not uv related, but I have a significant improvement to Pip's resolution for complex backtracking cases (https://github.com/notatallshaw/pip/tree/prefer-conflicting-causes), and it would be good to know as many real world cases it solves or not. |
I tried spending a little time on this today and got some feedback from dependabot's CI here https://github.com/dependabot/dependabot-core/actions/runs/9581241755/job/26417616046 One error appears to be easy to fix, there is a check to control that there is an error trying to install a dependency that should fail. The other I have to look into but here is the message we get from uv when dependabot tries to use it as a direct replacement for
|
Made a bit more progress and found that there is an existing issue here to fix what I encountered above #1964, writing it down for future generations. |
The above issue is solved, one step closer! We are now blocked with a tiny header difference issue #5031 which is already merged and will be out with next release, thanks @skshetry . I've mentioned it in another issue but I'm holding from the |
Another alternative could to be parse the compile_command. That is what renovatebot does. |
Dependabot does not support uv yet: astral-sh/uv#2512
Is there any update on this or an estimate on when uv will support dependabot? I can see the issues you mentioned @avilaton are resolved. |
I think the |
Maybe I'm reading it wrong but this issue seems to have evolved a little after it was originally created. |
See #6236 — basically it's not supported yet. I think they're working on it still. Renovate supports this. |
👋 from the GitHub Dependabot team. There's a PR in dependabot-core that aims to help support uv. @zanieb in case you didn't notice the tag there, i'm pinging you here to see if you could take a look :) Thanks! |
Noting this just shipped GA: https://github.blog/changelog/2025-03-13-dependabot-version-updates-now-support-uv-in-general-availability/ |
Hello from the GitHub Dependabot team 👋 I have made some updates to how we handle We have a generated bump PR for the I generated the original Is this expected behaviour? Any feedback on this would be gratefully received. Thank you! |
Thank you for reaching out! I took a look at that pull request (in Dependabot) and it looks better. What uv version was the lockfile generated with originally? We may have added additional filtering of wheels that cannot be selected, e.g., as in #12299 |
On a separate note, I see you're testing against a dependency that is also pinned in the --- a/pyproject.toml
+++ b/pyproject.toml
@@ -5,6 +5,6 @@ description = "Add your description here"
readme = "README.md"
requires-python = ">=3.9"
dependencies = [
- "httpx==0.20",
+ "httpx==0.28.1",
"requests==2.31.0",
] I don't think this is a regular pattern, since that's the point of the |
It looks like somehow the |
We are not intentionally changing it and actually have code to maintain it in case it is inadvertently updated. I'm going to look into what is happening here. Thanks |
It seems like this occurs at https://github.com/dependabot/dependabot-core/blob/59943c098d9a28736a2f3ac2945faf3048e662ed/uv/lib/dependabot/uv/file_updater/lock_file_updater.rb#L166-L170 You don't need to do that. The project metadata needs to be preserved for a correct lock. |
For general semantics, For the Python version, we use |
I've raised a PR to remove this. |
Thanks for the comment @konstin
Can we do something similar to |
Technically, you can use Usually, we also don't download the entire wheels, given PEP 658 or Range Request support for metadata, but for the (rare) indexes that don't support either, we have no option but to download an entire wheel and read the METADATA from it. Both of those caveats should be generally the same for pip/pip-tools and poetry (pip for example has |
I'm not quite sure on whether this is a
rye
or auv
issue, but it would be broadly useful to have dependabot understand rye/uv backed projects as a target for dependabot updates. The current known targets arepip
andpoetry
(which you leave as pip, they just have support for a poetry-style pyproject file).Whether there is some way of tricking dependabot using the
pip
compatibility layer, or if it's better to have bespoke handlers I'm not sure!The text was updated successfully, but these errors were encountered: