From abeed587b119197270a885830619694b2c5ba1f1 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Tue, 25 Sep 2018 06:54:06 -0700 Subject: [PATCH] Refs #27795 -- Removed force_bytes() usage in db/backends/base/schema.py. --- django/db/backends/base/schema.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/django/db/backends/base/schema.py b/django/db/backends/base/schema.py index 9608e95afb..663e03dafe 100644 --- a/django/db/backends/base/schema.py +++ b/django/db/backends/base/schema.py @@ -9,7 +9,6 @@ from django.db.backends.utils import split_identifier from django.db.models import Index from django.db.transaction import TransactionManagementError, atomic from django.utils import timezone -from django.utils.encoding import force_bytes logger = logging.getLogger('django.db.backends.schema') @@ -144,7 +143,7 @@ class BaseDatabaseSchemaEditor: """ h = hashlib.md5() for arg in args: - h.update(force_bytes(arg)) + h.update(arg.encode()) return h.hexdigest()[:8] # Field <-> database mapping functions