Loading django/apps/config.py +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ class AppConfig(object): """Attempt to determine app's filesystem path from its module.""" # See #21874 for extended discussion of the behavior of this method in # various cases. # Convert paths to list because Python 3.3 _NamespacePath does not # Convert paths to list because Python 3's _NamespacePath does not # support indexing. paths = list(getattr(module, '__path__', [])) if len(paths) != 1: Loading django/core/mail/message.py +1 −8 Original line number Diff line number Diff line Loading @@ -3,7 +3,6 @@ from __future__ import unicode_literals import mimetypes import os import random import sys import time from email import ( charset as Charset, encoders as Encoders, generator, message_from_string, Loading Loading @@ -170,12 +169,6 @@ class SafeMIMEText(MIMEMixin, MIMEText): # We do it manually and trigger re-encoding of the payload. MIMEText.__init__(self, _text, _subtype, None) del self['Content-Transfer-Encoding'] # Workaround for versions without http://bugs.python.org/issue19063 if (3, 2) < sys.version_info < (3, 3, 4): payload = _text.encode(utf8_charset.output_charset) self._payload = payload.decode('ascii', 'surrogateescape') self.set_charset(utf8_charset) else: self.set_payload(_text, utf8_charset) self.replace_header('Content-Type', 'text/%s; charset="%s"' % (_subtype, _charset)) elif _charset is None: Loading django/db/backends/sqlite3/features.py +2 −3 Original line number Diff line number Diff line from __future__ import unicode_literals import sys from django.db import utils from django.db.backends.base.features import BaseDatabaseFeatures from django.utils import six from django.utils.functional import cached_property from .base import Database Loading Loading @@ -50,7 +49,7 @@ class DatabaseFeatures(BaseDatabaseFeatures): @cached_property def can_share_in_memory_db(self): return ( sys.version_info[:2] >= (3, 4) and six.PY3 and Database.__name__ == 'sqlite3.dbapi2' and Database.sqlite_version_info >= (3, 7, 13) ) Loading django/dispatch/dispatcher.py +3 −2 Original line number Diff line number Diff line Loading @@ -3,11 +3,12 @@ import threading import warnings import weakref from django.utils import six from django.utils.deprecation import RemovedInDjango21Warning from django.utils.inspect import func_accepts_kwargs from django.utils.six.moves import range if sys.version_info < (3, 4): if six.PY2: from .weakref_backports import WeakMethod else: from weakref import WeakMethod Loading Loading @@ -108,7 +109,7 @@ class Signal(object): if hasattr(receiver, '__self__') and hasattr(receiver, '__func__'): ref = WeakMethod receiver_object = receiver.__self__ if sys.version_info >= (3, 4): if six.PY3: receiver = ref(receiver) weakref.finalize(receiver_object, self._remove_receiver) else: Loading django/utils/functional.py +1 −1 Original line number Diff line number Diff line Loading @@ -251,7 +251,7 @@ class LazyObject(object): self._setup() return self._wrapped.__dict__ # Python 3.3 will call __reduce__ when pickling; this method is needed # Python 3 will call __reduce__ when pickling; this method is needed # to serialize and deserialize correctly. @classmethod def __newobj__(cls, *args): Loading Loading
django/apps/config.py +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ class AppConfig(object): """Attempt to determine app's filesystem path from its module.""" # See #21874 for extended discussion of the behavior of this method in # various cases. # Convert paths to list because Python 3.3 _NamespacePath does not # Convert paths to list because Python 3's _NamespacePath does not # support indexing. paths = list(getattr(module, '__path__', [])) if len(paths) != 1: Loading
django/core/mail/message.py +1 −8 Original line number Diff line number Diff line Loading @@ -3,7 +3,6 @@ from __future__ import unicode_literals import mimetypes import os import random import sys import time from email import ( charset as Charset, encoders as Encoders, generator, message_from_string, Loading Loading @@ -170,12 +169,6 @@ class SafeMIMEText(MIMEMixin, MIMEText): # We do it manually and trigger re-encoding of the payload. MIMEText.__init__(self, _text, _subtype, None) del self['Content-Transfer-Encoding'] # Workaround for versions without http://bugs.python.org/issue19063 if (3, 2) < sys.version_info < (3, 3, 4): payload = _text.encode(utf8_charset.output_charset) self._payload = payload.decode('ascii', 'surrogateescape') self.set_charset(utf8_charset) else: self.set_payload(_text, utf8_charset) self.replace_header('Content-Type', 'text/%s; charset="%s"' % (_subtype, _charset)) elif _charset is None: Loading
django/db/backends/sqlite3/features.py +2 −3 Original line number Diff line number Diff line from __future__ import unicode_literals import sys from django.db import utils from django.db.backends.base.features import BaseDatabaseFeatures from django.utils import six from django.utils.functional import cached_property from .base import Database Loading Loading @@ -50,7 +49,7 @@ class DatabaseFeatures(BaseDatabaseFeatures): @cached_property def can_share_in_memory_db(self): return ( sys.version_info[:2] >= (3, 4) and six.PY3 and Database.__name__ == 'sqlite3.dbapi2' and Database.sqlite_version_info >= (3, 7, 13) ) Loading
django/dispatch/dispatcher.py +3 −2 Original line number Diff line number Diff line Loading @@ -3,11 +3,12 @@ import threading import warnings import weakref from django.utils import six from django.utils.deprecation import RemovedInDjango21Warning from django.utils.inspect import func_accepts_kwargs from django.utils.six.moves import range if sys.version_info < (3, 4): if six.PY2: from .weakref_backports import WeakMethod else: from weakref import WeakMethod Loading Loading @@ -108,7 +109,7 @@ class Signal(object): if hasattr(receiver, '__self__') and hasattr(receiver, '__func__'): ref = WeakMethod receiver_object = receiver.__self__ if sys.version_info >= (3, 4): if six.PY3: receiver = ref(receiver) weakref.finalize(receiver_object, self._remove_receiver) else: Loading
django/utils/functional.py +1 −1 Original line number Diff line number Diff line Loading @@ -251,7 +251,7 @@ class LazyObject(object): self._setup() return self._wrapped.__dict__ # Python 3.3 will call __reduce__ when pickling; this method is needed # Python 3 will call __reduce__ when pickling; this method is needed # to serialize and deserialize correctly. @classmethod def __newobj__(cls, *args): Loading