Ensuring reliably repeatable dependency installation has long been an unsolved problem for many Python projects. Pinning dependencies via setup.py and requirements.txt has historically been met with extra work and unexpected results, particularly when managing the dependencies of dependencies.
Thanks to PEP 518, Python projects can now more easily manage dependencies via the new pyproject.toml file specification. In its wake, a number of useful tools have arisen that use this file to provide enhanced dependency resolution, including Poetry, Hatch, and Pipenv.
Attendees of this talk will take home the following knowledge and skills:
- how to replace three files (setup.py, requirements.txt, and MANIFEST.ini) with just one: pyproject.toml
- why dependency resolution is hard and why it matters
- how Poetry, Hatch, and Pipenv differ and when to use each
- why one might use a less magical alternative: pip-tools
- how to use pipx to isolate system-wide Python tools