Skip to content

Commit 2d59e54

Browse files
committed
Fix typing that was used and is incompatible with pymongo3.7
1 parent 79dfcdb commit 2d59e54

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

mongoengine/connection.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
import warnings
22

33
from pymongo import MongoClient, ReadPreference, uri_parser
4-
from pymongo.common import (
5-
_UUID_REPRESENTATIONS,
6-
_CaseInsensitiveDictionary,
7-
)
4+
from pymongo.common import _UUID_REPRESENTATIONS
85
from pymongo.database import _check_name
96

107
# DriverInfo was added in PyMongo 3.7.
@@ -135,7 +132,9 @@ def _get_connection_settings(
135132
if uri_dict.get(param):
136133
conn_settings[param] = uri_dict[param]
137134

138-
uri_options: _CaseInsensitiveDictionary = uri_dict["options"]
135+
uri_options = uri_dict[
136+
"options"
137+
] # uri_options is a _CaseInsensitiveDictionary
139138
if "replicaset" in uri_options:
140139
conn_settings["replicaSet"] = uri_options["replicaset"]
141140
if "authsource" in uri_options:

tox.ini

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ envlist = pypy3-{mg34,mg36,mg39,mg311,mg312,mg4,mg432,mg441,mg460}
55
commands =
66
python setup.py test {posargs}
77
deps =
8-
mg34: pymongo>=3.4,<3.5
9-
mg36: pymongo>=3.6,<3.7
108
mg39: pymongo>=3.9,<3.10
119
mg311: pymongo>=3.11,<3.12
1210
mg312: pymongo>=3.12,<3.13

0 commit comments

Comments
 (0)