-
Notifications
You must be signed in to change notification settings - Fork 941
migration from poetry to uv #8249
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
base: master
Are you sure you want to change the base?
Conversation
a75084e
to
d041488
Compare
pending changes:
|
What are the benefit of uv over poetry? |
It's much faster (5-10 seconds compared to minutes using poetry). While that doesn't sound too different, it means that we don't create long lived venvs that may drift from the metadata, causing fewer "it worked on my machine" kind of errors. It can also be used as a shebang, automatically wrapping for example a plugin, downloading dependencies on first invocation, creating the venv and only then passing control to python. This means we can make plugins self-contained and single file if we wanted to. The speed, which unlocks all of these use cases, is done via caching, and interesting speedup ideas, that are quite fun to read up on. And finally, you don't need a system-wide python installation, since uv can also download and manage python versions (prevents you from accidentally polluting the system python and potentially break your OS). |
Great initiative @king-11 , I had a branch with some initial steps, but you are much further along, so I'd rather help you than double-tracking |
Thanks @cdecker i will get the last few things in, just raised a draft PR given I saw some interest around it and wanted to have a pre-ready change look available. |
@cdecker do you have any suggestions I am currently encountering an issue where running tests shows After these changes I am setting things up as
I ran the debug command
it shows |
Yeah, For packages that we'd like
Then we need to tell
And then finally we need to tell
At least these are the three steps that would work for me whenever I ran into this issue. |
Got it thanks |
6e9cab3
to
3679ba4
Compare
Thanks for the workspace tip @cdecker that helped but one more thing was needed that is |
d1167b9
to
3fd0f8b
Compare
5c0d170
to
888ff00
Compare
The |
698222f
to
debba20
Compare
make use of standard keys for project and dependeny specification - provide sources to run uv build so that it can refer local packages - using hatchling for build as is stock build option - use optional-dependencies.dev for dev-dependencies - add hatch targets for packages and includes where unclear Changelog-Update: use uv with hatchling instead of poetry
allows for namespace sharing in a virtual environment otherwise gets overriden by pyln-proto-grpc's pyln folder
Add pytest.ini with pythonpath = . configuration to ensure modules are properly discovered when running tests. Also add empty __init__.py file to make the tests directory a proper Python package.
b3e2479
to
5c7aff4
Compare
dd3239d
to
9d67e52
Compare
Replace poetry with uv for managing Python dependencies and running commands across CI workflow. - Add astral-sh/setup-uv@v5 action to install uv - Replace all poetry run commands with uv run - Remove poetry-specific installation steps - Update Python setup in multiple jobs
add openssl installation and flags to install grpcio-tools
Remove unnecessary global declarations across multiple test files. This change improves code quality by eliminating redundant global statements for variables that are already accessible in their respective scopes. Add proper type annotation for fees_from_status in test_closing.py and import the required typing modules. These changes maintain the same functionality while making the code cleaner and more compliant with Python best practices.
Extract package versions from pyproject.toml directly instead of using poetry commands. Use `uv run` to execute flake8, pytest and other Python tools consistently.
9d67e52
to
2848ad4
Compare
5882aa0
to
13b3ac4
Compare
make use of standard keys for project and dependeny specification
#7665
Important
25.05 FREEZE MAY 12TH: Non-bugfix PRs not ready by this date will wait for 25.08.
RC1 is scheduled on May 23rd, RC2 on May 26th, ...
The final release is on MAY 29TH.
Checklist
Before submitting the PR, ensure the following tasks are completed. If an item is not applicable to your PR, please mark it as checked: