diff options
| author | Tim Graham <timograham@gmail.com> | 2014-11-24 08:34:02 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-01-17 09:00:17 -0500 |
| commit | fed25f1105ff0d5fe46cd217b29371ee7f1907f2 (patch) | |
| tree | 7b5320882f1034a65047948c30d56f38b28a5ba3 /django/core | |
| parent | 4e65f195e1b10d83bb7edc38c908747c4fd537b8 (diff) | |
Removed compatibility with Python 3.2.
Diffstat (limited to 'django/core')
| -rw-r--r-- | django/core/mail/message.py | 7 | ||||
| -rw-r--r-- | django/core/management/__init__.py | 2 |
2 files changed, 1 insertions, 8 deletions
diff --git a/django/core/mail/message.py b/django/core/mail/message.py index 8d2dc0b72d..b895cd6f78 100644 --- a/django/core/mail/message.py +++ b/django/core/mail/message.py @@ -104,12 +104,7 @@ def sanitize_address(addr, encoding): if isinstance(addr, six.string_types): addr = parseaddr(force_text(addr)) nm, addr = addr - # This try-except clause is needed on Python 3 < 3.2.4 - # http://bugs.python.org/issue14291 - try: - nm = Header(nm, encoding).encode() - except UnicodeEncodeError: - nm = Header(nm, 'utf-8').encode() + nm = Header(nm, encoding).encode() try: addr.encode('ascii') except UnicodeEncodeError: # IDN diff --git a/django/core/management/__init__.py b/django/core/management/__init__.py index f7504794e3..0254dcbefe 100644 --- a/django/core/management/__init__.py +++ b/django/core/management/__init__.py @@ -25,8 +25,6 @@ def find_commands(management_dir): Returns an empty list if no commands are defined. """ command_dir = os.path.join(management_dir, 'commands') - # Workaround for a Python 3.2 bug with pkgutil.iter_modules - sys.path_importer_cache.pop(command_dir, None) return [name for _, name, is_pkg in pkgutil.iter_modules([command_dir]) if not is_pkg and not name.startswith('_')] |
