Download at http://www.cherrypy.org/wiki/CherryPyDownload.
This is primarily a bugfix release for 3.1. Here are the higlights:
Packaging:
* The 'scaffold' package is now correctly mentioned in setup.py
Core:
* Mismatched arguments to a handler would produce 500 errors. In
[2030], these were changed to 400/404.
* CherryPy would always override log levels set on logger roots. See
#852.
Tools:
* Automatic etags would break if they contained unicode. See #835.
* XML-RPC errors would break if other tool arguments were provided. See
#836.
* tools.session_auth would throw an error whenever a previous tool or
the dispatcher added an entry to request.params. See #780.
* File-based session paths might not all have been made absolute. See
#840.
* The session cleanup thread may now be disabled by setting
tools.session.clean_freq = 0. See #854.
* Static files with Range requests would read the whole file into
memory. See #859.
Servers:
* The wsgiserver now works correctly on Python 2.6!
* Modpython was throwing some timeouts in 3.1.0 due to starting the
engine more than once.
* FastCGI support in cherryd was improved. UNIX sockets are now
available via server.socket_file. Autoreload has also been correctly
turned off now. Finally, flup server instantiation has been moved from
init to start so that it only starts threads when engine.start is called
(see [2023]).
* The test suites for modwsgi, modpygw, cpmodpy, and modfcgid are now
up to date.
* cherrypy.engine writes to a log via subscribers to the 'log' channel.
In 3.1.0, if there was an error in one of these subcribers, an infinite
loop was entered. Fixed in [2027].
* A buglet in the DropPrivileges engine plugin was fixed, and its
priority was bumped to allow binding to a low port as root.
* Open sockets are no longer inherited by child processes. See #856.
* A malformed Request-Line given to wsgiserver now gives a 400 error
instead of 500 + traceback.
* AUTH_TYPE and REMOTE_USER are no longer set by wsgiserver. See #850.
There are some previews of 3.2 features as well. Don't rely on these if
you need to support both 3.1.0 and 3.1.1 in the same application:
* Engine attributes and plugins are now accessible from config! Turn on
or off any standard plugin via "engine.<plugin-name>.on = True/False"
instead of having to call subscribe/unsubscribe in code.
* An SCGI server was added in [2022], along with a new -s command-line
argument to cherryd to use it.
* There's a new server.thread_pool_max attribute.
* Modules in the current directory may now be imported by cherryd.
* cherrypy.engine.wait may now wait on multiple states. See [2037].
Robert Brewer
fuma...@aminus.org
After changing _cpchecker.py's (line 42) monkey patch from...
def formatwarning(self, message, category, filename, lineno):
to match python's std lib warnings.py (line 36)...
def formatwarning(self, message, category, filename, lineno, line=None):
things work on v2.6 (haven't checked 2.5) with my very simple test shown below.
I'm just starting to get serious evaluate CP so it's likely I've missed something. That said, I wonder if _cpchecker.py should be overriding warning.py's _show_warning hook on line 24?
My code problem or CP's?
Jon
SIMPLE CP TEST CODE
===================
import cherrypy
class Root(object):
@cherrypy.expose
def index(self):
return '''
<html>
<body>
<p>There is an <a href="showMessage">important message</a> waiting for you!</p>
</body>
</html>
'''
@cherrypy.expose
def showMessage(self):
return '''
<html>
<body>
<p>Hello CherryPy World!</p>
</body>
</html>
'''
def main():
# Global site config; can also be in a file
cherrypy.config.update({'server.socket_host' : '127.0.0.1',
'server.socket_port' : 8080,
'server.thread_pool' : 10,
'engine.autoreload.on' : True})
cherrypy.tree.mount(Root(), '/')
cherrypy.engine.start()
cherrypy.engine.block()
if __name__ == '__main__':
main()
TRACEBACK SNIPPET
=================
E:\Python26\lib\site-packages\cherrypy-3.1.1-py2.6.egg\cherrypy\lib\cptools.py:4: Deprecat
ionWarning: the md5 module is deprecated; use hashlib instead
import md5
E:\Python26\lib\site-packages\cherrypy-3.1.1-py2.6.egg\cherrypy\lib\sessions.py:16: Deprec
ationWarning: the sha module is deprecated; use the hashlib module instead
import sha
E:\Python26\lib\site-packages\cherrypy-3.1.1-py2.6.egg\cherrypy\_cperror.py:190: Deprecati
onWarning: BaseException.message has been deprecated as of Python 2.6
self.message = message
[11/Nov/2008:11:06:52] ENGINE Bus STARTING
[11/Nov/2008:11:06:52] ENGINE Error in 'start' listener <cherrypy._cpchecker.Checker objec
t at 0x00B89470>
Traceback (most recent call last):
File "e:\python26\lib\site-packages\CherryPy-3.1.1-py2.6.egg\cherrypy\process\wspbus.py"
, line 147, in publish
output.append(listener(*args, **kwargs))
File "e:\python26\lib\site-packages\CherryPy-3.1.1-py2.6.egg\cherrypy\_cpchecker.py", li
ne 38, in __call__
method()
File "e:\python26\lib\site-packages\CherryPy-3.1.1-py2.6.egg\cherrypy\_cpchecker.py", li
ne 61, in check_skipped_app_config
warnings.warn(msg)
File "E:\Python26\lib\warnings.py", line 29, in _show_warning
file.write(formatwarning(message, category, filename, lineno, line))
TypeError: formatwarning() takes exactly 5 arguments (6 given)