1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Removed with_statement imports, useless in Python >= 2.6. Refs #17965. Thanks jonash for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17828 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Claude Paroz
2012-03-30 08:02:08 +00:00
parent 8bb5b60628
commit 9383a2761c
73 changed files with 35 additions and 104 deletions

View File

@@ -1,4 +1,4 @@
from __future__ import with_statement, absolute_import
from __future__ import absolute_import
from django.contrib import admin
from django.contrib.admin.options import IncorrectLookupParameters

View File

@@ -3,7 +3,6 @@ A series of tests to establish that the command-line managment tools work as
advertised - especially with regards to the handling of the DJANGO_SETTINGS_MODULE
and default settings.py files.
"""
from __future__ import with_statement
import os
import re

View File

@@ -1,5 +1,5 @@
# coding: utf-8
from __future__ import with_statement, absolute_import
from __future__ import absolute_import
import os
import re

View File

@@ -1,5 +1,5 @@
# encoding: utf-8
from __future__ import with_statement, absolute_import
from __future__ import absolute_import
from datetime import datetime

View File

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Unit and doctests for specific database backends.
from __future__ import with_statement, absolute_import
from __future__ import absolute_import
import datetime
import threading

View File

@@ -1,5 +1,3 @@
from __future__ import with_statement
from django.contrib import admin
from django.utils.unittest import TestCase
@@ -19,4 +17,4 @@ class Bug8245Test(TestCase):
# the first time, not an AlreadyRegistered error.
with self.assertRaises(Exception) as cm:
admin.autodiscover()
self.assertEqual(str(cm.exception), "Bad admin module")
self.assertEqual(str(cm.exception), "Bad admin module")

View File

@@ -1,4 +1,4 @@
from __future__ import with_statement, absolute_import
from __future__ import absolute_import
from operator import attrgetter

View File

@@ -2,7 +2,7 @@
# Unit tests for cache framework
# Uses whatever cache backend is set in the test settings file.
from __future__ import with_statement, absolute_import
from __future__ import absolute_import
import hashlib
import os

View File

@@ -1,4 +1,4 @@
from __future__ import absolute_import, with_statement
from __future__ import absolute_import
from django.contrib.comments.models import Comment

View File

@@ -1,4 +1,4 @@
from __future__ import with_statement, absolute_import
from __future__ import absolute_import
from django.contrib.comments.forms import CommentForm
from django.contrib.comments.models import Comment

View File

@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
from __future__ import with_statement
from django.conf import settings
from django.core.context_processors import csrf

View File

@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
from __future__ import with_statement
import datetime
import decimal

View File

@@ -1,4 +1,4 @@
from __future__ import with_statement, absolute_import
from __future__ import absolute_import
from operator import attrgetter

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import with_statement, absolute_import
from __future__ import absolute_import
import datetime

View File

@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
from __future__ import with_statement
from django.forms import *
from django.test import TestCase
from django.utils.translation import ugettext_lazy, override

View File

@@ -1,5 +1,3 @@
from __future__ import with_statement
import os
try:
from cStringIO import StringIO

View File

@@ -1,5 +1,4 @@
# -*- encoding: utf-8 -*-
from __future__ import with_statement
import os
import re

View File

@@ -1,5 +1,4 @@
# coding: utf-8
from __future__ import with_statement
import os

View File

@@ -1,5 +1,3 @@
from __future__ import with_statement
import os
import warnings

View File

@@ -1,5 +1,5 @@
# -*- encoding: utf-8 -*-
from __future__ import with_statement, absolute_import
from __future__ import absolute_import
import datetime
import decimal

View File

@@ -1,5 +1,3 @@
from __future__ import with_statement
import copy
from django.conf import compat_patch_logging_config
@@ -9,7 +7,6 @@ from django.test.utils import override_settings
from django.utils.log import CallbackFilter, RequireDebugFalse, getLogger
# logging config prior to using filter with mail_admins
OLD_LOGGING = {
'version': 1,

View File

@@ -1,4 +1,4 @@
from __future__ import absolute_import, with_statement
from __future__ import absolute_import
from django import forms
from django.forms.formsets import BaseFormSet, DELETION_FIELD_NAME

View File

@@ -1,4 +1,4 @@
from __future__ import absolute_import, with_statement
from __future__ import absolute_import
from datetime import date

View File

@@ -1,5 +1,3 @@
from __future__ import with_statement
import time
import warnings
from datetime import datetime, timedelta

View File

@@ -1,4 +1,4 @@
from __future__ import with_statement, absolute_import
from __future__ import absolute_import
from django.test import TestCase

View File

@@ -6,9 +6,7 @@ test case that is capable of testing the capabilities of
the serializers. This includes all valid data values, plus
forward, backwards and self references.
"""
# This is necessary in Python 2.5 to enable the with statement, in 2.6
# and up it is no longer necessary.
from __future__ import with_statement, absolute_import
from __future__ import absolute_import
import datetime
import decimal

View File

@@ -1,5 +1,3 @@
from __future__ import with_statement
import os
from django.conf import settings, global_settings

View File

@@ -1,5 +1,4 @@
# -*- encoding: utf-8 -*-
from __future__ import with_statement
import codecs
import os

View File

@@ -1,5 +1,3 @@
from __future__ import with_statement
import os
import pickle
import time

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import with_statement, absolute_import
from __future__ import absolute_import
from django.conf import settings

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import with_statement, absolute_import
from __future__ import absolute_import
from django.forms import EmailField, IntegerField
from django.http import HttpResponse

View File

@@ -1,5 +1,4 @@
# coding: utf-8
from __future__ import with_statement
from django.test import TestCase
from django.utils.encoding import iri_to_uri

View File

@@ -1,4 +1,4 @@
from __future__ import with_statement, absolute_import
from __future__ import absolute_import
import inspect
import os

View File

@@ -1,5 +1,5 @@
# -*- coding:utf-8 -*-
from __future__ import with_statement, absolute_import
from __future__ import absolute_import
import gettext
from os import path

View File

@@ -1,5 +1,3 @@
from __future__ import with_statement
from django.core.exceptions import ImproperlyConfigured
from django.core.servers.basehttp import get_internal_wsgi_application
from django.core.wsgi import get_wsgi_application