3 ms·
python's poetry has poetry.lock I think it's slowly becoming semi-standard. But still slowly and still not fully ready(bugs). Also its odd that pyproject.toml (
by rat87 4y ago
python's poetry has poetry.lock I think it's slowly becoming semi-standard.
But still slowly and still not fully ready(bugs).
Also its odd that pyproject.toml (not poetry.toml which is the poetry settings for repo) is the dependency definition file and poetry.lock is the lock file
for pip file I usually make a requirements-to-freeze.txt, make a fresh virtualenv, install requirements-to-freeze.txt and then pip freeze > requirements.txt
poetry does this automatically
- returnzero 4y ago> But still slowly and still not fully ready(bugs). I use poetry every day and so far it's been pretty great. The main complications I have had are with accessing private pypi repos in Azure DevOps pipelines which use short lived tokens but it just looks a little clunky, still works. > Also its odd that pyproject.toml (not poetry.toml which is the poetry settings for repo) is the dependency definition file and poetry.lock is the lock file This is because poetry is using Python's PEP 518[1] specification rather than define their own build requirements format. It also isn't limited to just building, you can also include the configuration for other python tools like `pytest`[2]. [1] https://peps.python.org/pep-0518/ https://peps.python.org/pep-0518/ [2] https://docs.pytest.org/en/stable/reference/customize.html#pyproject-toml https://docs.pytest.org/en/stable/reference/customize.html#p...
- rat87 4y ago> This is because poetry is using Python's PEP 518[1] specification rather than define their own build requirements format. It also isn't limited to just building, you can also include the configuration for other python tools like `pytest`[2]. I sort of get this but its still a bit odd. especially since I have a small poetry.toml as well. > I use poetry every day and so far it's been pretty great. I like poetry, it works a lot better for me then pipenv did(to be fair that was a few years ago). But I do seem to have to delete lock file to update it and sometimes poetry add/install breaks oddly(or at least with awkward error messages). Also sometimes it interacts with venvs in odd ways. python really needs to ship with it
- mickeyk 4y agoThe pyproject.toml is telling you what should work in terms of a range of package versions and the poetry.lock is telling you what my environment is in terms of exactly what is installed. You don't need the lock file, but without it there is no guarantee of what it will install so it may not be completely compatible.