-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Introduce a Depndency Lock File for Development #4796
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
Comments
Hi. Thanks for the issue. I'm a bit confused about the title though. "Making PTB more UV friendly" sounds to me like you want to make it easier for uv users to work with PTB. The issue description however mostly reads like you want to replace PTB internal tooling/CI setup with uv. Here, I don't see a necessity. If switching to uv provides us with advantages for certain tasks, then I'm open to it. Doing it simply because uv is hip doesn't sound right. Note also that uv is still a pre-release (like all other astral products...) |
There's nothing hindering PTB to be installed via uv per se. I'll admit that the main reason I opened this issue is so we commit a That being said, if you commit a uv.lock, you'd want to make use of it. Which is why I also suggest using uv in the unit test CI at least. There's no comparable lockfile feature in pip, even the newly standardized pylock.toml, is something pip will write to, but it won't use it to sync the environment, which sort of defeats the purpose imo.
Yeah I should've been a little more explicit, I just meant using
I don't see that written anywhere in their docs. In fact they say that there's not really any goal which will make them release 1.0 -https://docs.astral.sh/uv/reference/policies/versioning/#versioning. There's many projects out there which follow a 0.x.y scheme, like httpx, fastapi, msgspec, etc. If a project being used by significant chunk of the community for this long doesn't count as at least semi-stable, I don't know what does.. |
Haha alright : ) propose that we focus on this here, then. I'll edit the issue title. I can understand the reasoning for adding a lock file for development dependencies. However, it must be not be considered for the public dependencies.
Is my reasoning understandable?
I actually wasn't aware of
Huh, I wasn't aware of that. Thanks for clarifying!
IMO even before uv,
I'm don't quite see the benefit here, TBH. How would this help the user? They wouldn't even see the code. It would basically just show that PTB is indeed working, but I don't think we have to include a proof for that in the lib itself. As above, if you would like more discussion on this, please open a separate issue :) |
python-telegram-bot
a little more uv
friendly
What kind of feature are you missing? Where do you notice a shortcoming of PTB?
Now that
uv
is well known and established in python community and adopted by many projects, we should consider using some more uv features in our repository.Describe the solution you'd like
Here's what we can initially change:
uv
built python's, along with using uv commands to setup the job and install dependencies.uv.lock
file to the repo to increase reproduciblity across different machines.uv build
instead of thebuild
package in the CI.uv publish
to release to pypi. They mention that it works through GH actions too, but I don't know how it plays with our specific setup, maybe @Bibo-Joshi can determine if it's a good enough fit.Another idea I had would be to provide a "demo" app, so one could do something like:
uvx python-telegram-bot echobot
and this would run echobot.py (we'd have to read the bot token from stdin or env var).
Describe alternatives you've considered
Not using uv and staying outdated
Additional context
I don't think it's worth replacing all mentions of
pip install
with something likeuv add
, but I think we should at least acknowledge the existence ofuv
in the readme/docs somewhere to encourage more adoption. What do you think?The text was updated successfully, but these errors were encountered: