diff --git a/CHANGELOG.md b/CHANGELOG.md index 43abd892..1c079a6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Version 0.8.0 (unreleased) +* This is the last version to support Python 2. Issues a deprecation warning! * [#109](http://github.com/landscapeio/pylint-django/pull/109), adding 'urlpatterns', 'register', 'app_name' to good names. Obsoletes [#111](http://github.com/landscapeio/pylint-django/pull/111), fixes @@ -23,7 +24,9 @@ Add support for django.contrib.postgres.fields and UUIDField (Villiers Strauss) * Stop testing with older Django versions. Currently testing with Django 1.11.x and 2.0 * Stop testing on Python 2, no functional changes in the source code though -* Update tests for latest version of pylint (>=1.8) +* Update tests and require latest version of pylint (>=1.8), fixes + [#53](https://github.com/landscapeio/pylint-django/issues/53), + [#97](https://github.com/landscapeio/pylint-django/issues/97) ## Version 0.7.4 * [#88](https://github.com/landscapeio/pylint-django/pull/88) Fixed builds with Django 1.10 (thanks to [federicobond](https://github.com/federicobond)) diff --git a/pylint_django/__init__.py b/pylint_django/__init__.py index 50769d0f..8fe4a029 100644 --- a/pylint_django/__init__.py +++ b/pylint_django/__init__.py @@ -1,5 +1,13 @@ """pylint_django module.""" from __future__ import absolute_import + +import sys +import warnings + from pylint_django import plugin +if sys.version_info < (3, ): + warnings.warn("Version 0.8.0 is the last to support Python 2. " + "Please migrate to Python 3!", DeprecationWarning) + register = plugin.register diff --git a/setup.py b/setup.py index c74e6d1a..0577d08b 100644 --- a/setup.py +++ b/setup.py @@ -32,22 +32,11 @@ _install_requires = [ - 'pylint-plugin-utils>=0.2.1' + 'pylint-plugin-utils>=0.2.1', + 'pylint>=1.8' ] -if sys.version_info < (2, 7): - # pylint 1.4 dropped support for Python 2.6 - _install_requires += [ - 'pylint>=1.0,<1.4', - 'astroid>=1.0,<1.3.0', - 'logilab-common>=0.60.0,<0.63', - ] -else: - _install_requires += [ - 'pylint>=1.0', - ] - setup( name='pylint-django', url='https://github.com/landscapeio/pylint-django',