# -*- coding: utf-8 -*-

from pymongo.objectid import ObjectId

from scalymongo.document import Document
from scalymongo.connection import Connection
from scalymongo.schema_operators import OR, IS

# -*- coding: utf-8 -*-

from bson.objectid import ObjectId

from scalymongo.document import Document
from scalymongo.connection import Connection
from scalymongo.schema_operators import OR, IS

Use ObjectId from bson instead of pymongo
import: Use ObjectId from bson instead of pymongo

pymongo >= 2.2 stops importing ObjectId from bson
so it need to be pulled in directly.