Skip to content

Commit

Permalink
remove all occurences of python_2_unicode_compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
jrief committed May 4, 2020
1 parent 54dbba6 commit 8ed7959
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 17 deletions.
2 changes: 0 additions & 2 deletions email_auth/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from django.contrib.auth import get_user_model
from django.contrib.auth.models import AbstractUser, UserManager as BaseUserManager
from django.core.exceptions import ValidationError
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _


Expand All @@ -19,7 +18,6 @@ def get_by_natural_key(self, username):
return self.get(is_active=True, email=username)


@python_2_unicode_compatible
class User(AbstractUser):
"""
Alternative implementation of Django's User model allowing to authenticate against the email
Expand Down
2 changes: 0 additions & 2 deletions shop/models/customer.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from django.db.models.fields import FieldDoesNotExist
from django.dispatch import receiver
from django.utils import timezone
from django.utils.encoding import python_2_unicode_compatible
from django.utils.functional import SimpleLazyObject
from django.utils.translation import ugettext_lazy as _

Expand Down Expand Up @@ -176,7 +175,6 @@ def get_or_create_from_request(self, request):
return customer


@python_2_unicode_compatible
class BaseCustomer(models.Model, metaclass=deferred.ForeignKeyBuilder):
"""
Base class for shop customers.
Expand Down
3 changes: 0 additions & 3 deletions shop/models/defaults/commodity.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from django.conf import settings
from django.core.validators import MinValueValidator
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from cms.models.fields import PlaceholderField
from filer.fields import image
Expand Down Expand Up @@ -41,7 +40,6 @@ class ProductManager(BaseProductManager, TranslatableManager):
queryset_class = ProductQuerySet


@python_2_unicode_compatible
class Commodity(CMSPageReferenceMixin, TranslatableModelMixin, CommodityMixin, BaseProduct):
"""
Generic Product Commodity to be used whenever the merchant does not require product specific
Expand Down Expand Up @@ -144,7 +142,6 @@ class Meta:

else:

@python_2_unicode_compatible
class Commodity(CMSPageReferenceMixin, CommodityMixin, BaseProduct):
"""
Generic Product Commodity to be used whenever the merchant does not require product specific
Expand Down
2 changes: 0 additions & 2 deletions shop/models/delivery.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
from django.core import checks
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _

from shop import deferred
from shop.models.order import BaseOrder, BaseOrderItem, OrderItemModel
from shop.modifiers.pool import cart_modifiers_pool


@python_2_unicode_compatible
class BaseDelivery(models.Model, metaclass=deferred.ForeignKeyBuilder):
"""
Shipping provider to keep track on each delivery.
Expand Down
2 changes: 0 additions & 2 deletions shop/models/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import six
from django.conf import settings
from django.db import models
from django.utils.six import python_2_unicode_compatible, string_types
from django.utils.encoding import force_text
from django.utils.translation import ugettext_lazy as _

Expand Down Expand Up @@ -74,7 +73,6 @@ def default(cls):
return None


@python_2_unicode_compatible
class ChoiceEnum(enum.Enum, metaclass=ChoiceEnumMeta):
"""
Utility class to handle choices in Django model and/or form fields.
Expand Down
4 changes: 0 additions & 4 deletions shop/models/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from django.db import models, transaction
from django.db.models.aggregates import Sum
from django.urls import NoReverseMatch, reverse
from django.utils.encoding import python_2_unicode_compatible
from django.utils.functional import cached_property
from django.utils.translation import ugettext_lazy as _, pgettext_lazy, get_language_from_request

Expand Down Expand Up @@ -136,7 +135,6 @@ def add_to_auto_transitions(cls, base):
return result


@python_2_unicode_compatible
class BaseOrder(models.Model, metaclass=WorkflowMixinMetaclass):
"""
An Order is the "in process" counterpart of the shopping cart, which freezes the state of the
Expand Down Expand Up @@ -412,7 +410,6 @@ def status_name(self):
OrderModel = deferred.MaterializedModel(BaseOrder)


@python_2_unicode_compatible
class OrderPayment(models.Model, metaclass=deferred.ForeignKeyBuilder):
"""
A model to hold received payments for a given order.
Expand Down Expand Up @@ -453,7 +450,6 @@ def __str__(self):
return _("Payment ID: {}").format(self.id)


@python_2_unicode_compatible
class BaseOrderItem(models.Model, metaclass=deferred.ForeignKeyBuilder):
"""
An item for an order.
Expand Down
2 changes: 0 additions & 2 deletions shop/money/money_maker.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
from decimal import Decimal, InvalidOperation
from django.conf import settings
from django.utils import six
from django.utils.encoding import python_2_unicode_compatible
from django.utils.formats import get_format
from django.utils.translation import get_language
from cms.utils.helpers import classproperty
from shop.conf import app_settings
from shop.money.iso4217 import CURRENCIES


@python_2_unicode_compatible
class AbstractMoney(Decimal):
MONEY_FORMAT = app_settings.MONEY_FORMAT

Expand Down

0 comments on commit 8ed7959

Please sign in to comment.