Drop Py2.7, 3.5 and Django 1.11, 2.0, 2.1, 3.0
This commit is contained in:
1 parent
6ba4010381
commit
085048d22b
7 files changed
+15
-50
No files matched your search
@@ -1,3 +1,8 @@
|
|||||||
|
## 4.0.0
|
||||||
|
|
||||||
|
- Drop support for Python 2.7 and 3.5
|
||||||
|
- Drop support for Django 1.11, 2.0, 2.1, 3.0
|
||||||
|
|
||||||
## 3.0.1
|
## 3.0.1
|
||||||
|
|
||||||
Fixed bug:
|
Fixed bug:
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import inspect
|
|||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import sys
|
|
||||||
from enum import Enum, unique
|
from enum import Enum, unique
|
||||||
from subprocess import PIPE, Popen
|
from subprocess import PIPE, Popen
|
||||||
|
|
||||||
@@ -26,8 +25,6 @@ from .utils import clean_bytes_to_str, get_migration_abspath, split_migration_pa
|
|||||||
|
|
||||||
logger = logging.getLogger("django_migration_linter")
|
logger = logging.getLogger("django_migration_linter")
|
||||||
|
|
||||||
PY2 = sys.version_info[0] == 2
|
|
||||||
|
|
||||||
|
|
||||||
@unique
|
@unique
|
||||||
class MessageType(Enum):
|
class MessageType(Enum):
|
||||||
@@ -465,11 +462,7 @@ class MigrationLinter(object):
|
|||||||
warning.append(issue)
|
warning.append(issue)
|
||||||
|
|
||||||
# Detect warning for argument naming convention
|
# Detect warning for argument naming convention
|
||||||
args_spec = (
|
args_spec = inspect.getfullargspec(runpython.code)
|
||||||
inspect.getargspec(runpython.code)
|
|
||||||
if PY2
|
|
||||||
else inspect.getfullargspec(runpython.code)
|
|
||||||
)
|
|
||||||
if tuple(args_spec.args) != EXPECTED_DATA_MIGRATION_ARGS:
|
if tuple(args_spec.args) != EXPECTED_DATA_MIGRATION_ARGS:
|
||||||
issue = {
|
issue = {
|
||||||
"code": "RUNPYTHON_ARGS_NAMING_CONVENTION",
|
"code": "RUNPYTHON_ARGS_NAMING_CONVENTION",
|
||||||
|
|||||||
@@ -3,5 +3,5 @@
|
|||||||
A small note on how the linter is usually published to PyPi:
|
A small note on how the linter is usually published to PyPi:
|
||||||
|
|
||||||
- `python3 setup.py sdist bdist_wheel --universal`
|
- `python3 setup.py sdist bdist_wheel --universal`
|
||||||
- `twine upload dist/django_migration_linter-X.Y.Z-py2.py3-none-any.whl dist/django-migration-linter-X.Y.Z.tar.gz`
|
- `twine upload dist/django_migration_linter-X.Y.Z-py3-none-any.whl dist/django-migration-linter-X.Y.Z.tar.gz`
|
||||||
|
|
||||||
@@ -32,9 +32,8 @@ setup(
|
|||||||
license="Apache License 2.0",
|
license="Apache License 2.0",
|
||||||
packages=find_packages(include=["django_migration_linter*"]),
|
packages=find_packages(include=["django_migration_linter*"]),
|
||||||
install_requires=[
|
install_requires=[
|
||||||
"django>=1.11",
|
"django>=2.2",
|
||||||
"appdirs>=1.4.3",
|
"appdirs>=1.4.3",
|
||||||
'enum34>=1.1.6;python_version<"3.4"',
|
|
||||||
"toml>=0.10.2",
|
"toml>=0.10.2",
|
||||||
],
|
],
|
||||||
extras_require={
|
extras_require={
|
||||||
@@ -43,8 +42,6 @@ setup(
|
|||||||
"mysqlclient>=1.4.6,<2",
|
"mysqlclient>=1.4.6,<2",
|
||||||
"psycopg2-binary>=2.8.5,<2.9",
|
"psycopg2-binary>=2.8.5,<2.9",
|
||||||
"django_add_default_value>=0.4.0",
|
"django_add_default_value>=0.4.0",
|
||||||
'mock>=3.0.5;python_version<"3.3"',
|
|
||||||
'backports.tempfile>=1.0;python_version<="2.7"',
|
|
||||||
"coverage>=5.5",
|
"coverage>=5.5",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -54,18 +51,11 @@ setup(
|
|||||||
"Intended Audience :: Developers",
|
"Intended Audience :: Developers",
|
||||||
"Environment :: Web Environment",
|
"Environment :: Web Environment",
|
||||||
"Framework :: Django",
|
"Framework :: Django",
|
||||||
"Framework :: Django :: 1.11",
|
|
||||||
"Framework :: Django :: 2.0",
|
|
||||||
"Framework :: Django :: 2.1",
|
|
||||||
"Framework :: Django :: 2.2",
|
"Framework :: Django :: 2.2",
|
||||||
"Framework :: Django :: 3.0",
|
|
||||||
"Framework :: Django :: 3.1",
|
"Framework :: Django :: 3.1",
|
||||||
"Framework :: Django :: 3.2",
|
"Framework :: Django :: 3.2",
|
||||||
"Programming Language :: Python",
|
"Programming Language :: Python",
|
||||||
"Programming Language :: Python :: 2",
|
|
||||||
"Programming Language :: Python :: 2.7",
|
|
||||||
"Programming Language :: Python :: 3",
|
"Programming Language :: Python :: 3",
|
||||||
"Programming Language :: Python :: 3.5",
|
|
||||||
"Programming Language :: Python :: 3.6",
|
"Programming Language :: Python :: 3.6",
|
||||||
"Programming Language :: Python :: 3.7",
|
"Programming Language :: Python :: 3.7",
|
||||||
"Programming Language :: Python :: 3.8",
|
"Programming Language :: Python :: 3.8",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import unittest
|
import unittest
|
||||||
|
import unittest.mock as mock
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.db.migrations import Migration
|
from django.db.migrations import Migration
|
||||||
@@ -12,11 +12,6 @@ from django_migration_linter import (
|
|||||||
get_migration_abspath,
|
get_migration_abspath,
|
||||||
)
|
)
|
||||||
|
|
||||||
if sys.version_info >= (3, 3):
|
|
||||||
import unittest.mock as mock
|
|
||||||
else:
|
|
||||||
import mock
|
|
||||||
|
|
||||||
|
|
||||||
class OperationsIgnoreMigration(Migration):
|
class OperationsIgnoreMigration(Migration):
|
||||||
operations = [IgnoreMigration()]
|
operations = [IgnoreMigration()]
|
||||||
|
|||||||
@@ -1,20 +1,10 @@
|
|||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import tempfile
|
||||||
|
import unittest.mock as mock
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
from importlib import import_module
|
from importlib import import_module
|
||||||
|
from io import StringIO
|
||||||
if sys.version_info >= (3, 3):
|
|
||||||
import unittest.mock as mock
|
|
||||||
else:
|
|
||||||
import mock
|
|
||||||
|
|
||||||
if sys.version_info.major >= 3:
|
|
||||||
import tempfile
|
|
||||||
from io import StringIO as StringIO
|
|
||||||
else:
|
|
||||||
from backports import tempfile
|
|
||||||
from io import BytesIO as StringIO
|
|
||||||
|
|
||||||
from django.apps import apps
|
from django.apps import apps
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|||||||
@@ -1,16 +1,12 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist =
|
envlist =
|
||||||
py27-django111
|
py{36,37,38,39}-django22
|
||||||
py{35,36,37,38}-django{111,20,21}
|
py{36,37,38,39}-django{31,32}
|
||||||
py{35,36,37,38,39}-django22
|
|
||||||
py{36,37,38,39}-django{30,31,32}
|
|
||||||
lint
|
lint
|
||||||
coverage
|
coverage
|
||||||
|
|
||||||
[gh-actions]
|
[gh-actions]
|
||||||
python =
|
python =
|
||||||
2.7: py27
|
|
||||||
3.5: py35
|
|
||||||
3.6: py36
|
3.6: py36
|
||||||
3.7: py37
|
3.7: py37
|
||||||
3.8: py38
|
3.8: py38
|
||||||
@@ -21,16 +17,12 @@ commands = ./manage.py test --no-input {posargs}
|
|||||||
extras = test
|
extras = test
|
||||||
pip_pre = true
|
pip_pre = true
|
||||||
deps =
|
deps =
|
||||||
django111: django>=1.11,<2.0
|
|
||||||
django20: django>=2.0,<2.1
|
|
||||||
django21: django>=2.1,<2.2
|
|
||||||
django22: django>=2.2,<2.3
|
django22: django>=2.2,<2.3
|
||||||
django30: django>=3.0,<3.1
|
|
||||||
django31: django>=3.1,<3.2
|
django31: django>=3.1,<3.2
|
||||||
django32: django>=3.2,<3.3
|
django32: django>=3.2,<3.3
|
||||||
|
|
||||||
[testenv:lint]
|
[testenv:lint]
|
||||||
basepython = python3.6
|
basepython = python3.8
|
||||||
deps =
|
deps =
|
||||||
-r requirements/dev.txt
|
-r requirements/dev.txt
|
||||||
commands =
|
commands =
|
||||||
|
|||||||
Reference in new issue
Block a user