Skip to content

Commit 25cb348

Browse files
committed
PYTHON-1383 - Don't mention "connect=False" in fork warning
1 parent 89b3c4a commit 25cb348

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pymongo/topology.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,18 +137,18 @@ def open(self):
137137
by mutual exclusion. Using Topology from a process other than the one
138138
that initialized it will emit a warning and may result in deadlock. To
139139
prevent this from happening, MongoClient must be created after any
140-
forking OR MongoClient must be started with connect=False.
140+
forking.
141141
142142
"""
143143
if self._pid is None:
144144
self._pid = os.getpid()
145145
else:
146146
if os.getpid() != self._pid:
147147
warnings.warn(
148-
"MongoClient opened before fork. Create MongoClient "
149-
"with connect=False, or create client after forking. "
150-
"See PyMongo's documentation for details: http://api."
151-
"mongodb.org/python/current/faq.html#pymongo-fork-safe>")
148+
"MongoClient opened before fork. Create MongoClient only "
149+
"after forking. See PyMongo's documentation for details: "
150+
"http://api.mongodb.org/python/current/faq.html#"
151+
"is-pymongo-fork-safe")
152152

153153
with self._lock:
154154
self._ensure_opened()

0 commit comments

Comments
 (0)