Skip to content

feat(poetry): supersede pep621#37458

Merged
rarkins merged 1 commit intomainfrom
feat/poetry/supersede-pep621
Aug 16, 2025
Merged

feat(poetry): supersede pep621#37458
rarkins merged 1 commit intomainfrom
feat/poetry/supersede-pep621

Conversation

@viceice
Copy link
Copy Markdown
Member

@viceice viceice commented Aug 12, 2025

Changes

Supercede extractions from pep621 manager by poetry.
project.dependencies and project.optional-dependencies are no longer extracted by pep621.

Context

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

@viceice viceice requested a review from rarkins August 12, 2025 15:42
@rarkins rarkins added this pull request to the merge queue Aug 16, 2025
Merged via the queue into main with commit f4e3a9c Aug 16, 2025
40 checks passed
@rarkins rarkins deleted the feat/poetry/supersede-pep621 branch August 16, 2025 09:07
@renovate-release
Copy link
Copy Markdown

🎉 This PR is included in version 41.75.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@charlie-ang-collibra
Copy link
Copy Markdown

Hi @viceice ! If I may, I wanted to ask a question about this change. We currently use uv with renovatebot and do have various optional dependency-groups. After upgrading to this version, lock maintenance on uv.lock is no longer happening, although renovatebot continues to update the main dependencies section in pyproject.toml. PRs that were opened against dependencies in the groups were also auto-closed.

Is this the intended effect of this on uv and uv.lock? If it is and there is a migration guide, a quick link would be very appreciated! Thank you.

@jkkitakita
Copy link
Copy Markdown

@viceice
me too. uv project is recognized as poetry even though there is no poetry.lock and there is a uv.lock.
I would love to have a guide on how to fix!

@viceice
Copy link
Copy Markdown
Member Author

viceice commented Aug 20, 2025

will look at it as fast as possible

@jonadaly
Copy link
Copy Markdown
Contributor

As a temporary workaround, it looks like disabling the poetry manager entirely does solve this problem:

"poetry": {
    "enabled": false
  }

@charlie-ang-collibra
Copy link
Copy Markdown

charlie-ang-collibra commented Aug 20, 2025

As a temporary workaround, it looks like disabling the poetry manager entirely does solve this problem:

"poetry": {
    "enabled": false
  }

Much appreciated, @viceice , @jonadaly ! Yes, we applied the enabled: false solution yesterday in the repo config and it worked liked a charm!

Before that, I was looking at supercedes.ts and realized that pep621's extractPackageFile function never populates the lockFiles attribute. Therefore, the logic in processSupersedesManagers will always make poetry win since it no longer (a) needs to be any poetry elements in pyproject.toml nor (b) checks for a presence of a poetry.lock file. It was sufficient that pep621 did not populate the lockFiles attribute for it to be overridden by poetry. I didn't look into how the bun / npm scenario was different.

Once I saw that, I arrived at the same conclusion @jonadaly did. But it's very nice to hear that it's a valid solution.

@viceice
Copy link
Copy Markdown
Member Author

viceice commented Aug 20, 2025

woking on a fix now, thanks @charlie-ang-collibra for the good analysation 🤗

@viceice
Copy link
Copy Markdown
Member Author

viceice commented Aug 20, 2025

@viceice
Copy link
Copy Markdown
Member Author

viceice commented Aug 21, 2025

it's not yet deployed to the hosted app

ducthinh993 pushed a commit to ducthinh993/renovate that referenced this pull request Sep 11, 2025
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Oct 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Suppress/skip pep621 manager detection of poetry 2.0 projects

7 participants