File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -341,7 +341,11 @@ def prepare_friendly_prompts():
341
341
This function is called by the other functions in this module to enable
342
342
user friendly prompts.
343
343
"""
344
- import readline # NOQA
344
+ try :
345
+ import readline # NOQA
346
+ except ImportError :
347
+ # might not be available on Windows if pyreadline isn't installed
348
+ pass
345
349
346
350
347
351
def retry_limit (limit = MAX_ATTEMPTS ):
Original file line number Diff line number Diff line change @@ -49,7 +49,9 @@ def get_install_requires():
49
49
if sys .version_info .major == 2 :
50
50
install_requires .append ('monotonic' )
51
51
if sys .platform == 'win32' :
52
- install_requires .append ('pyreadline' )
52
+ # pyreadline isn't compatible with Python 3.9+
53
+ # https://github.com/pyreadline/pyreadline/issues/65
54
+ install_requires .append ('pyreadline ; python_version<"3.9"' )
53
55
return sorted (install_requires )
54
56
55
57
@@ -63,7 +65,9 @@ def get_extras_require():
63
65
])
64
66
extras_require [expression ] = ['monotonic' ]
65
67
# Conditional `pyreadline' dependency.
66
- expression = ':sys_platform == "win32"'
68
+ # pyreadline isn't compatible with Python 3.9+
69
+ # https://github.com/pyreadline/pyreadline/issues/65
70
+ expression = ':sys_platform == "win32" and python_version<"3.9"'
67
71
extras_require [expression ] = 'pyreadline'
68
72
return extras_require
69
73
You can’t perform that action at this time.
0 commit comments