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

Add an exception at install for python < 3.6.2 #1267

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ What's New in astroid 2.9.0?
============================
Release date: TBA

* The last version compatible with python '3.6.0' and '3.6.1' is astroid '2.6.6'. We did not
realize that when adding incompatible typing at the time, and versions might be broken
for this interpreter. 2.9.0 meta-information will permit to download pylint on those
interpreters but the installation will fail and tell you to install '2.6.6' instead.
astroid 2.9.1 will require python >= 3.6.2.


What's New in astroid 2.8.6?
Expand Down
16 changes: 16 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
import sys

from setuptools import setup


class AstroidIncompatiblePythonError(Exception):
def __init__(self) -> None:
super().__init__(
"The last version compatible with python '3.6.0' and '3.6.1' is astroid '2.6.6'"
f"You're using {'.'.join([str(v) for v in sys.version_info[:3]])}. "
"Please install astroid 2.6.6 explicitly or upgrade your python interpreter "
"to at least 3.6.2. Remember that Python 3.6 end life is December 2021. "
"See https://github.com/PyCQA/pylint/issues/5065 for more detail."
)


if sys.version_info < (3, 6, 2):
raise AstroidIncompatiblePythonError()
setup()