I am using poetry for my project dependency management. I am using brownie and want to allow the use of Python 3.11. See the following pyproject.toml file snippet:
However, when I run poetry install or poetry update, I get the following error:
Updating dependencies
Resolving dependencies... (6.0s)
The current project's Python requirement (>=3.8,<4) is not compatible with some of the required packages Python requirement:
- vyper requires Python >=3.7,<3.11, so it will not be satisfied for Python >=3.11,<4
Because no versions of eth-brownie match >1.19.3,<2.0.0
and eth-brownie (1.19.3) depends on vyper (0.3.7), eth-brownie (>=1.19.3,<2.0.0) requires vyper (0.3.7).
So, because vyper (0.3.7) requires Python >=3.7,<3.11
and dojo-compass depends on eth-brownie (^1.19.3), version solving failed.
• Check your dependencies Python requirement: The Python requirement can be specified via the `python` or `markers` properties
For vyper, a possible solution would be to set the `python` property to ">=3.8,<3.11"
https://python-poetry.org/docs/dependency-specification/#python-restricted-dependencies,
https://python-poetry.org/docs/dependency-specification/#using-environment-markers
However, eth-brownie==1.19.3 should be compatible with Python 3.11 as of #1655.
How can it be fixed?
I believe this can be fixed by relaxing some of the strict dependencies specified in requirements.txt, which don't necessarily reflect the dependencies specified in the other requirements files. In this case, brownie should also work with vyper=^0.3.7 rather than vyper==0.3.7 (versions 0.3.8 onwards support Python 3.11).
This also relates to #1701 where installation on Python 3.10 fails because the pyyaml requirement is pinned to v5.4.1, when brownie should be able to support v6 too.
Environment information
brownie
Version: 1.19.3ganache-cli
Version: x.x.xsolc
Version: x.x.xWhat was wrong?
I am using
poetry
for my project dependency management. I am usingbrownie
and want to allow the use of Python 3.11. See the followingpyproject.toml
file snippet:However, when I run
poetry install
orpoetry update
, I get the following error:However,
eth-brownie==1.19.3
should be compatible with Python 3.11 as of #1655.How can it be fixed?
I believe this can be fixed by relaxing some of the strict dependencies specified in
requirements.txt
, which don't necessarily reflect the dependencies specified in the otherrequirements
files. In this case, brownie should also work withvyper=^0.3.7
rather thanvyper==0.3.7
(versions 0.3.8 onwards support Python 3.11).This also relates to #1701 where installation on Python 3.10 fails because the
pyyaml
requirement is pinned to v5.4.1, whenbrownie
should be able to support v6 too.