Skip to content

Edit pyproject.toml file's tool.uv.sources option if it is a uv-managed project#81

Merged
jensens merged 21 commits intomxstack:mainfrom
erral:uv-managed
Apr 1, 2026
Merged

Edit pyproject.toml file's tool.uv.sources option if it is a uv-managed project#81
jensens merged 21 commits intomxstack:mainfrom
erral:uv-managed

Conversation

@erral
Copy link
Copy Markdown
Contributor

@erral erral commented Mar 27, 2026

For uv-managed projects (those with [tool.uv] managed=true in pyproject.toml) write in the [tool.uv.sources] option of the pyproject.toml the paths to the downloaded packages.

See erral/mxdev-uv-pyproject-updater#1 and plone/cookieplone-templates#352 for reference

Copy link
Copy Markdown
Contributor

@stevepiercy stevepiercy left a comment

Choose a reason for hiding this comment

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

Fixed heading

Co-authored-by: Steve Piercy <web@stevepiercy.com>
Copy link
Copy Markdown
Member

@jensens jensens left a comment

Choose a reason for hiding this comment

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

Feature concept is sound but needs rework in a few areas before merge. See inline comments.

@erral
Copy link
Copy Markdown
Contributor Author

erral commented Apr 1, 2026

Thank you both for the review, I have updated the code to match your review notes.

@erral
Copy link
Copy Markdown
Contributor Author

erral commented Apr 1, 2026

Gemini suggested doing the if typing.TYPE_CHECKING thing for lint phase to pass: https://docs.python.org/3/library/typing.html#typing.TYPE_CHECKING

Copy link
Copy Markdown
Member

@jensens jensens left a comment

Choose a reason for hiding this comment

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

Most prior issues addressed well. One critical ordering bug remains, plus a few smaller items.

Copy link
Copy Markdown
Member

@jensens jensens left a comment

Choose a reason for hiding this comment

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

Looks good. All critical issues addressed. Minor simplification opportunities remain (the TYPE_CHECKING dance at runtime, the triple-layer managed check, bare except on tomllib) — we can clean those up in a follow-up.

@jensens jensens merged commit b8c986e into mxstack:main Apr 1, 2026
17 checks passed
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.

3 participants