From 54133962319537db5e09dccc74834487abb998d2 Mon Sep 17 00:00:00 2001 From: Javier Matos Odut Date: Wed, 18 Mar 2020 01:01:50 +0100 Subject: [PATCH] Django 3.x removes six from django.utils. Removing unused imports. --- lib/mysql/connector/django/base.py | 5 ++--- lib/mysql/connector/django/client.py | 1 - lib/mysql/connector/django/compiler.py | 3 +-- lib/mysql/connector/django/creation.py | 1 - lib/mysql/connector/django/features.py | 2 -- lib/mysql/connector/django/introspection.py | 1 - lib/mysql/connector/django/operations.py | 3 +-- lib/mysql/connector/django/schema.py | 1 - lib/mysql/connector/django/validation.py | 2 -- 9 files changed, 4 insertions(+), 15 deletions(-) diff --git a/lib/mysql/connector/django/base.py b/lib/mysql/connector/django/base.py index c137746..cef0fbb 100644 --- a/lib/mysql/connector/django/base.py +++ b/lib/mysql/connector/django/base.py @@ -21,7 +21,7 @@ import sys import warnings -import django +import six from django.core.exceptions import ImproperlyConfigured from django.utils.functional import cached_property @@ -52,10 +52,9 @@ "is required; you have %s" % mysql.connector.__version__) from django.db import utils -from django.db.backends import utils as backend_utils from django.db.backends.base.base import BaseDatabaseWrapper from django.db.backends.signals import connection_created -from django.utils import (six, timezone, dateparse) +from django.utils import (timezone, dateparse) from django.conf import settings from mysql.connector.django.client import DatabaseClient diff --git a/lib/mysql/connector/django/client.py b/lib/mysql/connector/django/client.py index 07b3144..4e1da38 100644 --- a/lib/mysql/connector/django/client.py +++ b/lib/mysql/connector/django/client.py @@ -1,6 +1,5 @@ # MySQL Connector/Python - MySQL driver written in Python. -import django import subprocess from django.db.backends.base.client import BaseDatabaseClient diff --git a/lib/mysql/connector/django/compiler.py b/lib/mysql/connector/django/compiler.py index 076f703..8145430 100644 --- a/lib/mysql/connector/django/compiler.py +++ b/lib/mysql/connector/django/compiler.py @@ -1,9 +1,8 @@ # MySQL Connector/Python - MySQL driver written in Python. -import django from django.db.models.sql import compiler -from django.utils.six.moves import zip_longest +from six.moves import zip_longest class SQLCompiler(compiler.SQLCompiler): diff --git a/lib/mysql/connector/django/creation.py b/lib/mysql/connector/django/creation.py index 5580308..9a7de2d 100644 --- a/lib/mysql/connector/django/creation.py +++ b/lib/mysql/connector/django/creation.py @@ -1,6 +1,5 @@ # MySQL Connector/Python - MySQL driver written in Python. -import django from django.db import models from django.db.backends.base.creation import BaseDatabaseCreation diff --git a/lib/mysql/connector/django/features.py b/lib/mysql/connector/django/features.py index 47d53da..774749a 100644 --- a/lib/mysql/connector/django/features.py +++ b/lib/mysql/connector/django/features.py @@ -1,9 +1,7 @@ # MySQL Connector/Python - MySQL driver written in Python. -import django from django.db.backends.base.features import BaseDatabaseFeatures from django.utils.functional import cached_property -from django.utils import six try: import pytz diff --git a/lib/mysql/connector/django/introspection.py b/lib/mysql/connector/django/introspection.py index 4de6043..a10f834 100644 --- a/lib/mysql/connector/django/introspection.py +++ b/lib/mysql/connector/django/introspection.py @@ -4,7 +4,6 @@ import re from collections import namedtuple -import django from django.db.backends.base.introspection import ( BaseDatabaseIntrospection, FieldInfo, TableInfo ) diff --git a/lib/mysql/connector/django/operations.py b/lib/mysql/connector/django/operations.py index 798acd3..4e7c447 100644 --- a/lib/mysql/connector/django/operations.py +++ b/lib/mysql/connector/django/operations.py @@ -4,10 +4,9 @@ import uuid -import django from django.conf import settings from django.db.backends.base.operations import BaseDatabaseOperations -from django.utils import six, timezone +from django.utils import timezone from django.utils.encoding import force_text try: diff --git a/lib/mysql/connector/django/schema.py b/lib/mysql/connector/django/schema.py index 90cb10a..1eaace1 100644 --- a/lib/mysql/connector/django/schema.py +++ b/lib/mysql/connector/django/schema.py @@ -1,6 +1,5 @@ # MySQL Connector/Python - MySQL driver written in Python. -import django from django.db.backends.base.schema import BaseDatabaseSchemaEditor from django.db.models import NOT_PROVIDED diff --git a/lib/mysql/connector/django/validation.py b/lib/mysql/connector/django/validation.py index 24ca6ea..5d7f35d 100644 --- a/lib/mysql/connector/django/validation.py +++ b/lib/mysql/connector/django/validation.py @@ -1,7 +1,5 @@ # MySQL Connector/Python - MySQL driver written in Python. -import django - from django.db.backends.base.validation import BaseDatabaseValidation from django.core import checks from django.db import connection