Commits

Andy Mikhailenko  committed 740f471

Upgraded to PyMongo ≥ 2.2

  • Participants
  • Parent commits 5282ad1
  • Tags 0.28.2

Comments (0)

Files changed (3)

 Installation
 ------------
 
-    $  pip install doqu
+Using pip:
+
+    $ pip install doqu
+
+ArchLinux (AUR):
+
+    $ yaourt python2-doqu
 
 Documentation
 -------------
 # tests coverage, b) sphinx and setup.py properly import the version from a
 # single place so that I don't have to edit it always here and there.
 
-version = '0.28.1'
+version = '0.28.2'

File doqu/ext/mongodb/__init__.py

 
 """
 import pymongo
-from pymongo.objectid import ObjectId
+
+try:
+    from bson.objectid import ObjectId
+except ImportError:
+    # PyMongo ≤ 2.2
+    from pymongo.objectid import ObjectId
 
 from doqu.backend_base import BaseStorageAdapter, BaseQueryAdapter
 from doqu.utils.data_structures import CachedIterator