oops, accidentally commited this along with previou changes
This commit is contained in:
parent
0dddac7218
commit
c3cb6b94db
@ -1,27 +1,28 @@
|
||||
# Copyright 2009-2010 10gen, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you
|
||||
# may not use this file except in compliance with the License. You
|
||||
# may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# permissions and limitations under the License.
|
||||
|
||||
"""Tools for connecting to MongoDB.
|
||||
|
||||
To connect to a single instance of MongoDB use :class:`Connection`. To connect
|
||||
to a replica pair use :meth:`~Connection.paired`.
|
||||
To connect to a single instance of MongoDB use :class:`Connection`. To
|
||||
connect to a replica pair use :meth:`~Connection.paired`.
|
||||
|
||||
.. seealso:: Module :mod:`~pymongo.master_slave_connection` for connecting to
|
||||
master-slave clusters.
|
||||
.. seealso:: Module :mod:`~pymongo.master_slave_connection` for
|
||||
connecting to master-slave clusters.
|
||||
|
||||
To get a :class:`~pymongo.database.Database` instance from a
|
||||
:class:`Connection` use either dictionary-style or attribute-style access:
|
||||
:class:`Connection` use either dictionary-style or attribute-style
|
||||
access:
|
||||
|
||||
.. doctest::
|
||||
|
||||
@ -75,9 +76,6 @@ class Pool(threading.local):
|
||||
if not hasattr(self, "sockets"):
|
||||
self.sockets = []
|
||||
|
||||
def __del__(self):
|
||||
self.return_socket()
|
||||
|
||||
def socket(self):
|
||||
# we store the pid here to avoid issues with fork /
|
||||
# multiprocessing - see
|
||||
|
||||
Loading…
Reference in New Issue
Block a user