From 1fc70d7504dd94211f1bd406462a970a52aad537 Mon Sep 17 00:00:00 2001 From: Ivan Kolodyazhny Date: Mon, 9 Mar 2020 14:54:07 +0200 Subject: [PATCH] Remove python_2_unicode_compatible usage Since we don't support Python 2 anymore, we don't need to use python_2_unicode_compatible decorator. Change-Id: I2aafc8d07ba95571b381ff65ba9e5c0044e2d959 --- horizon/base.py | 2 -- horizon/forms/fields.py | 3 --- 2 files changed, 5 deletions(-) diff --git a/horizon/base.py b/horizon/base.py index 9e8a6d8149..e972732046 100644 --- a/horizon/base.py +++ b/horizon/base.py @@ -33,7 +33,6 @@ from django.conf.urls import include from django.conf.urls import url from django.core.exceptions import ImproperlyConfigured from django.urls import reverse -from django.utils.encoding import python_2_unicode_compatible from django.utils.functional import empty from django.utils.functional import SimpleLazyObject from django.utils.module_loading import module_has_submodule @@ -105,7 +104,6 @@ class NotRegistered(Exception): pass -@python_2_unicode_compatible class HorizonComponent(object): policy_rules = tuple() diff --git a/horizon/forms/fields.py b/horizon/forms/fields.py index 9833fcb72a..2710db07d4 100644 --- a/horizon/forms/fields.py +++ b/horizon/forms/fields.py @@ -28,7 +28,6 @@ from django.forms import widgets from django.template.loader import get_template from django import urls from django.utils.encoding import force_text -from django.utils.encoding import python_2_unicode_compatible from django.utils.functional import Promise from django.utils import html from django.utils.safestring import mark_safe @@ -435,7 +434,6 @@ class ThemableCheckboxInput(widgets.CheckboxInput): # NOTE(adriant): SubWidget was removed in Django 1.11 and thus has been moved # to our codebase until we redo how we handle widgets. @html.html_safe -@python_2_unicode_compatible class SubWidget(object): """SubWidget class from django 1.10.7 codebase @@ -458,7 +456,6 @@ class SubWidget(object): # Django 1.11 so ChoiceInput has been moved to our codebase until we redo how # we handle widgets. @html.html_safe -@python_2_unicode_compatible class ChoiceInput(SubWidget): """ChoiceInput class from django 1.10.7 codebase