chrisspen/django-chroniker

Python 3.8 Support

mschiegg opened this issue · 3 comments

I have upgraded to Python 3.8.
Now Chroniker throw an Error on every Job

AttributeError
chroniker/utils.py in init at line 280
module 'time' has no attribute 'clock'

daemon = True    
def __init__(self, max_seconds, time_type=c.MAX_TIME, fout=None, check_freq=1, *args, **kwargs):
        super(TimedProcess, self).__init__(*args, **kwargs)
        self.fout = fout or sys.stdout
        self.t0 = time.clock()
        self.t0_objective = time.time()
        self.max_seconds = float(max_seconds)
        self.t1 = None
        self.t1_objective = None
        # The number of seconds the process waits between checks.

I think this should work.

time.clock is depraceted since Python 3.3 and removed in 3.8
Replace time.clock() function with time.process_time()
chroniker/utils.py in init at line 280

If that's the only problem, it looks like a really easy fix. Any chance of it being taken care of soon? Chroniker isn't working for me because we're using Python 3.8

If that's the only problem, it looks like a really easy fix. Any chance of it being taken care of soon? Chroniker isn't working for me because we're using Python 3.8

Currently I have no other problems with 3.8