Skip to content

Commit a5bc2dc

Browse files
committed
bring back 3.6 (want to keep it here)
1 parent b1dcc84 commit a5bc2dc

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

.github/workflows/github-actions.yml

+4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ on:
1313
tags:
1414
- 'v[0-9]+\.[0-9]+\.[0-9]+*'
1515
env:
16+
MONGODB_3_6: "3.6.23"
1617
MONGODB_4_0: "4.0.28"
1718
MONGODB_4_2: "4.2.25"
1819
MONGODB_4_4: "4.4.29"
@@ -62,6 +63,9 @@ jobs:
6263
MONGODB: [$MONGODB_4_0]
6364
PYMONGO: [$PYMONGO_3_12]
6465
include:
66+
- python-version: "3.9"
67+
MONGODB: $MONGODB_3_6
68+
PYMONGO: $PYMONGO_3_12
6569
- python-version: "3.9"
6670
MONGODB: $MONGODB_4_4
6771
PYMONGO: $PYMONGO_3_13

.github/workflows/install_mongo.sh

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ if [[ "${MONGODB}" =~ ^(7.0|8.0) ]]; then
1616
mongo_build="mongodb-linux-x86_64-ubuntu2004-${MONGODB}"
1717
elif [[ "${MONGODB}" =~ ^(4.0|4.2|4.4|5.0|6.0) ]]; then
1818
mongo_build="mongodb-linux-x86_64-ubuntu1804-${MONGODB}"
19+
elif [[ "${MONGODB}" =~ ^3.6$ ]]; then
20+
mongo_build="mongodb-linux-x86_64-${MONGODB}"
1921
else
2022
echo "Error: Unsupported MongoDB version: ${MONGODB}"
2123
usage

README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ an `API reference <https://mongoengine-odm.readthedocs.io/apireference.html>`_.
3535

3636
Supported MongoDB Versions
3737
==========================
38-
MongoEngine is currently tested against MongoDB v4.0, v4.4, v5.0, v6.0, v7.0 and v8.0. Future versions
38+
MongoEngine is currently tested against MongoDB v3.6, v4.0, v4.4, v5.0, v6.0, v7.0 and v8.0. Future versions
3939
should be supported as well, but aren't actively tested at the moment. Make
4040
sure to open an issue or submit a pull request if you experience any problems
4141
with a more recent MongoDB versions.

mongoengine/mongodb_support.py

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
# Constant that can be used to compare the version retrieved with
88
# get_mongodb_version()
9-
MONGODB_34 = (3, 4)
109
MONGODB_36 = (3, 6)
1110
MONGODB_42 = (4, 2)
1211
MONGODB_44 = (4, 4)

tests/document/test_instance.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
SaveConditionError,
2626
)
2727
from mongoengine.mongodb_support import (
28-
MONGODB_34,
2928
MONGODB_36,
3029
get_mongodb_version,
3130
)
@@ -536,17 +535,12 @@ class Animal(Document):
536535
doc = Animal(is_mammal=True, name="Dog")
537536
doc.save()
538537

539-
mongo_db = get_mongodb_version()
540-
541538
with query_counter() as q:
542539
doc.name = "Cat"
543540
doc.save()
544541
query_op = q.db.system.profile.find({"ns": "mongoenginetest.animal"})[0]
545542
assert query_op["op"] == "update"
546-
if mongo_db <= MONGODB_34:
547-
assert set(query_op["query"].keys()) == {"_id", "is_mammal"}
548-
else:
549-
assert set(query_op["command"]["q"].keys()) == {"_id", "is_mammal"}
543+
assert set(query_op["command"]["q"].keys()) == {"_id", "is_mammal"}
550544

551545
Animal.drop_collection()
552546

0 commit comments

Comments
 (0)