Skip to content

Commit ce9e108

Browse files
authored
Merge pull request #2803 from bagerard/fix_pymongo37
Fix pymongo37 incompatibility
2 parents 79dfcdb + 1652b5b commit ce9e108

File tree

6 files changed

+10
-11
lines changed

6 files changed

+10
-11
lines changed

.github/workflows/github-actions.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
strategy:
5454
fail-fast: false
5555
matrix:
56-
python-version: [3.7, 3.8, 3.9, "3.10", 3.11, pypy3.9]
56+
python-version: [3.7, 3.8, 3.9, "3.10", 3.11, "pypy3.9"]
5757
MONGODB: [$MONGODB_4_0]
5858
PYMONGO: [$PYMONGO_3_11]
5959
include:

docs/changelog.rst

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ Development
88
===========
99
- (Fill this out as you fix issues and develop your features).
1010

11+
Changes in 0.28.2
12+
=================
13+
- Fix typing import incompatible with Pymongo 3.7 #2802
14+
1115
Changes in 0.28.1
1216
=================
1317
- Fix bug related with recent updates to no_dereference context manager #2799

mongoengine/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
)
3030

3131

32-
VERSION = (0, 28, 1)
32+
VERSION = (0, 28, 2)
3333

3434

3535
def get_version():

mongoengine/connection.py

+4-5
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:

setup.py

-2
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ def run_tests(self):
9898
"Operating System :: OS Independent",
9999
"Programming Language :: Python",
100100
"Programming Language :: Python :: 3",
101-
"Programming Language :: Python :: 3.6",
102-
"Programming Language :: Python :: 3.7",
103101
"Programming Language :: Python :: 3.8",
104102
"Programming Language :: Python :: 3.9",
105103
"Programming Language :: Python :: 3.10",

tox.ini

-2
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)