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

feat(pip-compile): support uv pip compile #33952

Merged
merged 3 commits into from
Feb 3, 2025

Conversation

maxbrunet
Copy link
Contributor

Changes

This adds the basics to support uv pip compile inside the pip-compile manager.

Context

Closes #30909

Relevant docs:

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@maxbrunet maxbrunet force-pushed the feat/pip-compile/uv-pip-compile branch from c406d0e to e586242 Compare January 30, 2025 22:05
@maxbrunet maxbrunet force-pushed the feat/pip-compile/uv-pip-compile branch from e586242 to 9a7f496 Compare January 30, 2025 22:10
@maxbrunet maxbrunet requested a review from rarkins February 3, 2025 12:10
@rarkins rarkins added this pull request to the merge queue Feb 3, 2025
Merged via the queue into renovatebot:main with commit d0916b1 Feb 3, 2025
39 checks passed
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 39.158.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Comment on lines +248 to +252
// uv's headers do not include the Python version
// https://github.com/astral-sh/uv/issues/3588
if (commandType === 'uv') {
return;
}
Copy link

Choose a reason for hiding this comment

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

Hm, we don't include the host Python version but you can solve for a Python version.

❯ echo "anyio" | uv pip compile - --python-version 3.11
Resolved 4 packages in 94ms
# This file was autogenerated by uv via the following command:
#    uv pip compile - --python-version 3.11
anyio==4.8.0
idna==3.10
    # via anyio
sniffio==1.3.1
    # via anyio
typing-extensions==4.12.2
    # via anyio

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Follow up #34029 👍

@zanieb
Copy link

zanieb commented Feb 3, 2025

Should https://github.com/renovatebot/renovate/blob/699f28360b5af4a60744d15a9736e9f0b344394d/lib/modules/manager/pip-compile/readme.md#assumption-of-header-with-a-command be updated or is the current documentation sufficient?

@zanieb
Copy link

zanieb commented Feb 3, 2025

Documentation pull request for uv astral-sh/uv#11204

Thanks for adding support!

@maxbrunet
Copy link
Contributor Author

Should 699f283/lib/modules/manager/pip-compile/readme.md#assumption-of-header-with-a-command be updated or is the current documentation sufficient?

Follow up #34030 👍

@@ -28,6 +28,18 @@ jest.mock('../../../util/host-rules', () => mockDeep());
jest.mock('../../../util/http');
jest.mock('../../datasource', () => mockDeep());

const requirementsWithUv = `# This file was autogenerated by uv via the following command:
Copy link
Member

Choose a reason for hiding this comment

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

please move to test if only used once next time and use codeBlock template helper

Comment on lines +143 to +149
if (command === 'pip-compile') {
commandType = 'pip-compile';
} else if (command === 'uv') {
commandType = 'uv';
} else {
commandType = 'custom';
}
Copy link
Member

Choose a reason for hiding this comment

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

use switch case next time

SuperSandro2000 added a commit to SuperSandro2000/renovate that referenced this pull request Feb 5, 2025
* upstream/main: (27 commits)
  chore(deps): update python:3.13 docker digest to 7be9b75 (renovatebot#34045)
  chore(deps): update ghcr.io/containerbase/devcontainer docker tag to v13.7.7 (renovatebot#34043)
  docs(gitea): fix `gitUrl` support (renovatebot#34038)
  feat(npm): Support for new option `replacementApproach` (renovatebot#34018)
  chore(deps): lock file maintenance (renovatebot#33998)
  chore(deps): update sigstore/cosign-installer action to v3.8.0 (renovatebot#34034)
  docs(managers/pip-compile): update list of source files and managers (renovatebot#34030)
  chore(deps): update linters to v8.22.0 (renovatebot#33880)
  fix(gitea): use endpoint for pr cache pagination (renovatebot#34022)
  chore(deps): update otel/opentelemetry-collector-contrib docker tag to v0.119.0 (renovatebot#34032)
  feat(gradle): add support for gradle repository content descriptors (renovatebot#33692)
  feat(manager): add elixir as a mise core tooling (renovatebot#34025)
  chore(deps): update python:3.13 docker digest to d59d263 (renovatebot#34026)
  chore(deps): update ghcr.io/containerbase/devcontainer docker tag to v13.7.6 (renovatebot#34021)
  fix(gitea): allow overriding platform version (renovatebot#34019)
  chore(deps): update dependency @types/lodash to v4.17.15 (renovatebot#34020)
  fix(manager/terragrunt): Update terragrunt packageName (renovatebot#33810)
  feat(pip-compile): support `uv pip compile` (renovatebot#33952)
  fix(deps): update dependency mkdocs-material to v9.6.2 (renovatebot#34010)
  chore(label-actions): improve logs, pr closing (renovatebot#33995)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support uv pip compile on uv manager
5 participants