Skip to content

Commit 37e330c

Browse files
Add an exception at install for python < 3.6.2 (#5171)
* Add an exception for python < 3.6.2 See #5065 for reasoning Co-authored-by: Marc Mueller <[email protected]>
1 parent 8da5d53 commit 37e330c

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Diff for: setup.py

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
import sys
2+
13
from setuptools import setup
24

5+
6+
class PylintIncompatiblePythonError(Exception):
7+
def __init__(self) -> None:
8+
super().__init__(
9+
"The last version compatible with Python <= 3.6.2 is pylint '2.9.3'. "
10+
f"You're using {'.'.join([str(v) for v in sys.version_info[:3]])}. "
11+
"Please install pylint 2.9.3 explicitly or upgrade your python interpreter "
12+
"to at least 3.6.2. Remember that Python 3.6 end life is December 2021. "
13+
"See https://github.com/PyCQA/pylint/issues/5065 for more detail."
14+
)
15+
16+
17+
if sys.version_info < (3, 6, 2):
18+
raise PylintIncompatiblePythonError()
19+
320
setup()

0 commit comments

Comments
 (0)