mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Took advantage of django.utils.six.moves.urllib.*.
This commit is contained in:
@@ -8,10 +8,6 @@ import sys
|
||||
import tempfile
|
||||
import time
|
||||
import unittest
|
||||
try:
|
||||
from urllib.request import urlopen
|
||||
except ImportError: # Python 2
|
||||
from urllib2 import urlopen
|
||||
import zlib
|
||||
from datetime import datetime, timedelta
|
||||
from io import BytesIO
|
||||
@@ -28,9 +24,10 @@ from django.core.files.images import get_image_dimensions
|
||||
from django.core.files.storage import FileSystemStorage, get_storage_class
|
||||
from django.core.files.uploadedfile import UploadedFile
|
||||
from django.test import LiveServerTestCase, SimpleTestCase
|
||||
from django.utils import six
|
||||
from django.utils._os import upath
|
||||
from django.test.utils import override_settings
|
||||
from django.utils import six
|
||||
from django.utils.six.moves.urllib.request import urlopen
|
||||
from django.utils._os import upath
|
||||
|
||||
try:
|
||||
from django.utils.image import Image
|
||||
|
||||
Reference in New Issue
Block a user