Skip to content

Release 1.0.11 broken on python3 with virtualenv #461

@patricklucas

Description

@patricklucas

I'm not sure of the exact scope of the breakage, but I have found prompt_toolkit to be reliably non-importable in a clean Python >= 3.5 virtualenv on a vanilla system. The affected version is 1.0.11; 1.0.10 works as expected.

plucas@plucas-vm:~$ virtualenv --python python3 venv
Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/plucas/venv/bin/python3
Also creating executable in /home/plucas/venv/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.
plucas@plucas-vm:~$ venv/bin/pip install prompt-toolkit==1.0.11
Collecting prompt-toolkit==1.0.11
  Using cached prompt_toolkit-1.0.11-py3-none-any.whl
Requirement already satisfied: six>=1.9.0 in ./venv/lib/python3.5/site-packages (from prompt-toolkit==1.0.11)
Collecting wcwidth (from prompt-toolkit==1.0.11)
  Using cached wcwidth-0.1.7-py2.py3-none-any.whl
Installing collected packages: wcwidth, prompt-toolkit
Successfully installed prompt-toolkit-1.0.11 wcwidth-0.1.7
plucas@plucas-vm:~$ venv/bin/python -c "import prompt_toolkit"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/plucas/venv/lib/python3.5/site-packages/prompt_toolkit/__init__.py", line 16, in <module>
    from .interface import CommandLineInterface
  File "/home/plucas/venv/lib/python3.5/site-packages/prompt_toolkit/interface.py", line 27, in <module>
    from .input import StdinInput, Input
ImportError: cannot import name 'StdinInput'
plucas@plucas-vm:~$ venv/bin/pip install prompt-toolkit==1.0.10
Collecting prompt-toolkit==1.0.10
  Using cached prompt_toolkit-1.0.10-py3-none-any.whl
Requirement already satisfied: wcwidth in ./venv/lib/python3.5/site-packages (from prompt-toolkit==1.0.10)
Requirement already satisfied: six>=1.9.0 in ./venv/lib/python3.5/site-packages (from prompt-toolkit==1.0.10)
Installing collected packages: prompt-toolkit
  Found existing installation: prompt-toolkit 1.0.11
    Uninstalling prompt-toolkit-1.0.11:
      Successfully uninstalled prompt-toolkit-1.0.11
Successfully installed prompt-toolkit-1.0.10
plucas@plucas-vm:~$ venv/bin/python -c "import prompt_toolkit"
plucas@plucas-vm:~$ echo $?
0

Python 2 is unaffected:

plucas@plucas-vm:~$ virtualenv --python python2 venv
Running virtualenv with interpreter /usr/bin/python2
New python executable in /home/plucas/venv/bin/python2
Also creating executable in /home/plucas/venv/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.
plucas@plucas-vm:~$ venv/bin/pip install prompt-toolkit==1.0.11
Collecting prompt-toolkit==1.0.11
  Downloading prompt_toolkit-1.0.11-py2-none-any.whl (248kB)
    100% |████████████████████████████████| 256kB 3.3MB/s 
Requirement already satisfied: six>=1.9.0 in ./venv/lib/python2.7/site-packages (from prompt-toolkit==1.0.11)
Collecting wcwidth (from prompt-toolkit==1.0.11)
  Using cached wcwidth-0.1.7-py2.py3-none-any.whl
Installing collected packages: wcwidth, prompt-toolkit
Successfully installed prompt-toolkit-1.0.11 wcwidth-0.1.7
plucas@plucas-vm:~$ venv/bin/python -c "import prompt_toolkit"
plucas@plucas-vm:~$ echo $?
0

I have not tested whether this affects Python 3 outside of a virtualenv, but I would assume it is likely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions