Compare commits

...

2 Commits

Author SHA1 Message Date
Georg K
f5fec0f374 feat: update code collection check 2022-02-03 20:16:03 +03:00
jar3b
dffcc0992d fix: imports to match v0.13 to python3.10 2021-11-05 18:10:25 +03:00
3 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
import copy
import numbers
from collections import Hashable
from collections.abc import Hashable
from functools import partial
from bson import ObjectId, json_util

View File

@ -808,7 +808,7 @@ class Document(BaseDocument):
collection = cls._get_collection()
# 746: when connection is via mongos, the read preference is not necessarily an indication that
# this code runs on a secondary
if not collection.is_mongos and collection.read_preference > 1:
if collection.is_mongos is not None and collection.read_preference.mode > 1:
return
# determine if an index which we are creating includes

View File

@ -6,7 +6,7 @@ import socket
import time
import uuid
import warnings
from collections import Mapping
from collections.abc import Mapping
from operator import itemgetter
from bson import Binary, DBRef, ObjectId, SON