Skip to content

feat: Make pywrangler respect uv.sources from pyproject.toml - #234

Merged
hoodmane merged 1 commit into
cloudflare:mainfrom
hoodmane:hoodmane/uv-sources
Aug 28, 2026
Merged

feat: Make pywrangler respect uv.sources from pyproject.toml#234
hoodmane merged 1 commit into
cloudflare:mainfrom
hoodmane:hoodmane/uv-sources

Conversation

@hoodmane

Copy link
Copy Markdown
Contributor

And other settings. By grabbing the requirements from uv compile and then freezing them into a list and installing like that, we are losing information from pyproject.toml. We should have uv do the install from pyproject.toml so it gets it right.

  1. When installing packages for Pyodide, don't use the requirement list we collected, just directly install from pyproject.toml
  2. When installing native packages, use the versions we installed for Pyodide to generate a constraints file but still use pyproject.toml to get the actual requirements.

And other settings. By grabbing the requirements from uv compile and then
freezing them into a list and installing like that, we are losing information
from pyproject.toml. We should have uv do the install from pyproject.toml so it
gets it right.

1. When installing packages for Pyodide, don't use the requirement list we
   collected, just directly install from pyproject.toml
2. When installing native packages, use the versions we installed for Pyodide to
   generate a constraints file but still use pyproject.toml to get the actual
   requirements.

@ryanking13 ryanking13 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice! Looks much nicer than hacking toml file manually, I guess we can close #107 with this.

Comment thread packages/cli/tests/test_resolve_sources.py
@hoodmane
hoodmane merged commit 33e1bdc into cloudflare:main Aug 28, 2026
18 checks passed
@hoodmane
hoodmane deleted the hoodmane/uv-sources branch August 28, 2026 18:22
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.

2 participants