From f5904c87d0b022070a677f4a8422567777dfe749 Mon Sep 17 00:00:00 2001 From: Travis Thieman Date: Thu, 27 Apr 2017 14:42:10 -0400 Subject: [PATCH] Upgrade to PyMongo 3, bump our version to 0.8 --- setup.py | 4 ++-- tests/mongothon/pymongo_integration_test.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 6969337..adbe955 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setuptools.setup( name="Mongothon", - version="0.7.20", + version="0.8.0", author="Tom Leach", author_email="tom@gc.io", description="A MongoDB object-document mapping layer for Python", @@ -15,7 +15,7 @@ "API for Python, loosely based on the awesome " + "mongoose.js library.", install_requires=[ - 'pymongo>=2.5.0, <3.0.0', 'inflection==0.2.0', 'schemer>=0.2.0, <0.3.0' + 'pymongo>=3.0.0, <4.0.0', 'inflection==0.2.0', 'schemer>=0.2.0, <0.3.0' ], tests_require=['mock', 'nose'] ) diff --git a/tests/mongothon/pymongo_integration_test.py b/tests/mongothon/pymongo_integration_test.py index 39dd649..a2c7a48 100644 --- a/tests/mongothon/pymongo_integration_test.py +++ b/tests/mongothon/pymongo_integration_test.py @@ -1,5 +1,5 @@ import os -from pymongo.connection import Connection +from pymongo import MongoClient import unittest from mongothon import create_model from sample import blog_post_schema, valid_doc, expected_db_doc @@ -10,7 +10,7 @@ def get_db(*args, **kwargs): - return Connection(host, port, *args, **kwargs).mongothon_test + return MongoClient(host, port, *args, **kwargs).mongothon_test blog_post_collection = get_db().blog_post BlogPost = create_model(blog_post_schema, blog_post_collection)