[Python-modules-commits] [apscheduler] 06/08: Import apscheduler_3.0.5.orig.tar.gz

Brian May bam at moszumanska.debian.org
Thu Mar 24 01:44:52 UTC 2016


This is an automated email from the git hooks/post-receive script.

bam pushed a commit to branch master
in repository apscheduler.

commit da11650cebad278495386e057d69e08d342fe77e
Author: Brian May <brian at linuxpenguins.xyz>
Date:   Thu Mar 24 10:20:36 2016 +1100

    Import apscheduler_3.0.5.orig.tar.gz
---
 APScheduler.egg-info/PKG-INFO                      |   80 +-
 APScheduler.egg-info/SOURCES.txt                   |   97 +-
 APScheduler.egg-info/dependency_links.txt          |    0
 APScheduler.egg-info/entry_points.txt              |   19 +
 .../{dependency_links.txt => not-zip-safe}         |    0
 APScheduler.egg-info/pbr.json                      |    1 +
 APScheduler.egg-info/requires.txt                  |    5 +
 APScheduler.egg-info/top_level.txt                 |    0
 LICENSE.txt                                        |   19 +
 PKG-INFO                                           |   80 +-
 README.rst                                         |   74 +-
 apscheduler/__init__.py                            |    8 +-
 apscheduler/events.py                              |   87 +-
 apscheduler/executors/__init__.py                  |    0
 apscheduler/executors/asyncio.py                   |   28 +
 apscheduler/executors/base.py                      |  123 +++
 apscheduler/executors/debug.py                     |   19 +
 apscheduler/executors/gevent.py                    |   29 +
 apscheduler/executors/pool.py                      |   54 +
 apscheduler/executors/twisted.py                   |   25 +
 apscheduler/job.py                                 |  339 +++++--
 apscheduler/jobstores/base.py                      |  145 ++-
 apscheduler/jobstores/memory.py                    |  107 ++
 apscheduler/jobstores/mongodb.py                   |  132 +++
 apscheduler/jobstores/mongodb_store.py             |   84 --
 apscheduler/jobstores/ram_store.py                 |   25 -
 apscheduler/jobstores/redis.py                     |  142 +++
 apscheduler/jobstores/redis_store.py               |   91 --
 apscheduler/jobstores/shelve_store.py              |   74 --
 apscheduler/jobstores/sqlalchemy.py                |  139 +++
 apscheduler/jobstores/sqlalchemy_store.py          |   91 --
 apscheduler/scheduler.py                           |  607 -----------
 apscheduler/schedulers/__init__.py                 |   12 +
 apscheduler/schedulers/asyncio.py                  |   68 ++
 apscheduler/schedulers/background.py               |   39 +
 apscheduler/schedulers/base.py                     |  845 ++++++++++++++++
 apscheduler/schedulers/blocking.py                 |   32 +
 apscheduler/schedulers/gevent.py                   |   35 +
 apscheduler/schedulers/qt.py                       |   46 +
 apscheduler/schedulers/tornado.py                  |   60 ++
 apscheduler/schedulers/twisted.py                  |   65 ++
 apscheduler/threadpool.py                          |  133 ---
 apscheduler/triggers/__init__.py                   |    3 -
 apscheduler/triggers/base.py                       |   16 +
 apscheduler/triggers/cron/__init__.py              |  138 ++-
 apscheduler/triggers/cron/expressions.py           |   22 +-
 apscheduler/triggers/cron/fields.py                |   27 +-
 apscheduler/triggers/date.py                       |   30 +
 apscheduler/triggers/interval.py                   |   68 +-
 apscheduler/triggers/simple.py                     |   17 -
 apscheduler/util.py                                |  346 +++++--
 docs/conf.py                                       |    5 +-
 docs/contributing.rst                              |   63 ++
 docs/cronschedule.rst                              |  118 ---
 docs/dateschedule.rst                              |   39 -
 docs/extending.rst                                 |  151 ++-
 docs/index.rst                                     |  451 +--------
 docs/intervalschedule.rst                          |   55 -
 docs/migration.rst                                 |   64 +-
 docs/modules/events.rst                            |   65 +-
 docs/modules/executors/asyncio.rst                 |   10 +
 docs/modules/executors/base.rst                    |   11 +
 docs/modules/executors/debug.rst                   |   10 +
 docs/modules/executors/gevent.rst                  |   10 +
 docs/modules/executors/pool.rst                    |   13 +
 docs/modules/executors/twisted.rst                 |   10 +
 docs/modules/job.rst                               |    5 +-
 docs/modules/jobstores/base.rst                    |   10 +
 docs/modules/jobstores/memory.rst                  |   29 +
 docs/modules/jobstores/mongodb.rst                 |   29 +-
 docs/modules/jobstores/ram.rst                     |   10 -
 docs/modules/jobstores/redis.rst                   |   29 +-
 docs/modules/jobstores/shelve.rst                  |   10 -
 docs/modules/jobstores/sqlalchemy.rst              |   32 +-
 docs/modules/scheduler.rst                         |   11 -
 docs/modules/schedulers.rst                        |    5 +
 docs/modules/schedulers/asyncio.rst                |   32 +
 docs/modules/schedulers/background.rst             |   29 +
 docs/modules/schedulers/base.rst                   |   10 +
 docs/modules/schedulers/blocking.rst               |   30 +
 docs/modules/schedulers/gevent.rst                 |   31 +
 docs/modules/schedulers/qt.rst                     |   28 +
 docs/modules/schedulers/tornado.rst                |   27 +
 docs/modules/schedulers/twisted.rst                |   28 +
 docs/modules/triggers/base.rst                     |   10 +
 docs/modules/triggers/cron.rst                     |  106 ++
 docs/modules/triggers/date.rst                     |   59 ++
 docs/modules/triggers/interval.rst                 |   61 ++
 docs/userguide.rst                                 |  405 ++++++++
 docs/versionhistory.rst                            |  239 +++++
 examples/executors/processpool.py                  |   24 +
 examples/interval.py                               |   22 -
 examples/jobstores/mongodb.py                      |   33 +
 examples/jobstores/redis_.py                       |   33 +
 examples/jobstores/sqlalchemy_.py                  |   31 +
 examples/misc/reference.py                         |   18 +
 examples/persistent.py                             |   29 -
 examples/schedulers/asyncio_.py                    |   30 +
 examples/schedulers/background.py                  |   27 +
 examples/schedulers/blocking.py                    |   23 +
 examples/schedulers/gevent_.py                     |   25 +
 examples/schedulers/qt.py                          |   37 +
 examples/schedulers/tornado_.py                    |   26 +
 examples/schedulers/twisted_.py                    |   26 +
 examples/threaded.py                               |   26 -
 setup.cfg                                          |   30 +-
 setup.py                                           |   59 +-
 tests/__init__.py                                  |    0
 tests/conftest.py                                  |   91 ++
 tests/test_executors.py                            |  125 +++
 tests/test_expressions.py                          |  172 ++++
 tests/test_job.py                                  |  275 +++++
 tests/test_jobstores.py                            |  304 ++++++
 tests/test_schedulers.py                           | 1054 ++++++++++++++++++++
 tests/test_triggers.py                             |  290 ++++++
 tests/test_util.py                                 |  296 ++++++
 tests/testexpressions.py                           |  177 ----
 tests/testintegration.py                           |  164 ---
 tests/testjob.py                                   |  164 ---
 tests/testjobstores.py                             |  223 -----
 tests/testscheduler.py                             |  458 ---------
 tests/testthreadpool.py                            |   54 -
 tests/testtriggers.py                              |  207 ----
 tests/testutil.py                                  |  217 ----
 124 files changed, 7700 insertions(+), 4136 deletions(-)

diff --git a/APScheduler.egg-info/PKG-INFO b/APScheduler.egg-info/PKG-INFO
old mode 100644
new mode 100755
index 3a9b409..d5acb8f
--- a/APScheduler.egg-info/PKG-INFO
+++ b/APScheduler.egg-info/PKG-INFO
@@ -1,74 +1,76 @@
-Metadata-Version: 1.0
+Metadata-Version: 1.1
 Name: APScheduler
-Version: 2.1.2
+Version: 3.0.5
 Summary: In-process task scheduler with Cron-like capabilities
 Home-page: http://pypi.python.org/pypi/APScheduler/
 Author: Alex Gronholm
 Author-email: apscheduler at nextday.fi
 License: MIT
-Description: Advanced Python Scheduler (APScheduler) is a light but powerful in-process task
-        scheduler that lets you schedule jobs (functions or any python callables) to be
-        executed at times of your choosing.
+Description: Advanced Python Scheduler (APScheduler) is a Python library that lets you schedule your Python code to be executed
+        later, either just once or periodically. You can add new jobs or remove old ones on the fly as you please. If you store
+        your jobs in a database, they will also survive scheduler restarts and maintain their state. When the scheduler is
+        restarted, it will then run all the jobs it should have run while it was offline [#f1]_.
         
-        This can be a far better alternative to externally run cron scripts for
-        long-running applications (e.g. web applications), as it is platform neutral
-        and can directly access your application's variables and functions.
+        Among other things, APScheduler can be used as a cross-platform, application specific replacement to platform specific
+        schedulers, such as the cron daemon or the Windows task scheduler. Please note, however, that APScheduler is **not** a
+        daemon or service itself, nor does it come with any command line tools. It is primarily meant to be run inside existing
+        applications. That said, APScheduler does provide some building blocks for you to build a scheduler service or to run a
+        dedicated scheduler process.
         
-        The development of APScheduler was heavily influenced by the `Quartz
-        <http://www.quartz-scheduler.org/>`_ task scheduler written in Java.
-        APScheduler provides most of the major features that Quartz does, but it also
-        provides features not present in Quartz (such as multiple job stores).
+        APScheduler has three built-in scheduling systems you can use:
         
+        * Cron-style scheduling (with optional start/end times)
+        * Interval-based execution (runs jobs on even intervals, with optional start/end times)
+        * One-off delayed execution (runs jobs once, on a set date/time)
         
-        Features
-        ========
+        You can mix and match scheduling systems and the backends where the jobs are stored any way you like.
+        Supported backends for storing jobs include:
         
-        * No (hard) external dependencies
-        * Thread-safe API
-        * Excellent test coverage (tested on CPython 2.5 - 2.7, 3.2 - 3.3, Jython 2.5.3, PyPy 2.2)
-        * Configurable scheduling mechanisms (triggers):
+        * Memory
+        * `SQLAlchemy <http://www.sqlalchemy.org/>`_ (any RDBMS supported by SQLAlchemy works)
+        * `MongoDB <http://www.mongodb.org/>`_
+        * `Redis <http://redis.io/>`_
         
-          * Cron-like scheduling
-          * Delayed scheduling of single run jobs (like the UNIX "at" command)
-          * Interval-based (run a job at specified time intervals)
-        * Multiple, simultaneously active job stores:
+        APScheduler also integrates with several common Python frameworks, like:
         
-          * RAM 
-          * File-based simple database (shelve)
-          * `SQLAlchemy <http://www.sqlalchemy.org/>`_ (any supported RDBMS works)
-          * `MongoDB <http://www.mongodb.org/>`_
-          * `Redis <http://redis.io/>`_
+        * `asyncio <http://docs.python.org/3.4/library/asyncio.html>`_ (:pep:`3156`)
+        * `gevent <http://www.gevent.org/>`_
+        * `Tornado <http://www.tornadoweb.org/>`_
+        * `Twisted <http://twistedmatrix.com/>`_
+        * `Qt <http://qt-project.org/>`_ (using either `PyQt <http://www.riverbankcomputing.com/software/pyqt/intro>`_
+          or `PySide <http://qt-project.org/wiki/PySide>`_)
+        
+        .. [#f1] The cutoff period for this is also configurable.
         
         
         Documentation
-        =============
+        -------------
         
         Documentation can be found `here <http://readthedocs.org/docs/apscheduler/en/latest/>`_.
         
         
         Source
-        ======
+        ------
         
-        The source can be browsed at `Bitbucket
-        <http://bitbucket.org/agronholm/apscheduler/src/>`_.
+        The source can be browsed at `Bitbucket <http://bitbucket.org/agronholm/apscheduler/src/>`_.
         
         
         Reporting bugs
-        ==============
+        --------------
         
-        A `bug tracker <http://bitbucket.org/agronholm/apscheduler/issues/>`_
+        A `bug tracker <https://bitbucket.org/agronholm/apscheduler/issues?status-new&status-open>`_
         is provided by bitbucket.org.
         
         
         Getting help
-        ============
+        ------------
         
         If you have problems or other questions, you can either:
         
-        * Ask on the `APScheduler Google group
-          <http://groups.google.com/group/apscheduler>`_, or
-        * Ask on the ``#apscheduler`` channel on
-          `Freenode IRC <http://freenode.net/irc_servers.shtml>`_
+        * Ask on the ``#apscheduler`` channel on `Freenode IRC <http://freenode.net/irc_servers.shtml>`_
+        * Ask on the `APScheduler Google group <http://groups.google.com/group/apscheduler>`_, or
+        * Ask on `StackOverflow <http://stackoverflow.com/questions/tagged/apscheduler>`_ and tag your question with the
+          ``apscheduler`` tag
         
 Keywords: scheduling cron
 Platform: UNKNOWN
@@ -76,9 +78,9 @@ Classifier: Development Status :: 5 - Production/Stable
 Classifier: Intended Audience :: Developers
 Classifier: License :: OSI Approved :: MIT License
 Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2.5
 Classifier: Programming Language :: Python :: 2.6
 Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3.2
 Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
diff --git a/APScheduler.egg-info/SOURCES.txt b/APScheduler.egg-info/SOURCES.txt
old mode 100644
new mode 100755
index 25869a1..c7bffec
--- a/APScheduler.egg-info/SOURCES.txt
+++ b/APScheduler.egg-info/SOURCES.txt
@@ -1,3 +1,4 @@
+LICENSE.txt
 MANIFEST.in
 README.rst
 setup.cfg
@@ -5,49 +6,95 @@ setup.py
 APScheduler.egg-info/PKG-INFO
 APScheduler.egg-info/SOURCES.txt
 APScheduler.egg-info/dependency_links.txt
+APScheduler.egg-info/entry_points.txt
+APScheduler.egg-info/not-zip-safe
+APScheduler.egg-info/pbr.json
+APScheduler.egg-info/requires.txt
 APScheduler.egg-info/top_level.txt
 apscheduler/__init__.py
 apscheduler/events.py
 apscheduler/job.py
-apscheduler/scheduler.py
-apscheduler/threadpool.py
 apscheduler/util.py
+apscheduler/executors/__init__.py
+apscheduler/executors/asyncio.py
+apscheduler/executors/base.py
+apscheduler/executors/debug.py
+apscheduler/executors/gevent.py
+apscheduler/executors/pool.py
+apscheduler/executors/twisted.py
 apscheduler/jobstores/__init__.py
 apscheduler/jobstores/base.py
-apscheduler/jobstores/mongodb_store.py
-apscheduler/jobstores/ram_store.py
-apscheduler/jobstores/redis_store.py
-apscheduler/jobstores/shelve_store.py
-apscheduler/jobstores/sqlalchemy_store.py
+apscheduler/jobstores/memory.py
+apscheduler/jobstores/mongodb.py
+apscheduler/jobstores/redis.py
+apscheduler/jobstores/sqlalchemy.py
+apscheduler/schedulers/__init__.py
+apscheduler/schedulers/asyncio.py
+apscheduler/schedulers/background.py
+apscheduler/schedulers/base.py
+apscheduler/schedulers/blocking.py
+apscheduler/schedulers/gevent.py
+apscheduler/schedulers/qt.py
+apscheduler/schedulers/tornado.py
+apscheduler/schedulers/twisted.py
 apscheduler/triggers/__init__.py
+apscheduler/triggers/base.py
+apscheduler/triggers/date.py
 apscheduler/triggers/interval.py
-apscheduler/triggers/simple.py
 apscheduler/triggers/cron/__init__.py
 apscheduler/triggers/cron/expressions.py
 apscheduler/triggers/cron/fields.py
 docs/conf.py
-docs/cronschedule.rst
-docs/dateschedule.rst
+docs/contributing.rst
 docs/extending.rst
 docs/index.rst
-docs/intervalschedule.rst
 docs/migration.rst
+docs/userguide.rst
+docs/versionhistory.rst
 docs/modules/events.rst
 docs/modules/job.rst
-docs/modules/scheduler.rst
+docs/modules/schedulers.rst
+docs/modules/executors/asyncio.rst
+docs/modules/executors/base.rst
+docs/modules/executors/debug.rst
+docs/modules/executors/gevent.rst
+docs/modules/executors/pool.rst
+docs/modules/executors/twisted.rst
+docs/modules/jobstores/base.rst
+docs/modules/jobstores/memory.rst
 docs/modules/jobstores/mongodb.rst
-docs/modules/jobstores/ram.rst
 docs/modules/jobstores/redis.rst
-docs/modules/jobstores/shelve.rst
 docs/modules/jobstores/sqlalchemy.rst
-examples/interval.py
-examples/persistent.py
-examples/threaded.py
-tests/testexpressions.py
-tests/testintegration.py
-tests/testjob.py
-tests/testjobstores.py
-tests/testscheduler.py
-tests/testthreadpool.py
-tests/testtriggers.py
-tests/testutil.py
\ No newline at end of file
+docs/modules/schedulers/asyncio.rst
+docs/modules/schedulers/background.rst
+docs/modules/schedulers/base.rst
+docs/modules/schedulers/blocking.rst
+docs/modules/schedulers/gevent.rst
+docs/modules/schedulers/qt.rst
+docs/modules/schedulers/tornado.rst
+docs/modules/schedulers/twisted.rst
+docs/modules/triggers/base.rst
+docs/modules/triggers/cron.rst
+docs/modules/triggers/date.rst
+docs/modules/triggers/interval.rst
+examples/executors/processpool.py
+examples/jobstores/mongodb.py
+examples/jobstores/redis_.py
+examples/jobstores/sqlalchemy_.py
+examples/misc/reference.py
+examples/schedulers/asyncio_.py
+examples/schedulers/background.py
+examples/schedulers/blocking.py
+examples/schedulers/gevent_.py
+examples/schedulers/qt.py
+examples/schedulers/tornado_.py
+examples/schedulers/twisted_.py
+tests/__init__.py
+tests/conftest.py
+tests/test_executors.py
+tests/test_expressions.py
+tests/test_job.py
+tests/test_jobstores.py
+tests/test_schedulers.py
+tests/test_triggers.py
+tests/test_util.py
\ No newline at end of file
diff --git a/APScheduler.egg-info/dependency_links.txt b/APScheduler.egg-info/dependency_links.txt
old mode 100644
new mode 100755
diff --git a/APScheduler.egg-info/entry_points.txt b/APScheduler.egg-info/entry_points.txt
new file mode 100755
index 0000000..d323bbb
--- /dev/null
+++ b/APScheduler.egg-info/entry_points.txt
@@ -0,0 +1,19 @@
+[apscheduler.executors]
+asyncio = apscheduler.executors.asyncio:AsyncIOExecutor
+debug = apscheduler.executors.debug:DebugExecutor
+gevent = apscheduler.executors.gevent:GeventExecutor
+processpool = apscheduler.executors.pool:ProcessPoolExecutor
+threadpool = apscheduler.executors.pool:ThreadPoolExecutor
+twisted = apscheduler.executors.twisted:TwistedExecutor
+
+[apscheduler.jobstores]
+memory = apscheduler.jobstores.memory:MemoryJobStore
+mongodb = apscheduler.jobstores.mongodb:MongoDBJobStore
+redis = apscheduler.jobstores.redis:RedisJobStore
+sqlalchemy = apscheduler.jobstores.sqlalchemy:SQLAlchemyJobStore
+
+[apscheduler.triggers]
+cron = apscheduler.triggers.cron:CronTrigger
+date = apscheduler.triggers.date:DateTrigger
+interval = apscheduler.triggers.interval:IntervalTrigger
+
diff --git a/APScheduler.egg-info/dependency_links.txt b/APScheduler.egg-info/not-zip-safe
similarity index 100%
copy from APScheduler.egg-info/dependency_links.txt
copy to APScheduler.egg-info/not-zip-safe
diff --git a/APScheduler.egg-info/pbr.json b/APScheduler.egg-info/pbr.json
new file mode 100644
index 0000000..841aff4
--- /dev/null
+++ b/APScheduler.egg-info/pbr.json
@@ -0,0 +1 @@
+{"is_release": false, "git_version": "79e3aed"}
\ No newline at end of file
diff --git a/APScheduler.egg-info/requires.txt b/APScheduler.egg-info/requires.txt
new file mode 100755
index 0000000..96a7119
--- /dev/null
+++ b/APScheduler.egg-info/requires.txt
@@ -0,0 +1,5 @@
+setuptools >= 0.7
+six >= 1.4.0
+pytz
+tzlocal
+futures
diff --git a/APScheduler.egg-info/top_level.txt b/APScheduler.egg-info/top_level.txt
old mode 100644
new mode 100755
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..07806f8
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,19 @@
+This is the MIT license: http://www.opensource.org/licenses/mit-license.php
+
+Copyright (c) Alex Grönholm
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this
+software and associated documentation files (the "Software"), to deal in the Software
+without restriction, including without limitation the rights to use, copy, modify, merge,
+publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
+to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or
+substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
+FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
diff --git a/PKG-INFO b/PKG-INFO
index 3a9b409..d5acb8f 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,74 +1,76 @@
-Metadata-Version: 1.0
+Metadata-Version: 1.1
 Name: APScheduler
-Version: 2.1.2
+Version: 3.0.5
 Summary: In-process task scheduler with Cron-like capabilities
 Home-page: http://pypi.python.org/pypi/APScheduler/
 Author: Alex Gronholm
 Author-email: apscheduler at nextday.fi
 License: MIT
-Description: Advanced Python Scheduler (APScheduler) is a light but powerful in-process task
-        scheduler that lets you schedule jobs (functions or any python callables) to be
-        executed at times of your choosing.
+Description: Advanced Python Scheduler (APScheduler) is a Python library that lets you schedule your Python code to be executed
+        later, either just once or periodically. You can add new jobs or remove old ones on the fly as you please. If you store
+        your jobs in a database, they will also survive scheduler restarts and maintain their state. When the scheduler is
+        restarted, it will then run all the jobs it should have run while it was offline [#f1]_.
         
-        This can be a far better alternative to externally run cron scripts for
-        long-running applications (e.g. web applications), as it is platform neutral
-        and can directly access your application's variables and functions.
+        Among other things, APScheduler can be used as a cross-platform, application specific replacement to platform specific
+        schedulers, such as the cron daemon or the Windows task scheduler. Please note, however, that APScheduler is **not** a
+        daemon or service itself, nor does it come with any command line tools. It is primarily meant to be run inside existing
+        applications. That said, APScheduler does provide some building blocks for you to build a scheduler service or to run a
+        dedicated scheduler process.
         
-        The development of APScheduler was heavily influenced by the `Quartz
-        <http://www.quartz-scheduler.org/>`_ task scheduler written in Java.
-        APScheduler provides most of the major features that Quartz does, but it also
-        provides features not present in Quartz (such as multiple job stores).
+        APScheduler has three built-in scheduling systems you can use:
         
+        * Cron-style scheduling (with optional start/end times)
+        * Interval-based execution (runs jobs on even intervals, with optional start/end times)
+        * One-off delayed execution (runs jobs once, on a set date/time)
         
-        Features
-        ========
+        You can mix and match scheduling systems and the backends where the jobs are stored any way you like.
+        Supported backends for storing jobs include:
         
-        * No (hard) external dependencies
-        * Thread-safe API
-        * Excellent test coverage (tested on CPython 2.5 - 2.7, 3.2 - 3.3, Jython 2.5.3, PyPy 2.2)
-        * Configurable scheduling mechanisms (triggers):
+        * Memory
+        * `SQLAlchemy <http://www.sqlalchemy.org/>`_ (any RDBMS supported by SQLAlchemy works)
+        * `MongoDB <http://www.mongodb.org/>`_
+        * `Redis <http://redis.io/>`_
         
-          * Cron-like scheduling
-          * Delayed scheduling of single run jobs (like the UNIX "at" command)
-          * Interval-based (run a job at specified time intervals)
-        * Multiple, simultaneously active job stores:
+        APScheduler also integrates with several common Python frameworks, like:
         
-          * RAM 
-          * File-based simple database (shelve)
-          * `SQLAlchemy <http://www.sqlalchemy.org/>`_ (any supported RDBMS works)
-          * `MongoDB <http://www.mongodb.org/>`_
-          * `Redis <http://redis.io/>`_
+        * `asyncio <http://docs.python.org/3.4/library/asyncio.html>`_ (:pep:`3156`)
+        * `gevent <http://www.gevent.org/>`_
+        * `Tornado <http://www.tornadoweb.org/>`_
+        * `Twisted <http://twistedmatrix.com/>`_
+        * `Qt <http://qt-project.org/>`_ (using either `PyQt <http://www.riverbankcomputing.com/software/pyqt/intro>`_
+          or `PySide <http://qt-project.org/wiki/PySide>`_)
+        
+        .. [#f1] The cutoff period for this is also configurable.
         
         
         Documentation
-        =============
+        -------------
         
         Documentation can be found `here <http://readthedocs.org/docs/apscheduler/en/latest/>`_.
         
         
         Source
-        ======
+        ------
         
-        The source can be browsed at `Bitbucket
-        <http://bitbucket.org/agronholm/apscheduler/src/>`_.
+        The source can be browsed at `Bitbucket <http://bitbucket.org/agronholm/apscheduler/src/>`_.
         
         
         Reporting bugs
-        ==============
+        --------------
         
-        A `bug tracker <http://bitbucket.org/agronholm/apscheduler/issues/>`_
+        A `bug tracker <https://bitbucket.org/agronholm/apscheduler/issues?status-new&status-open>`_
         is provided by bitbucket.org.
         
         
         Getting help
-        ============
+        ------------
         
         If you have problems or other questions, you can either:
         
-        * Ask on the `APScheduler Google group
-          <http://groups.google.com/group/apscheduler>`_, or
-        * Ask on the ``#apscheduler`` channel on
-          `Freenode IRC <http://freenode.net/irc_servers.shtml>`_
+        * Ask on the ``#apscheduler`` channel on `Freenode IRC <http://freenode.net/irc_servers.shtml>`_
+        * Ask on the `APScheduler Google group <http://groups.google.com/group/apscheduler>`_, or
+        * Ask on `StackOverflow <http://stackoverflow.com/questions/tagged/apscheduler>`_ and tag your question with the
+          ``apscheduler`` tag
         
 Keywords: scheduling cron
 Platform: UNKNOWN
@@ -76,9 +78,9 @@ Classifier: Development Status :: 5 - Production/Stable
 Classifier: Intended Audience :: Developers
 Classifier: License :: OSI Approved :: MIT License
 Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2.5
 Classifier: Programming Language :: Python :: 2.6
 Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3.2
 Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
diff --git a/README.rst b/README.rst
index 871ba9c..803175a 100644
--- a/README.rst
+++ b/README.rst
@@ -1,63 +1,65 @@
-Advanced Python Scheduler (APScheduler) is a light but powerful in-process task
-scheduler that lets you schedule jobs (functions or any python callables) to be
-executed at times of your choosing.
+Advanced Python Scheduler (APScheduler) is a Python library that lets you schedule your Python code to be executed
+later, either just once or periodically. You can add new jobs or remove old ones on the fly as you please. If you store
+your jobs in a database, they will also survive scheduler restarts and maintain their state. When the scheduler is
+restarted, it will then run all the jobs it should have run while it was offline [#f1]_.
 
-This can be a far better alternative to externally run cron scripts for
-long-running applications (e.g. web applications), as it is platform neutral
-and can directly access your application's variables and functions.
+Among other things, APScheduler can be used as a cross-platform, application specific replacement to platform specific
+schedulers, such as the cron daemon or the Windows task scheduler. Please note, however, that APScheduler is **not** a
+daemon or service itself, nor does it come with any command line tools. It is primarily meant to be run inside existing
+applications. That said, APScheduler does provide some building blocks for you to build a scheduler service or to run a
+dedicated scheduler process.
 
-The development of APScheduler was heavily influenced by the `Quartz
-<http://www.quartz-scheduler.org/>`_ task scheduler written in Java.
-APScheduler provides most of the major features that Quartz does, but it also
-provides features not present in Quartz (such as multiple job stores).
+APScheduler has three built-in scheduling systems you can use:
 
+* Cron-style scheduling (with optional start/end times)
+* Interval-based execution (runs jobs on even intervals, with optional start/end times)
+* One-off delayed execution (runs jobs once, on a set date/time)
 
-Features
-========
+You can mix and match scheduling systems and the backends where the jobs are stored any way you like.
+Supported backends for storing jobs include:
 
-* No (hard) external dependencies
-* Thread-safe API
-* Excellent test coverage (tested on CPython 2.5 - 2.7, 3.2 - 3.3, Jython 2.5.3, PyPy 2.2)
-* Configurable scheduling mechanisms (triggers):
+* Memory
+* `SQLAlchemy <http://www.sqlalchemy.org/>`_ (any RDBMS supported by SQLAlchemy works)
+* `MongoDB <http://www.mongodb.org/>`_
+* `Redis <http://redis.io/>`_
 
-  * Cron-like scheduling
-  * Delayed scheduling of single run jobs (like the UNIX "at" command)
-  * Interval-based (run a job at specified time intervals)
-* Multiple, simultaneously active job stores:
+APScheduler also integrates with several common Python frameworks, like:
 
-  * RAM 
-  * File-based simple database (shelve)
-  * `SQLAlchemy <http://www.sqlalchemy.org/>`_ (any supported RDBMS works)
-  * `MongoDB <http://www.mongodb.org/>`_
-  * `Redis <http://redis.io/>`_
+* `asyncio <http://docs.python.org/3.4/library/asyncio.html>`_ (:pep:`3156`)
+* `gevent <http://www.gevent.org/>`_
+* `Tornado <http://www.tornadoweb.org/>`_
+* `Twisted <http://twistedmatrix.com/>`_
+* `Qt <http://qt-project.org/>`_ (using either `PyQt <http://www.riverbankcomputing.com/software/pyqt/intro>`_
+  or `PySide <http://qt-project.org/wiki/PySide>`_)
+
+.. [#f1] The cutoff period for this is also configurable.
 
 
 Documentation
-=============
+-------------
 
 Documentation can be found `here <http://readthedocs.org/docs/apscheduler/en/latest/>`_.
 
 
 Source
-======
+------
 
-The source can be browsed at `Bitbucket
-<http://bitbucket.org/agronholm/apscheduler/src/>`_.
+The source can be browsed at `Bitbucket <http://bitbucket.org/agronholm/apscheduler/src/>`_.
 
 
 Reporting bugs
-==============
+--------------
 
-A `bug tracker <http://bitbucket.org/agronholm/apscheduler/issues/>`_
+A `bug tracker <https://bitbucket.org/agronholm/apscheduler/issues?status-new&status-open>`_
 is provided by bitbucket.org.
 
 
 Getting help
-============
+------------
 
 If you have problems or other questions, you can either:
 
-* Ask on the `APScheduler Google group
-  <http://groups.google.com/group/apscheduler>`_, or
-* Ask on the ``#apscheduler`` channel on
-  `Freenode IRC <http://freenode.net/irc_servers.shtml>`_
+* Ask on the ``#apscheduler`` channel on `Freenode IRC <http://freenode.net/irc_servers.shtml>`_
+* Ask on the `APScheduler Google group <http://groups.google.com/group/apscheduler>`_, or
+* Ask on `StackOverflow <http://stackoverflow.com/questions/tagged/apscheduler>`_ and tag your question with the
+  ``apscheduler`` tag
diff --git a/apscheduler/__init__.py b/apscheduler/__init__.py
index 71cc53d..205e107 100644
--- a/apscheduler/__init__.py
+++ b/apscheduler/__init__.py
@@ -1,3 +1,5 @@
-version_info = (2, 1, 2)
-version = '.'.join(str(n) for n in version_info[:3])
-release = '.'.join(str(n) for n in version_info)
+version_info = (3, 0, 5)
+version = '3.0.5'
+release = '3.0.5'
+
+__version__ = release  # PEP 396
diff --git a/apscheduler/events.py b/apscheduler/events.py
index 80bde8e..9418263 100644
--- a/apscheduler/events.py
+++ b/apscheduler/events.py
@@ -1,63 +1,72 @@
-__all__ = ('EVENT_SCHEDULER_START', 'EVENT_SCHEDULER_SHUTDOWN',
-           'EVENT_JOBSTORE_ADDED', 'EVENT_JOBSTORE_REMOVED',
-           'EVENT_JOBSTORE_JOB_ADDED', 'EVENT_JOBSTORE_JOB_REMOVED',
-           'EVENT_JOB_EXECUTED', 'EVENT_JOB_ERROR', 'EVENT_JOB_MISSED',
-           'EVENT_ALL', 'SchedulerEvent', 'JobStoreEvent', 'JobEvent')
+__all__ = ('EVENT_SCHEDULER_START', 'EVENT_SCHEDULER_SHUTDOWN', 'EVENT_EXECUTOR_ADDED', 'EVENT_EXECUTOR_REMOVED',
+           'EVENT_JOBSTORE_ADDED', 'EVENT_JOBSTORE_REMOVED', 'EVENT_ALL_JOBS_REMOVED', 'EVENT_JOB_ADDED',
+           'EVENT_JOB_REMOVED', 'EVENT_JOB_MODIFIED', 'EVENT_JOB_EXECUTED', 'EVENT_JOB_ERROR', 'EVENT_JOB_MISSED',
+           'SchedulerEvent', 'JobEvent', 'JobExecutionEvent')
 
 
-EVENT_SCHEDULER_START = 1        # The scheduler was started
-EVENT_SCHEDULER_SHUTDOWN = 2     # The scheduler was shut down
-EVENT_JOBSTORE_ADDED = 4         # A job store was added to the scheduler
-EVENT_JOBSTORE_REMOVED = 8       # A job store was removed from the scheduler
-EVENT_JOBSTORE_JOB_ADDED = 16    # A job was added to a job store
-EVENT_JOBSTORE_JOB_REMOVED = 32  # A job was removed from a job store
-EVENT_JOB_EXECUTED = 64          # A job was executed successfully
-EVENT_JOB_ERROR = 128            # A job raised an exception during execution
-EVENT_JOB_MISSED = 256           # A job's execution was missed
-EVENT_ALL = (EVENT_SCHEDULER_START | EVENT_SCHEDULER_SHUTDOWN |
-             EVENT_JOBSTORE_ADDED | EVENT_JOBSTORE_REMOVED |
-             EVENT_JOBSTORE_JOB_ADDED | EVENT_JOBSTORE_JOB_REMOVED |
-             EVENT_JOB_EXECUTED | EVENT_JOB_ERROR | EVENT_JOB_MISSED)
+EVENT_SCHEDULER_START = 1
+EVENT_SCHEDULER_SHUTDOWN = 2
+EVENT_EXECUTOR_ADDED = 4
+EVENT_EXECUTOR_REMOVED = 8
+EVENT_JOBSTORE_ADDED = 16
+EVENT_JOBSTORE_REMOVED = 32
+EVENT_ALL_JOBS_REMOVED = 64
+EVENT_JOB_ADDED = 128
+EVENT_JOB_REMOVED = 256
+EVENT_JOB_MODIFIED = 512
+EVENT_JOB_EXECUTED = 1024
+EVENT_JOB_ERROR = 2048
+EVENT_JOB_MISSED = 4096
+EVENT_ALL = (EVENT_SCHEDULER_START | EVENT_SCHEDULER_SHUTDOWN | EVENT_JOBSTORE_ADDED | EVENT_JOBSTORE_REMOVED |
+             EVENT_JOB_ADDED | EVENT_JOB_REMOVED | EVENT_JOB_MODIFIED | EVENT_JOB_EXECUTED |
+             EVENT_JOB_ERROR | EVENT_JOB_MISSED)
 
 
 class SchedulerEvent(object):
     """
     An event that concerns the scheduler itself.
 
-    :var code: the type code of this event
+    :ivar code: the type code of this event
+    :ivar alias: alias of the job store or executor that was added or removed (if applicable)
     """
-    def __init__(self, code):
+
+    def __init__(self, code, alias=None):
+        super(SchedulerEvent, self).__init__()
         self.code = code
+        self.alias = alias
+
+    def __repr__(self):
+        return '<%s (code=%d)>' % (self.__class__.__name__, self.code)
 
 
-class JobStoreEvent(SchedulerEvent):
+class JobEvent(SchedulerEvent):
     """
-    An event that concerns job stores.
+    An event that concerns a job.
 
-    :var alias: the alias of the job store involved
-    :var job: the new job if a job was added
+    :ivar code: the type code of this event
+    :ivar job_id: identifier of the job in question
+    :ivar jobstore: alias of the job store containing the job in question
     """
-    def __init__(self, code, alias, job=None):
-        SchedulerEvent.__init__(self, code)
-        self.alias = alias
-        if job:
-            self.job = job
 
+    def __init__(self, code, job_id, jobstore):
+        super(JobEvent, self).__init__(code)
+        self.code = code
+        self.job_id = job_id
+        self.jobstore = jobstore
 
-class JobEvent(SchedulerEvent):
+
+class JobExecutionEvent(JobEvent):
     """
     An event that concerns the execution of individual jobs.
 
-    :var job: the job instance in question
-    :var scheduled_run_time: the time when the job was scheduled to be run
-    :var retval: the return value of the successfully executed job
-    :var exception: the exception raised by the job
-    :var traceback: the traceback object associated with the exception
+    :ivar scheduled_run_time: the time when the job was scheduled to be run
+    :ivar retval: the return value of the successfully executed job
+    :ivar exception: the exception raised by the job
+    :ivar traceback: a formatted traceback for the exception
     """
-    def __init__(self, code, job, scheduled_run_time, retval=None,
-                 exception=None, traceback=None):
-        SchedulerEvent.__init__(self, code)
-        self.job = job
+
+    def __init__(self, code, job_id, jobstore, scheduled_run_time, retval=None, exception=None, traceback=None):
+        super(JobExecutionEvent, self).__init__(code, job_id, jobstore)
         self.scheduled_run_time = scheduled_run_time
         self.retval = retval
         self.exception = exception
diff --git a/apscheduler/executors/__init__.py b/apscheduler/executors/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/apscheduler/executors/asyncio.py b/apscheduler/executors/asyncio.py
new file mode 100644
index 0000000..fade99f
--- /dev/null
+++ b/apscheduler/executors/asyncio.py
@@ -0,0 +1,28 @@
+from __future__ import absolute_import
+import sys
+
+from apscheduler.executors.base import BaseExecutor, run_job
+
+
+class AsyncIOExecutor(BaseExecutor):
+    """
+    Runs jobs in the default executor of the event loop.
+
+    Plugin alias: ``asyncio``
+    """
+
+    def start(self, scheduler, alias):
+        super(AsyncIOExecutor, self).start(scheduler, alias)
+        self._eventloop = scheduler._eventloop
+
+    def _do_submit_job(self, job, run_times):
+        def callback(f):
+            try:
+                events = f.result()
+            except:
+                self._run_job_error(job.id, *sys.exc_info()[1:])
+            else:
+                self._run_job_success(job.id, events)
+
+        f = self._eventloop.run_in_executor(None, run_job, job, job._jobstore_alias, run_times, self._logger.name)
+        f.add_done_callback(callback)
diff --git a/apscheduler/executors/base.py b/apscheduler/executors/base.py
new file mode 100644
index 0000000..7f48b41
--- /dev/null
+++ b/apscheduler/executors/base.py
@@ -0,0 +1,123 @@
+from abc import ABCMeta, abstractmethod
+from collections import defaultdict
+from datetime import datetime, timedelta
+from traceback import format_tb
+import logging
+import sys
+
+from pytz import utc
+import six
+
+from apscheduler.events import JobExecutionEvent, EVENT_JOB_MISSED, EVENT_JOB_ERROR, EVENT_JOB_EXECUTED
+
+
+class MaxInstancesReachedError(Exception):
+    def __init__(self, job):
+        super(MaxInstancesReachedError, self).__init__(
+            'Job "%s" has already reached its maximum number of instances (%d)' % (job.id, job.max_instances))
+
+
+class BaseExecutor(six.with_metaclass(ABCMeta, object)):
+    """Abstract base class that defines the interface that every executor must implement."""
+
+    _scheduler = None
+    _lock = None
+    _logger = logging.getLogger('apscheduler.executors')
+
+    def __init__(self):
+        super(BaseExecutor, self).__init__()
+        self._instances = defaultdict(lambda: 0)
+
+    def start(self, scheduler, alias):
+        """
+        Called by the scheduler when the scheduler is being started or when the executor is being added to an already
+        running scheduler.
+
+        :param apscheduler.schedulers.base.BaseScheduler scheduler: the scheduler that is starting this executor
+        :param str|unicode alias: alias of this executor as it was assigned to the scheduler
+        """
+
+        self._scheduler = scheduler
+        self._lock = scheduler._create_lock()
+        self._logger = logging.getLogger('apscheduler.executors.%s' % alias)
+
+    def shutdown(self, wait=True):
+        """
+        Shuts down this executor.
+
+        :param bool wait: ``True`` to wait until all submitted jobs have been executed
+        """
+
+    def submit_job(self, job, run_times):
+        """
+        Submits job for execution.
+
+        :param Job job: job to execute
+        :param list[datetime] run_times: list of datetimes specifying when the job should have been run
+        :raises MaxInstancesReachedError: if the maximum number of allowed instances for this job has been reached
+        """
+
+        assert self._lock is not None, 'This executor has not been started yet'
+        with self._lock:
+            if self._instances[job.id] >= job.max_instances:
+                raise MaxInstancesReachedError(job)
+
+            self._do_submit_job(job, run_times)
+            self._instances[job.id] += 1
+
+    @abstractmethod
+    def _do_submit_job(self, job, run_times):
+        """Performs the actual task of scheduling `run_job` to be called."""
+
+    def _run_job_success(self, job_id, events):
+        """Called by the executor with the list of generated events when `run_job` has been successfully called."""
+
+        with self._lock:
+            self._instances[job_id] -= 1
+            if self._instances[job_id] == 0:
+                del self._instances[job_id]
+
+        for event in events:
+            self._scheduler._dispatch_event(event)
+
+    def _run_job_error(self, job_id, exc, traceback=None):
+        """Called by the executor with the exception if there is an error calling `run_job`."""
+
+        with self._lock:
+            self._instances[job_id] -= 1
+            if self._instances[job_id] == 0:
+                del self._instances[job_id]
+
+        exc_info = (exc.__class__, exc, traceback)
+        self._logger.error('Error running job %s', job_id, exc_info=exc_info)
+
+
+def run_job(job, jobstore_alias, run_times, logger_name):
+    """Called by executors to run the job. Returns a list of scheduler events to be dispatched by the scheduler."""
+
+    events = []
+    logger = logging.getLogger(logger_name)
+    for run_time in run_times:
+        # See if the job missed its run time window, and handle possible misfires accordingly
+        if job.misfire_grace_time is not None:
+            difference = datetime.now(utc) - run_time
+            grace_time = timedelta(seconds=job.misfire_grace_time)
+            if difference > grace_time:
+                events.append(JobExecutionEvent(EVENT_JOB_MISSED, job.id, jobstore_alias, run_time))
+                logger.warning('Run time of job "%s" was missed by %s', job, difference)
+                continue
+
+        logger.info('Running job "%s" (scheduled at %s)', job, run_time)
+        try:
+            retval = job.func(*job.args, **job.kwargs)
+        except:
+            exc, tb = sys.exc_info()[1:]
+            formatted_tb = ''.join(format_tb(tb))
... 12263 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/apscheduler.git



More information about the Python-modules-commits mailing list