Skip to content

Commit

Permalink
More import removals
Browse files Browse the repository at this point in the history
Following the series of commits removing deprecated features in
Django 1.7, here are some more unneeded imports removed and other
minor cleanups.
  • Loading branch information
claudep committed Jun 29, 2013
1 parent c8756e1 commit 6118d6d
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 16 deletions.
2 changes: 0 additions & 2 deletions django/contrib/auth/forms.py
Original file line number Original file line Diff line number Diff line change
@@ -1,7 +1,5 @@
from __future__ import unicode_literals from __future__ import unicode_literals


import warnings

from django import forms from django import forms
from django.forms.util import flatatt from django.forms.util import flatatt
from django.template import loader from django.template import loader
Expand Down
6 changes: 0 additions & 6 deletions django/contrib/auth/models.py
Original file line number Original file line Diff line number Diff line change
@@ -1,8 +1,6 @@
from __future__ import unicode_literals from __future__ import unicode_literals
import re import re
import warnings


from django.core.exceptions import ImproperlyConfigured
from django.core.mail import send_mail from django.core.mail import send_mail
from django.core import validators from django.core import validators
from django.db import models from django.db import models
Expand Down Expand Up @@ -31,10 +29,6 @@ def update_last_login(sender, user, **kwargs):
user_logged_in.connect(update_last_login) user_logged_in.connect(update_last_login)




class SiteProfileNotAvailable(Exception):
pass


class PermissionManager(models.Manager): class PermissionManager(models.Manager):
def get_by_natural_key(self, codename, app_label, model): def get_by_natural_key(self, codename, app_label, model):
return self.get( return self.get(
Expand Down
2 changes: 1 addition & 1 deletion django/contrib/auth/tests/test_models.py
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.contrib.auth import get_user_model from django.contrib.auth import get_user_model
from django.contrib.auth.models import (Group, User, UserManager) from django.contrib.auth.models import Group, User, UserManager
from django.contrib.auth.tests.utils import skipIfCustomUser from django.contrib.auth.tests.utils import skipIfCustomUser
from django.db.models.signals import post_save from django.db.models.signals import post_save
from django.test import TestCase from django.test import TestCase
Expand Down
1 change: 0 additions & 1 deletion django/contrib/sitemaps/views.py
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,3 @@
import warnings
from functools import wraps from functools import wraps


from django.contrib.sites.models import get_current_site from django.contrib.sites.models import get_current_site
Expand Down
2 changes: 0 additions & 2 deletions django/shortcuts/__init__.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
of MVC. In other words, these functions/classes introduce controlled coupling of MVC. In other words, these functions/classes introduce controlled coupling
for convenience's sake. for convenience's sake.
""" """
import warnings

from django.template import loader, RequestContext from django.template import loader, RequestContext
from django.http import HttpResponse, Http404 from django.http import HttpResponse, Http404
from django.http import HttpResponseRedirect, HttpResponsePermanentRedirect from django.http import HttpResponseRedirect, HttpResponsePermanentRedirect
Expand Down
1 change: 0 additions & 1 deletion django/test/testcases.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import select import select
import socket import socket
import threading import threading
import warnings


from django.conf import settings from django.conf import settings
from django.contrib.staticfiles.handlers import StaticFilesHandler from django.contrib.staticfiles.handlers import StaticFilesHandler
Expand Down
2 changes: 1 addition & 1 deletion docs/ref/utils.txt
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ The functions defined in this module share the following properties:
========================= =========================


.. module:: django.utils.encoding .. module:: django.utils.encoding
:synopsis: A series of helper function to manage character encoding. :synopsis: A series of helper functions to manage character encoding.


.. function:: python_2_unicode_compatible .. function:: python_2_unicode_compatible


Expand Down
2 changes: 1 addition & 1 deletion tests/.coveragerc
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,5 @@
[run] [run]
omit = */django/contrib/*/tests*,*/django/utils/unittest*,*/django/utils/simplejson*,*/django/utils/importlib.py,*/django/test/_doctest.py,*/django/core/servers/fastcgi.py,*/django/utils/autoreload.py,*/django/utils/dictconfig.py omit = */django/contrib/*/tests*,*/django/utils/unittest*,*/django/utils/importlib.py,*/django/test/_doctest.py,*/django/core/servers/fastcgi.py,*/django/utils/autoreload.py,*/django/utils/dictconfig.py


[html] [html]
directory = coverage_html directory = coverage_html
1 change: 0 additions & 1 deletion tests/test_utils/tests.py
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals from __future__ import absolute_import, unicode_literals
import warnings


from django.db import connection from django.db import connection
from django.forms import EmailField, IntegerField from django.forms import EmailField, IntegerField
Expand Down

0 comments on commit 6118d6d

Please sign in to comment.