Closed reversefold closed 4 years ago
I'm having the same problem with typing.NoReturn:
00:01:07.913 Traceback (most recent call last):
00:01:07.913 File "_venv/bin/poetry", line 6, in <module>
00:01:07.913 from poetry.console import main
00:01:07.913 File "/shn/builder/workspace/build-ekg-trunk/_venv/lib/python3.5/site-packages/poetry/console/__init__.py", line 1, in <module>
00:01:07.913 from .application import Application
00:01:07.913 File "/shn/builder/workspace/build-ekg-trunk/_venv/lib/python3.5/site-packages/poetry/console/application.py", line 7, in <module>
00:01:07.913 from .commands import AboutCommand
00:01:07.913 File "/shn/builder/workspace/build-ekg-trunk/_venv/lib/python3.5/site-packages/poetry/console/commands/__init__.py", line 2, in <module>
00:01:07.913 from .add import AddCommand
00:01:07.913 File "/shn/builder/workspace/build-ekg-trunk/_venv/lib/python3.5/site-packages/poetry/console/commands/add.py", line 4, in <module>
00:01:07.913 from .init import InitCommand
00:01:07.913 File "/shn/builder/workspace/build-ekg-trunk/_venv/lib/python3.5/site-packages/poetry/console/commands/init.py", line 18, in <module>
00:01:07.913 from poetry.utils.helpers import temporary_directory
00:01:07.913 File "/shn/builder/workspace/build-ekg-trunk/_venv/lib/python3.5/site-packages/poetry/utils/helpers.py", line 10, in <module>
00:01:07.913 from typing import NoReturn
00:01:07.913 ImportError: cannot import name 'NoReturn'
According to the Python docs NoReturn was introduced in Python 3.6.5.
Ah, the NoReturn traceback is in poetry code, I'll open a ticket there as well.
I am working on a build for a project which must run on Python 3.5.2 and which uses poetry. It ran fine locally on Python 3.6 during development but when I sent the build out to our build machines it failed with this:
I've been digging around and noticed that this line was added in 9b0e11e0863c9ed10bff743436ce405add0b6121. However, clikit's pyproject.tomp also has this dependency:
Despite that dependency there is no typing module installed on Python 3.5, and this seems correct since Python 3.5 has the typing module built-in.
The build is running on Ubuntu 16.04 (xenial) with Python 3.5.2.
In trying things locally with
pyenv
I found out that while Python 3.5.2 doesn't havetyping.ContextManager
Python 3.5.7 does, which means that the Python docs are either incorrect or confusing as it says that this was introduced in Python 3.6.I've also tried installing the 'typing' package in a Python 3.5.2 virtualenv and
typing.ContextManager
is still not present.