|
|
|
|
|
by diggan
409 days ago
|
|
Thanks, as mentioned, I'm not really a Python programmer so don't follow along the trends... I tried to figure out why anyone would use pyproject.toml over requirements.txt, granted they're just installing typical dependencies and didn't come up with any good answer. Personally I haven't had any issues with requirements.txt, so not sure what pyproject.toml would solve. I guess I'll change when/if I hit some bump in the road. |
|
1. You can differenciate between different dependency groups like build dependencies, dev dependencies, test dependencies and regular dependencies. So if someone uses some dependency only in dev previously you either had to install that manually or your requirements.txt installed it for you without you needing it.
2. It adds a common description for project metadata that can be used
3. Adds a place where tool settings like those of a linter or a formatter can be stored (e.g. ruff and black)
4. Its format is standardized and allows it to be integrated with multiple build tools, toml is a bit more standardized than whatever custom file syntax python used before