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

Terminals on Windows/Python 3.9+ fail #5967

Closed
kevin-bates opened this issue Jan 29, 2021 · 1 comment · Fixed by #6228
Closed

Terminals on Windows/Python 3.9+ fail #5967

kevin-bates opened this issue Jan 29, 2021 · 1 comment · Fixed by #6228

Comments

@kevin-bates
Copy link
Member

kevin-bates commented Jan 29, 2021

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.

@kevin-bates kevin-bates changed the title Terminals on Windows/Python 3.9+ platforms fail Terminals on Windows/Python 3.9+ fail Jan 30, 2021
@niyas-sait
Copy link
Contributor

Looks like pywinpty works with python 3.9 now. I've tried the terminal tests and it all seems to be working now. I will open a PR to revert the patch which disabled terminal tests.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants