1. Juan-Pablo Scaletti
  2. CherryPy


Robert Brewer  committed bc568ce

A few Python 2.3 fixes.

  • Participants
  • Parent commits 6d70a4e
  • Branches default

Comments (0)

Files changed (3)

File cherrypy/_cpdispatch.py

View file
     classtype = type
 import cherrypy
+from cherrypy._cpcompat import set
 class PageHandler(object):

File cherrypy/lib/gctools.py

View file
         if len(refs) > self.maxparents:
             return [("[%s referrers]" % len(refs), [])]
+        try:
+            ascendcode = self.ascend.__code__
+        except AttributeError:
+            ascendcode = self.ascend.im_func.func_code
         for parent in refs:
-            if inspect.isframe(parent) and parent.f_code is self.ascend.__code__:
+            if inspect.isframe(parent) and parent.f_code is ascendcode:
             if parent in self.ignore:

File cherrypy/test/test_request_obj.py

View file
                 if show_mismatched_params:
-                    self.assertInBody("Bad Request")
+                    self.assertInBody("400 Bad")
         # even if body parameters are wrong, if we get the uri wrong, then