Skip to content

Commit 0df9706

Browse files
committed
cleanup
1 parent c644346 commit 0df9706

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Flask-PyMongo
22

3-
PyMongo support for Flask applications
3+
PyMongo support for Flask applications. Requires `flask>=3.0` and `pymongo>=4.0`
44

55
## Quickstart
66

flask_pymongo/tests/test_json.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
from bson import ObjectId
44
from flask import jsonify
5-
from six import ensure_str
65

76
from flask_pymongo.tests.util import FlaskPyMongoTest
87

@@ -11,12 +10,12 @@ class JSONTest(FlaskPyMongoTest):
1110

1211
def test_it_encodes_json(self):
1312
resp = jsonify({"foo": "bar"})
14-
dumped = json.loads(ensure_str(resp.get_data()))
13+
dumped = json.loads(resp.get_data().decode('utf-8'))
1514
self.assertEqual(dumped, {"foo": "bar"})
1615

1716
def test_it_handles_pymongo_types(self):
1817
resp = jsonify({"id": ObjectId("5cf29abb5167a14c9e6e12c4")})
19-
dumped = json.loads(ensure_str(resp.get_data()))
18+
dumped = json.loads(resp.get_data().decode('utf-8'))
2019
self.assertEqual(dumped, {"id": {"$oid": "5cf29abb5167a14c9e6e12c4"}})
2120

2221
def test_it_jsonifies_a_cursor(self):
@@ -25,5 +24,5 @@ def test_it_jsonifies_a_cursor(self):
2524
curs = self.mongo.db.rows.find(projection={"_id": False}).sort("foo")
2625

2726
resp = jsonify(curs)
28-
dumped = json.loads(ensure_str(resp.get_data()))
27+
dumped = json.loads(resp.get_data().decode('utf-8'))
2928
self.assertEqual([{"foo": "bar"}, {"foo": "baz"}], dumped)

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@
3131
packages=find_packages(),
3232
install_requires=[
3333
"Flask>=3.0",
34-
"PyMongo>=3.11",
35-
"six",
34+
"PyMongo>=4.0",
3635
],
3736
classifiers=[
3837
"Environment :: Web Environment",

0 commit comments

Comments
 (0)