Closed celeron533 closed 1 year ago
Warning: poetry.lock is not consistent with pyproject.toml. You may be getting improper dependencies. Run poetry lock [--no-update]
to fix it.
the poetry.lock file contents will depend on which version of Python is in use, and potentially on which platform. We might want to introduce a matrix of poetry.lock files and tell the user that they need to move the appropriate one in to place.
Hi @sjswerdloff there are some discussions about this topic. https://github.com/python-poetry/poetry/issues/2560#issuecomment-644249484
And can define the python restricted dependencies: https://python-poetry.org/docs/dependency-specification/#python-restricted-dependencies
Sample
[tool.poetry.group.dependencies]
foo = {version = "12", python = "3.9", markers = "sys_platform == 'win32'"}
foo = {version = "13", python = "3.9", markers = "sys_platform == 'darwin'"}
foo = {version = "13", python = "3.10", markers = "sys_platform == 'win32'"}
foo = {version = "14", python = "3.10", markers = "sys_platform == 'darwin'"}
Hi @sjswerdloff there are some discussions about this topic. https://github.com/python-poetry/poetry/issues/2560#issuecomment-644249484
And can define the python restricted dependencies: https://python-poetry.org/docs/dependency-specification/#python-restricted-dependencies
Sample
[tool.poetry.group.dependencies] foo = {version = "12", python = "3.9", markers = "sys_platform == 'win32'"} foo = {version = "13", python = "3.9", markers = "sys_platform == 'darwin'"} foo = {version = "13", python = "3.10", markers = "sys_platform == 'win32'"} foo = {version = "14", python = "3.10", markers = "sys_platform == 'darwin'"}
This would be an appropriate PR
requirements.txt
files topyproject.toml
.gitignore
poetry.lock
. If any developer needs to update the dependencies inpyproject.toml
, remember to runpoetry lock
to update the lock file and commit this file. (Seems need to update the readme.md later)