Skip to content

Commit

Permalink
Remove redundant __future__ imports
Browse files Browse the repository at this point in the history
  • Loading branch information
nrvnrvn committed Aug 3, 2014
1 parent 6ff525e commit 5804658
Show file tree
Hide file tree
Showing 15 changed files with 9 additions and 32 deletions.
2 changes: 0 additions & 2 deletions boto/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
"""
Handles basic connections to AWS
"""
from __future__ import with_statement

from datetime import datetime
import errno
import os
Expand Down
2 changes: 0 additions & 2 deletions boto/glacier/concurrent.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
from __future__ import with_statement

import os
import math
import threading
Expand Down
3 changes: 1 addition & 2 deletions boto/glacier/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
from __future__ import with_statement
import math
import socket

Expand Down Expand Up @@ -124,7 +123,7 @@ def download_to_file(self, filename, chunk_size=DefaultPartSize,
verify_hashes, retry_exceptions)

def download_to_fileobj(self, output_file, chunk_size=DefaultPartSize,
verify_hashes=True,
verify_hashes=True,
retry_exceptions=(socket.error,)):
"""Download an archive to a file object.
Expand Down
1 change: 0 additions & 1 deletion boto/glacier/vault.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
from __future__ import with_statement
import codecs
from boto.compat import six
from boto.glacier.exceptions import UploadArchiveError
Expand Down
2 changes: 1 addition & 1 deletion boto/manage/volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
from __future__ import with_statement, print_function
from __future__ import print_function

from boto.sdb.db.model import Model
from boto.sdb.db.property import StringProperty, IntegerProperty, ListProperty, ReferenceProperty, CalculatedProperty
Expand Down
1 change: 0 additions & 1 deletion boto/regioninfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
from __future__ import with_statement
import os

import boto
Expand Down
2 changes: 0 additions & 2 deletions boto/s3/key.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
from __future__ import with_statement

import email.utils
import errno
import hashlib
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.

from __future__ import with_statement, print_function
from __future__ import print_function

try:
from setuptools import setup
Expand Down
2 changes: 0 additions & 2 deletions tests/integration/dynamodb2/test_highlevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
"""
Tests for DynamoDB v2 high-level abstractions.
"""
from __future__ import with_statement

import os
import time

Expand Down
2 changes: 0 additions & 2 deletions tests/integration/ses/test_connection.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import with_statement

from tests.unit import unittest

from boto.ses.connection import SESConnection
Expand Down
2 changes: 0 additions & 2 deletions tests/integration/sns/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
from __future__ import with_statement

from tests.compat import mock, unittest
from boto.compat import http_client
from boto.sns import connect_to_region
Expand Down
8 changes: 3 additions & 5 deletions tests/integration/sqs/test_bigmessage.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
"""
Some unit tests for the SQSConnection
"""
from __future__ import with_statement

import time
from threading import Timer
from tests.unit import unittest
Expand All @@ -42,7 +40,7 @@ class TestBigMessage(unittest.TestCase):

def test_1_basic(self):
c = boto.connect_sqs()

# create a queue so we can test BigMessage
queue_name = 'test%d' % int(time.time())
timeout = 60
Expand All @@ -61,15 +59,15 @@ def test_1_basic(self):
fp = StringIO(msg_body)
s3_url = 's3://%s' % queue_name
message = queue.new_message(fp, s3_url=s3_url)

queue.write(message)
time.sleep(30)

s3_object_name = message.s3_url.split('/')[-1]

# Make sure msg body is in bucket
self.assertTrue(bucket.lookup(s3_object_name))

m = queue.read()
self.assertEqual(m.get_body().decode('utf-8'), msg_body)

Expand Down
2 changes: 0 additions & 2 deletions tests/unit/emr/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
from __future__ import with_statement

import boto.utils

from datetime import datetime
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/s3/test_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
from __future__ import with_statement

from tests.compat import mock, unittest
from tests.unit import AWSMockServiceTestCase

Expand Down
8 changes: 3 additions & 5 deletions tests/unit/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
from __future__ import with_statement

import os
import socket

Expand Down Expand Up @@ -116,7 +114,7 @@ def test_get_path(self):
self.assertEqual(conn.get_path('/folder//image.jpg'), '/folder//image.jpg')
self.assertEqual(conn.get_path('/folder////image.jpg'), '/folder////image.jpg')
self.assertEqual(conn.get_path('///folder////image.jpg'), '///folder////image.jpg')

def test_connection_behind_proxy(self):
os.environ['http_proxy'] = "http://john.doe:p4ssw0rd@127.0.0.1:8180"
conn = AWSAuthConnection(
Expand All @@ -130,7 +128,7 @@ def test_connection_behind_proxy(self):
self.assertEqual(conn.proxy_pass, 'p4ssw0rd')
self.assertEqual(conn.proxy_port, '8180')
del os.environ['http_proxy']

def test_connection_behind_proxy_without_explicit_port(self):
os.environ['http_proxy'] = "http://127.0.0.1"
conn = AWSAuthConnection(
Expand All @@ -139,7 +137,7 @@ def test_connection_behind_proxy_without_explicit_port(self):
aws_secret_access_key='secret',
suppress_consec_slashes=False,
port=8180
)
)
self.assertEqual(conn.proxy, '127.0.0.1')
self.assertEqual(conn.proxy_port, 8180)
del os.environ['http_proxy']
Expand Down

0 comments on commit 5804658

Please sign in to comment.