Skip to content

Terminals on Windows/Python 3.9+ fail #5967

@kevin-bates

Description

@kevin-bates

This issue is being opened to track andfoy/pywinpty#134 that was first identified in #5909 which is causing the terminal tests (and terminal functionality in general) to fail on Windows with Python 3.9 platforms.

The tests fail during collection with the following traceback:

traceback

_______ ERROR collecting notebook/terminal/tests/test_terminals_api.py ________
ImportError while importing test module 'D:\a\notebook\notebook\notebook\terminal\tests\test_terminals_api.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
c:\hostedtoolcache\windows\python\3.9.1\x64\lib\site-packages\terminado\management.py:23: in <module>
    from ptyprocess import PtyProcessUnicode
E   ModuleNotFoundError: No module named 'ptyprocess'

During handling of the above exception, another exception occurred:
c:\hostedtoolcache\windows\python\3.9.1\x64\lib\site-packages\_pytest\python.py:578: in _importtestmodule
    mod = import_path(self.fspath, mode=importmode)
c:\hostedtoolcache\windows\python\3.9.1\x64\lib\site-packages\_pytest\pathlib.py:531: in import_path
    importlib.import_module(module_name)
c:\hostedtoolcache\windows\python\3.9.1\x64\lib\importlib\__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1030: in _gcd_import
    ???
<frozen importlib._bootstrap>:1007: in _find_and_load
    ???
<frozen importlib._bootstrap>:972: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:228: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1030: in _gcd_import
    ???
<frozen importlib._bootstrap>:1007: in _find_and_load
    ???
<frozen importlib._bootstrap>:972: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:228: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1030: in _gcd_import
    ???
<frozen importlib._bootstrap>:1007: in _find_and_load
    ???
<frozen importlib._bootstrap>:986: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:680: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:790: in exec_module
    ???
<frozen importlib._bootstrap>:228: in _call_with_frames_removed
    ???
notebook\terminal\__init__.py:4: in <module>
    import terminado
c:\hostedtoolcache\windows\python\3.9.1\x64\lib\site-packages\terminado\__init__.py:8: in <module>
    from .management import (TermManagerBase, SingleTermManager,
c:\hostedtoolcache\windows\python\3.9.1\x64\lib\site-packages\terminado\management.py:25: in <module>
    from winpty import PtyProcess as PtyProcessUnicode
c:\hostedtoolcache\windows\python\3.9.1\x64\lib\site-packages\winpty\__init__.py:11: in <module>
    from .ptyprocess import PtyProcess
c:\hostedtoolcache\windows\python\3.9.1\x64\lib\site-packages\winpty\ptyprocess.py:21: in <module>
    from .winpty_wrapper import PTY, PY2
c:\hostedtoolcache\windows\python\3.9.1\x64\lib\site-packages\winpty\winpty_wrapper.py:12: in <module>
    from .cywinpty import Agent
E   ModuleNotFoundError: No module named 'winpty.cywinpty'

In the meantime, I will submit a PR that allows us to skip Terminal tests so that maintainers can rely on the CI status to be the truth (for the most part).

EDIT: Please refer to PR #5968 to determine which changes to revert so terminal tests can be re-enabled.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions