Update cherrypy-18.6.1

This commit is contained in:
JonnyWong16 2021-10-14 21:17:18 -07:00
parent b3ae6bd695
commit ebffd124f6
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
57 changed files with 1269 additions and 1509 deletions

View file

@ -1,10 +1,6 @@
import sys
import imp
import types
import importlib
import six
import cherrypy
from cherrypy.test import helper
@ -27,7 +23,7 @@ class TutorialTest(helper.CPWebCase):
"""
target = 'cherrypy.tutorial.' + name
if target in sys.modules:
module = imp.reload(sys.modules[target])
module = importlib.reload(sys.modules[target])
else:
module = importlib.import_module(target)
return module
@ -39,8 +35,6 @@ class TutorialTest(helper.CPWebCase):
root = getattr(module, root_name)
conf = getattr(module, 'tutconf')
class_types = type,
if six.PY2:
class_types += types.ClassType,
if isinstance(root, class_types):
root = root()
cherrypy.tree.mount(root, config=conf)