Commits

Jason R. Coombs committed b56698b Merge

Merge 3.2.x

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;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.