From 033a6a79f8a86d67eb7568b605d3a04bab6597fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sun, 17 Apr 2022 11:15:02 +0200 Subject: [PATCH] trivial: remove usage of obsolete python_2_unicode_compatible (#64293) --- bijoe/engine.py | 3 --- bijoe/visualization/models.py | 2 -- 2 files changed, 5 deletions(-) diff --git a/bijoe/engine.py b/bijoe/engine.py index a336eff..0b57f2a 100644 --- a/bijoe/engine.py +++ b/bijoe/engine.py @@ -25,7 +25,6 @@ import psycopg2 from django.conf import settings from django.core.cache import cache from django.utils.encoding import force_bytes, force_text -from django.utils.six import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ from . import schemas @@ -34,7 +33,6 @@ psycopg2.extensions.register_type(psycopg2.extensions.UNICODE) psycopg2.extensions.register_type(psycopg2.extensions.UNICODEARRAY) -@python_2_unicode_compatible class DimensionCell(collections.namedtuple('_Cell', ['dimension', 'value', 'value_label'])): @property def label(self): @@ -51,7 +49,6 @@ class DimensionCell(collections.namedtuple('_Cell', ['dimension', 'value', 'valu return force_text(self.label) -@python_2_unicode_compatible class MeasureCell(collections.namedtuple('_Cell', ['measure', 'value'])): @property def label(self): diff --git a/bijoe/visualization/models.py b/bijoe/visualization/models.py index f8805df..87fd304 100644 --- a/bijoe/visualization/models.py +++ b/bijoe/visualization/models.py @@ -19,7 +19,6 @@ import json from django.db import models from django.http import Http404 -from django.utils.six import python_2_unicode_compatible from django.utils.text import slugify from django.utils.translation import ugettext_lazy as _ from jsonfield import JSONField @@ -39,7 +38,6 @@ class JSONEncoder(json.JSONEncoder): return json.JSONEncoder.default(self, obj) -@python_2_unicode_compatible class Visualization(models.Model): slug = models.SlugField(verbose_name=_('Identifier'), unique=True) name = models.TextField(verbose_name=_('name'))