From 118b47e6e3a97feec4bf13fe6270943df288277e Mon Sep 17 00:00:00 2001 From: "A. Jesse Jiryu Davis" Date: Thu, 17 Jul 2014 15:16:26 -0400 Subject: [PATCH] Unused imports. --- pymongo/cluster.py | 2 +- pymongo/common.py | 2 -- pymongo/cursor.py | 2 +- pymongo/mongo_client.py | 1 - pymongo/mongo_replica_set_client.py | 3 +-- pymongo/pool.py | 4 ++-- test/high_availability/test_ha.py | 1 - test/test_binary.py | 2 +- test/test_client.py | 3 +-- test/test_cursor.py | 2 +- test/test_database.py | 1 - 11 files changed, 8 insertions(+), 15 deletions(-) diff --git a/pymongo/cluster.py b/pymongo/cluster.py index e6c4b09a5..a126c95d5 100644 --- a/pymongo/cluster.py +++ b/pymongo/cluster.py @@ -16,8 +16,8 @@ import threading import time -from pymongo import common +from pymongo import common from pymongo.cluster_description import (updated_cluster_description, CLUSTER_TYPE, ClusterDescription) diff --git a/pymongo/common.py b/pymongo/common.py index b28936f29..439466698 100644 --- a/pymongo/common.py +++ b/pymongo/common.py @@ -15,14 +15,12 @@ """Functions and classes common to multiple pymongo modules.""" -import sys import warnings from pymongo.auth import MECHANISMS from pymongo.errors import ConfigurationError from pymongo.read_preferences import (make_read_preference, read_pref_mode_from_name, - ReadPreference, ServerMode) from pymongo.ssl_support import validate_cert_reqs from pymongo.write_concern import WriteConcern diff --git a/pymongo/cursor.py b/pymongo/cursor.py index 026914853..9889fbeb5 100644 --- a/pymongo/cursor.py +++ b/pymongo/cursor.py @@ -24,7 +24,7 @@ from bson.py3compat import (iteritems, integer_types, string_type) from bson.son import SON -from pymongo import helpers, message, read_preferences +from pymongo import helpers, message from pymongo.read_preferences import ReadPreference, SECONDARY_OK_COMMANDS from pymongo.errors import (AutoReconnect, CursorNotFound, diff --git a/pymongo/mongo_client.py b/pymongo/mongo_client.py index d1fa9afef..a579e2652 100644 --- a/pymongo/mongo_client.py +++ b/pymongo/mongo_client.py @@ -35,7 +35,6 @@ access: import datetime import random import socket -import struct import threading import time import warnings diff --git a/pymongo/mongo_replica_set_client.py b/pymongo/mongo_replica_set_client.py index be73903f6..3d46aaebe 100644 --- a/pymongo/mongo_replica_set_client.py +++ b/pymongo/mongo_replica_set_client.py @@ -34,7 +34,6 @@ attribute-style access: import atexit import datetime import socket -import struct import threading import time import weakref @@ -63,7 +62,7 @@ from pymongo.member import Member from pymongo.read_preferences import ( ReadPreference, select_member, MovingAverage) from pymongo.ssl_support import get_ssl_context -from pymongo.thread_util import DummyLock + EMPTY = b"" MAX_RETRY = 3 diff --git a/pymongo/pool.py b/pymongo/pool.py index 93d48810f..272ac57b3 100644 --- a/pymongo/pool.py +++ b/pymongo/pool.py @@ -16,14 +16,14 @@ import os import select import socket import struct -import sys import time import threading import weakref from bson import EMPTY from pymongo import thread_util -from pymongo.errors import ConnectionFailure, ConfigurationError +from pymongo.errors import ConnectionFailure + try: from ssl import match_hostname, CertificateError diff --git a/test/high_availability/test_ha.py b/test/high_availability/test_ha.py index 8b2b607e8..b0587fd92 100644 --- a/test/high_availability/test_ha.py +++ b/test/high_availability/test_ha.py @@ -19,7 +19,6 @@ # a replica set. Thus each method asserts everything we want to assert for a # given replica-set configuration. -import os import time import ha_tools diff --git a/test/test_binary.py b/test/test_binary.py index 9a76c888c..8a70f96e1 100644 --- a/test/test_binary.py +++ b/test/test_binary.py @@ -27,7 +27,7 @@ import bson from bson.binary import * from bson.py3compat import u from bson.son import SON -from test import client_context, unittest, SkipTest +from test import client_context, unittest from pymongo.mongo_client import MongoClient diff --git a/test/test_client.py b/test/test_client.py index dc6dca303..3f8d8ad8f 100644 --- a/test/test_client.py +++ b/test/test_client.py @@ -56,8 +56,7 @@ from test.utils import (assertRaisesExactly, lazy_client_trial, NTHREADS, get_pool, - one, - server_started_with_auth) + one) class TestClient(unittest.TestCase, TestRequestMixin): diff --git a/test/test_cursor.py b/test/test_cursor.py index 9482d5e5b..5ca371e79 100644 --- a/test/test_cursor.py +++ b/test/test_cursor.py @@ -36,7 +36,7 @@ from pymongo.errors import (InvalidOperation, OperationFailure, ExecutionTimeout) from test import client_context, SkipTest, unittest, host, port, IntegrationTest -from test.utils import is_mongos, get_command_line, server_started_with_auth +from test.utils import server_started_with_auth if PY3: long = int diff --git a/test/test_database.py b/test/test_database.py index ef779d284..62f9d0717 100644 --- a/test/test_database.py +++ b/test/test_database.py @@ -15,7 +15,6 @@ """Test the database module.""" import datetime -import os import re import sys import warnings