← All tasks
pythonpython-telegram-bot/python-telegram-bot #4796Not a task: already works

Introduce a Dependency Lock File for Development

envgap__python-telegram-bot__python-telegram-bot-4796

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not a benchmark task.
  • The project already builds and runs before the fix, so there is nothing to repair.

02 / ENVIRONMENT RECIPE

Base commit
cea812dabddb439d7e44d687ea8c3e5eebb3aa3c
Manifest
pyproject.toml
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

python-telegram-bot/python-telegram-bot #4796 · read the original issue
### What kind of feature are you missing? Where do you notice a shortcoming of PTB?

Now that [`uv`](https://docs.astral.sh/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:

1. The CI for unit tests can use [`uv` built python's](https://docs.astral.sh/uv/guides/install-python/#installing-python), along with using uv commands to setup the job and install dependencies.
2. Commiting the [`uv.lock`](https://docs.astral.sh/uv/guides/projects/#uvlock) file to the repo to increase reproduciblity across different machines. 
3. Using `uv build` instead of the `build` package in the CI.
4. Using [`uv publish`](https://docs.astral.sh/uv/guides/package/#publishing-your-package) 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.
5. In the future, we could try using the uv [build-backend](https://docs.astral.sh/uv/configuration/build-backend/#the-uv-build-backend) too.

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 like `uv add`, but I think we should at least acknowledge the existence of `uv` in the readme/docs somewhere to encourage more adoption. What do you think?
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]