-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Environment Markers + Poetry Issues #881
Comments
This is nothing to do with either projects, grpcio pulls in enum34 that breaks your interpreter effectively by shadowing the true enum package tox-dev/tox#1163 (comment) |
Following up on this issue from poetry's end it seems that poetry finds the wrong dependencies for grpcio (ie enum34).
Shows that poetry is recognizing the correct python version (in the "install" virtualenv), nevertheless. @sdispater any ideas as to a direction to take to debug this? |
Upon further trawling through poetry's issues this seems related to #844 (comment) Will follow up with grpcio. In the meantime, is it possible to blacklist a package in pyproject.toml to prevent it from being added to poetry.lock? Every time I run poetry update, enum and futures get added back. I have tried setting the python major version to less than 3 for enum34 but no dice still. |
@mehrdada It seems that this was addressed and reverted in grpc/grpc#16235. Did the macos python 3.4 build fail by chance because of a less than operator being used in the python environment marker as opposed to a less than equal? INSTALL_REQUIRES = (
"six>=1.5.2",
"futures>=2.2.0 ; python_version<'3.3'",
"enum34>=1.0.4 ; python_version<'3.5'"
'six>=1.5.2',
) |
I wouldn't know. Pinging @ericgribkoff who's in charge now. |
@mehrdada Thanks for pinging the right person! Look forward to your a resolution to this as it is a huge hassle to projects that are trying to simplify to pyproject.toml |
Seems like grpcio fixed this in grpc/grpc#18013. Might this be worth adding to a FAQ as it seems to be a common problem? |
PEP-508 recommends Environment markers for better compatibility with modern build tools and dependency managers such as Poetry. https://www.python.org/dev/peps/pep-0508/#environment-markers E.g., See also: python-poetry/poetry#844 python-poetry/poetry#881
i'd say it isn't common enough for the faq. given that the problem is fixed, it will also decease to occur. |
Thought I'd update the title so that people could find the issue and resolution easier.
@funkyfuture I'm not sure I'd agree. From #844 (comment) It seems that using sys.version_info is a fairly common pattern. As it's not the recommended pattern as per PEP508, it might be worth documenting that one would run into issues using that pattern for poetry users somewhere |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Simple base project created using:
$ poetry new test
Error:
Issue
After many hours of trials and tribulations, I am unable to coerce tox to work with poetry. As suggested in the latest poetry and tox documentation, I am using the isolated_build parameter in the tox ini and have found that for some odd reason, tox seems to be using the wrong python version (ie enum34 becomes active) when executing. I have found the same issue when building the project from scratch using poetry using custom virtualenv (pyenv) causes the enum34 error whereas a venv using standard python does not which makes me think the bug is on poetry's end as opposed to tox but I am not sure. I have cross posted the bug report to both projects to hopefully get some help to track this one down.
The text was updated successfully, but these errors were encountered: