@@ -68,30 +68,6 @@ def _colorama_workaround() -> None:
68
68
pass
69
69
70
70
71
- def _readline_workaround () -> None :
72
- """Ensure readline is imported so that it attaches to the correct stdio
73
- handles on Windows.
74
-
75
- Pdb uses readline support where available--when not running from the Python
76
- prompt, the readline module is not imported until running the pdb REPL. If
77
- running pytest with the --pdb option this means the readline module is not
78
- imported until after I/O capture has been started.
79
-
80
- This is a problem for pyreadline, which is often used to implement readline
81
- support on Windows, as it does not attach to the correct handles for stdout
82
- and/or stdin if they have been redirected by the FDCapture mechanism. This
83
- workaround ensures that readline is imported before I/O capture is setup so
84
- that it can attach to the actual stdin/out for the console.
85
-
86
- See https://github.com/pytest-dev/pytest/pull/1281.
87
- """
88
- if sys .platform .startswith ("win32" ):
89
- try :
90
- import readline # noqa: F401
91
- except ImportError :
92
- pass
93
-
94
-
95
71
def _py36_windowsconsoleio_workaround (stream : TextIO ) -> None :
96
72
"""Workaround for Windows Unicode console handling on Python>=3.6.
97
73
@@ -154,7 +130,6 @@ def pytest_load_initial_conftests(early_config: Config):
154
130
if ns .capture == "fd" :
155
131
_py36_windowsconsoleio_workaround (sys .stdout )
156
132
_colorama_workaround ()
157
- _readline_workaround ()
158
133
pluginmanager = early_config .pluginmanager
159
134
capman = CaptureManager (ns .capture )
160
135
pluginmanager .register (capman , "capturemanager" )
0 commit comments