Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poetry support for Python 3.11 with brownie #1702

Closed
0xprofessooor opened this issue Jul 22, 2023 · 0 comments
Closed

Poetry support for Python 3.11 with brownie #1702

0xprofessooor opened this issue Jul 22, 2023 · 0 comments

Comments

@0xprofessooor
Copy link

Environment information

  • brownie Version: 1.19.3
  • ganache-cli Version: x.x.x
  • solc Version: x.x.x
  • Python Version: 3.11
  • OS: osx/linux

What was wrong?

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:

[tool.poetry.dependencies]
python = ">=3.8,<4"
eth-brownie = "^1.19.3"

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants