pyproject.toml Migration
I feel like I'm abusing the issues feature but I hope it's okay, considering we don't have discussions enabled.
Is there a plan to switch to a pyproject.toml file? I think it's important because
- It gives the impression that the project is modern. If not for anything else, I believe that it's important that projects under django organization should look modern and up to date.
- Easier to use and manage. Especially with uv, almost everything is collected under a single tool and single configuration file.
and that's all 🙂 I was hoping to write something better, but I think that development ergonomics are important enough for a change like this one.
There is a template project that I test these types of practices on it first. I studied the poetry - uv migration on that repo and I'm happy with the results: https://github.com/ulgens/django-blasphemy/pull/603/files If that seems okay, I can adapt a similar pattern on this repo too.
Just want to add that this tool should make it easier to migrate to uv from the current setup. https://github.com/mkniewallner/migrate-to-uv
@django/django-website How do we feel about this?
@django/ops-team Would this migration require any changes in the deployment proces?
Hi @ulgens,
@django/ops-team Would this migration require any changes in the deployment proces?
I think migrating to pyproject.toml + uv for managing dependencies is a great idea. Astral has some good uv Docker examples we could follow to update the Docker image.
Provided python -m django, make, and gunicorn behave the way the do now inside the container, it shouldn't require changes in the deployment process. It doesn't look like paths are hard-coded (with respect to the website image at least, different story for the Trac image), the playbook merely assumes python -m django and gunicorn are available in the PATH, and make compile-scss can be executed from the current working directory.
Just want to add that this tool should make it easier to migrate to uv from the current setup. https://github.com/mkniewallner/migrate-to-uv
I tried this for another project, but found it harder to use than uv's own built-in tools. Disclaimer and a shameless plug: I wrote about migrating to uv recently.
Good luck & have fun!