Skip to content

Commit 9fa43d4

Browse files
author
Mark Unsworth
committed
removed deprecated MongoReplicaSetClient and all now unused connection parameters
1 parent f3a2215 commit 9fa43d4

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

django_mongodb_engine/base.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -240,24 +240,19 @@ def pop(name, default=None):
240240
warnings.warn("slave_okay has been deprecated. "
241241
"Please use read_preference instead.")
242242

243-
if replicaset:
244-
connection_class = MongoReplicaSetClient
245-
else:
246-
connection_class = MongoClient
243+
244+
247245

248246
conn_options = dict(
249247
host=host,
250248
port=int(port),
251-
max_pool_size=None,
252249
document_class=dict,
253-
tz_aware=False,
254-
_connect=True,
255-
auto_start_request=True
250+
tz_aware=False
256251
)
257252
conn_options.update(options)
258253

259254
try:
260-
self.connection = connection_class(**conn_options)
255+
self.connection = MongoClient(**conn_options)
261256
self.database = self.connection[db_name]
262257
except TypeError:
263258
exc_info = sys.exc_info()

0 commit comments

Comments
 (0)