Commits

Robert Brewer committed bc568ce

A few Python 2.3 fixes.

  • Participants
  • Parent commits 6d70a4e

Comments (0)

Files changed (3)

File cherrypy/_cpdispatch.py

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

File cherrypy/lib/gctools.py

         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:
                 continue
             if parent in self.ignore:
                 continue

File cherrypy/test/test_request_obj.py

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