mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
Refs #23919 -- Removed python_2_unicode_compatible decorator usage
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
from django.db.utils import DatabaseError
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
|
||||
|
||||
class AmbiguityError(Exception):
|
||||
@@ -44,7 +43,6 @@ class IrreversibleError(RuntimeError):
|
||||
pass
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class NodeNotFoundError(LookupError):
|
||||
"""
|
||||
Raised when an attempt on a node is made that is not available in the graph.
|
||||
|
||||
@@ -6,7 +6,6 @@ from functools import total_ordering
|
||||
from django.db.migrations.state import ProjectState
|
||||
from django.utils import six
|
||||
from django.utils.datastructures import OrderedSet
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
|
||||
from .exceptions import CircularDependencyError, NodeNotFoundError
|
||||
|
||||
@@ -18,7 +17,6 @@ RECURSION_DEPTH_WARNING = (
|
||||
)
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
@total_ordering
|
||||
class Node(object):
|
||||
"""
|
||||
@@ -102,7 +100,6 @@ class DummyNode(Node):
|
||||
raise NodeNotFoundError(self.error_message, self.key, origin=self.origin)
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class MigrationGraph(object):
|
||||
"""
|
||||
Represents the digraph of all migrations in a project.
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
from django.db.transaction import atomic
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
|
||||
from .exceptions import IrreversibleError
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Migration(object):
|
||||
"""
|
||||
The base class for all migrations.
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
from django.apps.registry import Apps
|
||||
from django.db import models
|
||||
from django.db.utils import DatabaseError
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
from django.utils.timezone import now
|
||||
|
||||
from .exceptions import MigrationSchemaMissing
|
||||
@@ -20,7 +19,6 @@ class MigrationRecorder(object):
|
||||
a row in the table always means a migration is applied.
|
||||
"""
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Migration(models.Model):
|
||||
app = models.CharField(max_length=255)
|
||||
name = models.CharField(max_length=255)
|
||||
|
||||
@@ -27,9 +27,7 @@ from django.db.models.signals import (
|
||||
)
|
||||
from django.db.models.utils import make_model_tuple
|
||||
from django.utils import six
|
||||
from django.utils.encoding import (
|
||||
force_str, force_text, python_2_unicode_compatible,
|
||||
)
|
||||
from django.utils.encoding import force_str, force_text
|
||||
from django.utils.functional import curry
|
||||
from django.utils.six.moves import zip
|
||||
from django.utils.text import capfirst, get_text_list
|
||||
@@ -37,7 +35,6 @@ from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.version import get_version
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Deferred(object):
|
||||
def __repr__(self):
|
||||
return str('<Deferred field>')
|
||||
|
||||
@@ -25,9 +25,7 @@ from django.utils.dateparse import (
|
||||
parse_date, parse_datetime, parse_duration, parse_time,
|
||||
)
|
||||
from django.utils.duration import duration_string
|
||||
from django.utils.encoding import (
|
||||
force_bytes, force_text, python_2_unicode_compatible, smart_text,
|
||||
)
|
||||
from django.utils.encoding import force_bytes, force_text, smart_text
|
||||
from django.utils.functional import Promise, cached_property, curry
|
||||
from django.utils.ipv6 import clean_ipv6_address
|
||||
from django.utils.itercompat import is_iterable
|
||||
@@ -91,7 +89,6 @@ def return_None():
|
||||
|
||||
|
||||
@total_ordering
|
||||
@python_2_unicode_compatible
|
||||
class Field(RegisterLookupMixin):
|
||||
"""Base class for all field types"""
|
||||
|
||||
|
||||
@@ -5,10 +5,8 @@ from importlib import import_module
|
||||
from django.db import router
|
||||
from django.db.models.query import QuerySet
|
||||
from django.utils import six
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class BaseManager(object):
|
||||
# Tracks each time a Manager instance is created. Used to retain order.
|
||||
creation_counter = 0
|
||||
|
||||
@@ -16,7 +16,7 @@ from django.db.models.query_utils import PathInfo
|
||||
from django.utils import six
|
||||
from django.utils.datastructures import ImmutableList, OrderedSet
|
||||
from django.utils.deprecation import RemovedInDjango21Warning
|
||||
from django.utils.encoding import force_text, python_2_unicode_compatible
|
||||
from django.utils.encoding import force_text
|
||||
from django.utils.functional import cached_property
|
||||
from django.utils.text import camel_case_to_spaces, format_lazy
|
||||
from django.utils.translation import override
|
||||
@@ -67,7 +67,6 @@ def make_immutable_fields_list(name, data):
|
||||
return ImmutableList(data, warning=IMMUTABLE_WARNING % name)
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Options(object):
|
||||
FORWARD_PROPERTIES = {
|
||||
'fields', 'many_to_many', 'concrete_fields', 'local_concrete_fields',
|
||||
|
||||
Reference in New Issue
Block a user