Commits

Jason R. Coombs committed b56698b Merge

Merge 3.2.x

  • Participants
  • Parent commits 6d909d9, 01b6adc

Comments (0)

Files changed (2)

cherrypy/_cpcompat.py

 import os
 import re
 import sys
+import threading
 
 if sys.version_info >= (3, 0):
     py3k = True
     # Python 2
     def next(i):
         return i.next()
+
+if sys.version_info >= (3,3):
+    Timer = threading.Timer
+else:
+    # Python 3.2 and earlier
+    Timer = threading._Timer

cherrypy/process/plugins.py

 import time
 import threading
 
-from cherrypy._cpcompat import basestring, get_daemon, get_thread_ident, ntob, set
+from cherrypy._cpcompat import basestring, get_daemon, get_thread_ident, ntob, set, Timer
 
 # _module__file__base is used by Autoreload to make
 # absolute any filenames retrieved from sys.modules which are not
             pass
 
 
-class PerpetualTimer(threading._Timer):
+class PerpetualTimer(Timer):
     """A responsive subclass of threading._Timer whose run() method repeats.
 
     Use this timer only when you really need a very interruptible timer;