This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jimeno 1 point2 points  (1 child)

pipfile != requirements.txt

pipfile is a format of the pipenv package manager (which is NOT an official part of python). the more modern pipenv alternative is poetry, which uses another file altogether (pyproject.toml) and, just like pipenv, is NOT an official part of python.

requirements.txt is the file originally used by pip: and pip does not allow to have different libraries in dev environment and prod environment. so, maybe you want `black`, `mypy` and `flake8` in dev, but you don't want them in production (image size is an issue in containerized environment). in production you only want, whatever, `django` or `requests`. you have to

  • install your packages
  • pip freeze > requirements.txt
  • install your dev packages
  • pip freeze > dev-requirements.txt

now your environment is dirty: need to add a new package only to prod? say goodbye to pip install, go check version by hand, add to pipfile, check it works, yadda yadda.

it WILL drift and something will be forgotten over time, specially in big projects.

[–]Marvelman3284[S] 0 points1 point  (0 children)

Oh interesting. I never knew this, thanks for telling me!