summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Grönholm <alex.gronholm@nextday.fi>2015-04-20 05:53:26 +0300
committerAlex Grönholm <alex.gronholm@nextday.fi>2015-04-20 05:54:37 +0300
commita6dd7bc6c795b83923fbf4318c0a353091ccb6da (patch)
tree52314642541e1afb705bb7511ab87a3ec047003e
parentebdf440d3b9a0f26d5ce87d498b28a00626db7a7 (diff)
downloadapscheduler-a6dd7bc6c795b83923fbf4318c0a353091ccb6da.tar.gz
Restored backwards compatibility in the MongoDB job store and updated the version history
-rw-r--r--apscheduler/jobstores/mongodb.py6
-rw-r--r--docs/versionhistory.rst6
2 files changed, 12 insertions, 0 deletions
diff --git a/apscheduler/jobstores/mongodb.py b/apscheduler/jobstores/mongodb.py
index 78fa2c7..6182502 100644
--- a/apscheduler/jobstores/mongodb.py
+++ b/apscheduler/jobstores/mongodb.py
@@ -1,4 +1,5 @@
from __future__ import absolute_import
+import warnings
from apscheduler.jobstores.base import BaseJobStore, JobLookupError, ConflictingIdError
from apscheduler.util import maybe_ref, datetime_to_utc_timestamp, utc_timestamp_to_datetime
@@ -50,6 +51,11 @@ class MongoDBJobStore(BaseJobStore):
self.collection = self.client[database][collection]
self.collection.ensure_index('next_run_time', sparse=True)
+ @property
+ def connection(self):
+ warnings.warn('The "connection" member is deprecated -- use "client" instead', DeprecationWarning)
+ return self.client
+
def lookup_job(self, job_id):
document = self.collection.find_one(job_id, ['job_state'])
return self._reconstitute_job(document['job_state']) if document else None
diff --git a/docs/versionhistory.rst b/docs/versionhistory.rst
index 01d93b4..b5158e5 100644
--- a/docs/versionhistory.rst
+++ b/docs/versionhistory.rst
@@ -5,6 +5,12 @@ To find out how to migrate your application from a previous version of
APScheduler, see the :doc:`migration section <migration>`.
+3.0.3
+-----
+
+* Fixed compatibility with pymongo 3.0
+
+
3.0.2
-----