Eduardo Robles Elvira  committed 07991fe

removing pytz dependency, just using datetime.utcnow instead of, as recommended here:

  • Participants
  • Parent commits 6b9ce23
  • Branches default

Comments (0)

Files changed (2)

File apscheduler/

 from logging import getLogger
 import os
 import sys
-import pytz
 from apscheduler.util import *
 from apscheduler.triggers import SimpleTrigger, IntervalTrigger, CronTrigger
                     logger.exception('Error notifying listener')
     def _real_add_job(self, job, jobstore, wakeup):
-        job.compute_next_run_time(
+        job.compute_next_run_time(datetime.utcnow())
         if not job.next_run_time:
             raise ValueError('Not adding job since it would never be run')
         for run_time in run_times:
             # See if the job missed its run time window, and handle possible
             # misfires accordingly
-            difference = - run_time
+            difference = datetime.utcnow() - run_time
             grace_time = timedelta(seconds=job.misfire_grace_time)
             if difference > grace_time:
                 # Notify listeners about a missed run
         while not self._stopped:
             logger.debug('Looking for jobs to run')
-            now =
+            now = datetime.utcnow()
             next_wakeup_time = self._process_jobs(now)
             # Sleep until the next job is scheduled to be run,
 # coding: utf-8
 import os.path
-from pip.req import parse_requirements
     from setuptools import setup
 import apscheduler
-# parse_requirements() returns generator of pip.req.InstallRequirement objects
-install_reqs = parse_requirements("requirements.txt")
-# reqs is a list of requirement
-# e.g. ['django==1.5.1', 'mezzanine==1.4.6']
-reqs = [str(ir.req) for ir in install_reqs]
 here = os.path.dirname(__file__)
 readme_path = os.path.join(here, 'README.rst')
 readme = open(readme_path).read()
     keywords='scheduling cron',
-    install_requires=reqs,
     packages=('apscheduler', 'apscheduler.jobstores', 'apscheduler.triggers', 'apscheduler.triggers.cron'),