I have upgrade poetry in my github ci in my tox.ini. My ci have problem.
I use zuul.
When I use poetry pip install -v poetry==1.1.15. I have no problem But when I use 1.2.0 I have this error :
Invalid PEP 440 version: '3.8.13+'
3.8.13 it's my python version.
I don't understand why I have problem with python version and not the previous version.
pyproject.toml
[tool.poetry]
name = zeus
version = "0.1.0"
description = ***
authors = ***
[tool.poetry.dependencies]
python = "3.8.*"
pandas = "1.4.*"
click = "8.1.*"
[tool.poetry.dev-dependencies]
black = "22.6.*"
flake8 = "5.0.*"
freezegun = "1.2.*"
pre-commit = "2.20.*"
pycodestyle = "2.9.*"
pytest = "7.*"
pylint = "2.14.*"
tox = "3.25.*"
yamllint = "1.27.*"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
tox.ini
[testenv]
whitelist_externals =
bash
poetry
basepython = python3.8
commands_pre =
bash -c "pip install --upgrade pip"
bash -c "pip install -q poetry"
poetry config repositories****
poetry config http-basic.artifactory ****
poetry install
[testenv:lint]
description = Run the quality checks
commands =
poetry run pre-commit run --from-ref origin/master --to-ref HEAD
[testenv:test]
setenv =
PYTHONPATH = {toxinidir}/app
description = Run the tests
commands =
poetry run pytest
There's a couple of unorthodox actions taken in your setup:
[testenv:test]). There's no need, you can simply use the default[testenv]section. Then you can run your testsuite tox -e py38 for python3.8 or any other supported tag (py37,py39, ... source). This also makes thebasepythonkey redundant. And for a much more versatile experience withtox.PYTHONPATH = {toxinidir}/appis a codesmell to me. If you've configured yourpyproject.tomlcorrectly then poetry should know where your code lives (and install it accordingly). There would be no need to setPYTHONPATH. Hence, you probably need to add a section such as:Note: that a
/srcfolder is much more common then an/appfolder. Which is likely the root cause of you not finding this option. See this answer.I suspect that if you tackle all these points that your code and its installation will work entirely different possibly solving your issue.