Drop Python 2.7 and Python 3.4 support

Fixes #395

Signed-off-by: Aleksi Häkli <aleksi.hakli@iki.fi>
This commit is contained in:
Aleksi Häkli 2019-02-07 17:20:45 +02:00
parent ecadddbf5d
commit 030810df79
No known key found for this signature in database
GPG key ID: 3E7146964D726BBE
39 changed files with 5 additions and 109 deletions

View file

@ -2,8 +2,6 @@ dist: xenial
language: python
cache: pip
python:
- 2.7
- 3.4
- 3.5
- 3.6
- 3.7
@ -14,16 +12,6 @@ env:
- DJANGO=master
matrix:
exclude:
- python: 2.7
env: DJANGO=2.0
- python: 2.7
env: DJANGO=2.1
- python: 2.7
env: DJANGO=master
- python: 3.4
env: DJANGO=2.1
- python: 3.4
env: DJANGO=master
- python: 3.5
env: DJANGO=master
install: pip install tox-travis codecov

View file

@ -23,6 +23,9 @@ Changes
- Clean up code, tests, and documentation.
[aleksihakli]
- Drop support for Python 2.7 and Python 3.4.
[aleksihakli]
4.5.4 (2019-01-15)
------------------

View file

@ -1,5 +1,3 @@
from __future__ import unicode_literals
__version__ = '4.5.4'
default_app_config = 'axes.apps.AppConfig'

View file

@ -1,5 +1,3 @@
from __future__ import unicode_literals
from django.contrib import admin
from django.utils.translation import gettext_lazy as _

View file

@ -1,5 +1,3 @@
from __future__ import unicode_literals
from django import apps

View file

@ -1,5 +1,3 @@
from __future__ import unicode_literals
from datetime import timedelta
from hashlib import md5

View file

@ -1,5 +1,3 @@
from __future__ import unicode_literals
from django.contrib.auth.backends import ModelBackend
from axes.attempts import is_already_locked

View file

@ -1,5 +1,3 @@
from __future__ import unicode_literals
from django.core.checks import Error, Tags, register
from django.conf import settings

View file

@ -1,5 +1,3 @@
from __future__ import unicode_literals
from django.conf import settings
from django.utils.translation import gettext_lazy as _

View file

@ -1,5 +1,3 @@
from __future__ import unicode_literals
from functools import wraps
import logging

View file

@ -1,5 +1,3 @@
from __future__ import unicode_literals
from django.core.exceptions import PermissionDenied

View file

@ -1 +0,0 @@
from __future__ import unicode_literals

View file

@ -1 +0,0 @@
from __future__ import unicode_literals

View file

@ -1,5 +1,3 @@
from __future__ import unicode_literals
from django.core.management.base import BaseCommand
from axes.models import AccessAttempt

View file

@ -1,5 +1,3 @@
from __future__ import unicode_literals
from django.core.management.base import BaseCommand
from axes.utils import reset

View file

@ -1,5 +1,3 @@
from __future__ import unicode_literals
from django.core.management.base import BaseCommand
from axes.utils import reset

View file

@ -1,5 +1,3 @@
from __future__ import unicode_literals
from django.core.management.base import BaseCommand
from axes.utils import reset

View file

@ -1,5 +1,3 @@
from __future__ import unicode_literals
from axes.exceptions import AxesSignalPermissionDenied
from axes.utils import get_lockout_response

View file

@ -1,6 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models

View file

@ -1,6 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models

View file

@ -1,6 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations

View file

@ -1,7 +1,3 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2018-10-24 22:38
from __future__ import unicode_literals
from django.db import migrations, models

View file

@ -1,5 +1,3 @@
# Generated by Django 2.1.4 on 2018-12-23 09:03
from django.db import migrations

View file

@ -1,5 +1,3 @@
from __future__ import unicode_literals
from django.db import models
from django.utils.translation import gettext_lazy as _

View file

@ -1,5 +1,3 @@
from __future__ import unicode_literals
import logging
from django.contrib.auth.signals import user_logged_in

View file

@ -1,5 +1,3 @@
from __future__ import unicode_literals
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',

View file

@ -1,5 +1,3 @@
from __future__ import unicode_literals
from django.conf.urls import url
from django.contrib import admin

View file

@ -1 +0,0 @@
from __future__ import unicode_literals

View file

@ -1,6 +0,0 @@
from __future__ import unicode_literals
try:
from unittest.mock import patch # pylint: disable=unused-import
except ImportError:
from mock import patch # pylint: disable=unused-import

View file

@ -1,10 +1,9 @@
from __future__ import unicode_literals
import datetime
import hashlib
import random
import string
import time
from unittest.mock import patch
from django.http import HttpRequest
from django.test import TestCase, override_settings
@ -17,7 +16,6 @@ from axes.conf import settings
from axes.attempts import get_cache_key
from axes.models import AccessAttempt, AccessLog
from axes.signals import user_locked_out
from axes.tests.compatibility import patch
from axes.utils import reset
@ -213,7 +211,6 @@ class AccessAttemptTest(TestCase):
)
self.assertEqual(cache_hash_key, get_cache_key(attempt))
@patch('axes.utils.get_client_ip', return_value='127.0.0.1')
def test_get_cache_key_credentials(self, _):
""" Test the cache key format"""

View file

@ -1,5 +1,3 @@
from __future__ import unicode_literals
import json
from django.test import TestCase, override_settings

View file

@ -1,5 +1,3 @@
from __future__ import unicode_literals
from django.core.checks import run_checks, Error
from django.conf import settings
from django.test import TestCase, override_settings

View file

@ -1,8 +1,4 @@
from __future__ import unicode_literals
from io import StringIO
from sys import version_info
from unittest import skipIf
from django.core.management import call_command
from django.test import TestCase
@ -10,7 +6,6 @@ from django.test import TestCase
from axes.models import AccessAttempt
@skipIf(version_info < (3, ), 'Not supported on Python 2.x')
class ManagementCommandTestCase(TestCase):
def setUp(self):
AccessAttempt.objects.create(

View file

@ -1,5 +1,3 @@
from __future__ import unicode_literals
import datetime
from django.http import HttpRequest

View file

@ -1,10 +1,3 @@
from __future__ import unicode_literals
try:
import win_inet_pton # pylint: disable=unused-import
except ImportError:
pass
from datetime import timedelta
from inspect import getargspec
from logging import getLogger

View file

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
#
# Django Axes documentation build configuration file, created by
# sphinx-quickstart on Sat Jul 30 16:37:41 2016.
#

View file

@ -1,6 +1,5 @@
-e .
coverage==4.5.2
mock==2.0.0 ; python_version <= "2.7"
prospector==1.1.6.2
sphinx_rtd_theme==0.4.2
tox==3.7.0

View file

@ -1,7 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import codecs
from setuptools import setup, find_packages
@ -28,7 +25,6 @@ setup(
'django',
'django-appconf',
'django-ipware>=2.0.2',
'win_inet_pton ; python_version < "3.4" and sys_platform == "win32"',
],
include_package_data=True,
packages=find_packages(),
@ -44,10 +40,7 @@ setup(
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',

View file

@ -1,14 +1,10 @@
[tox]
envlist =
py{27,34,35,36,37}-django111
py{34,35,36,37}-django20
py{35,36,37}-django21
py{35,36,37}-django{111,20,21}
py{36,37}-djangomaster
[travis]
python =
2.7: py27
3.4: py34
3.5: py35
3.6: py36
3.7: py37