[Bug 368855] Re: formatwarning() definition from cherrypy3 incompatible with Python 2.6
Krzysztof Klimonda
kklimonda at syntaxhighlighted.com
Wed Apr 29 00:16:03 UTC 2009
** Description changed:
- One example is:
+ cherrypy3 overwrites method formatwarning() from python warnings module. The method provided by cherrypy3 is incompatible with Python 2.6 and it may throw an TypeError exception:
File "/var/lib/python-support/python2.6/cherrypy/_cpengine.py", line 77, in startcherrypy.checker()
File "/var/lib/python-support/python2.6/cherrypy/_cpchecker.py", line 24, in __call__
method()
File "/var/lib/python-support/python2.6/cherrypy/_cpchecker.py", line 171, in check_config_namespaces
self._known_ns(app.config)
File "/var/lib/python-support/python2.6/cherrypy/_cpchecker.py", line 166, in _known_ns
warnings.warn(msg)
File "/usr/lib/python2.6/warnings.py", line 29, in _show_warning
file.write(formatwarning(message, category, filename, lineno, line))
TypeError: formatwarning() takes exactly 5 arguments (6 given)
- Ubuntu version: 9.04
- cherrypy3 version: 3.0.2-2
+ The attached patch fixes this issue by adding missing argument (which
+ defaults to None)
- From the cherrypy website I can see that the latest 3.1 release has
- support for python 2.6. I'm willing to help with the upgrade, just need
- a little guidance. Thanks for reading!
+ TEST CASE:
+ The simplest Hello World application from http://www.cherrypy.org/wiki/CherryPyTutorial is enough:
+
+ import cherrypy
+
+ class HelloWorld:
+ def index(self):
+ return "Hello world!"
+ index.exposed = True
+
+ cherrypy.quickstart(HelloWorld())
** Attachment added: "cherrypy3_3.0.2-2ubuntu0.1.debdiff"
http://launchpadlibrarian.net/26104226/cherrypy3_3.0.2-2ubuntu0.1.debdiff
--
formatwarning() definition from cherrypy3 incompatible with Python 2.6
https://bugs.launchpad.net/bugs/368855
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
More information about the universe-bugs
mailing list