Files changed (1)
!CherryPy 3.2 runs on Python 3! You'll find separate downloadable packages, as well as a separate Subversion branch. Python 2.6 support has been improved, too, by the way.
The FastCGI support in `cherryd` is much improved and tested, including socket file support; also, autoreload and the conflicting signal handlers are now off by default. SCGI support is also included via the `-s` option to `cherryd` (thanks georgem).
`cherryd` now also adds the current directory to sys.path, so that modules in it can be more easily imported. There's also a new `-P` command-line option to prepend additional paths to sys.path.
We now support Python's builtin `ssl` module, in addition to the former `pyOpenSSL`, and there is an established `SSLAdapter` interface for hooking up other SSL libraries. See UpgradeTo32#SSLchanges for more details. In addition, the `pyOpenSSL` adapter sports a new `context` configuration method, which you can set to an instance of `SSL.Context` for more advanced settings. See the `pyOpenSSL` documentation for all the options. It also accepts a `certificate_chain` argument, the filename of CA's intermediate certificate bundle. This is needed for cheaper "chained root" SSL certificates, and should be left as None if not required.
In other parameter news, `multipart/*` requests that have no Content-Disposition are now passed to the handler as a 'parts' argument. See #890.
This dispatcher now includes any `_cp_config` attribute on the `GET`/`POST`/etc handler method itself.
Beginning in !CherryPy 3.2, the "state" argument to `Bus.wait(state, interval)` may be a list or tuple, instead of a single state, in order to wake up on any of several states.
+CherryPy 3.2 has a new `_cpreqbody` module which completely replaces its use of the standard library's `cgi` module (and our `safemime` and `cpcgifs` modules, to boot). There are default processors for common content-types (including improved support for `multipart/*` types), and allows you to write your own custom processors!
+Much of the basic approach to config has been isolated in its own re-usable module at `cherrypy.lib.reprconf`. This includes the `unrepr` approach to configuration (where values use Python syntax), as well as key namespaces and the ability to use dicts, filenames, or file objects.
Engine plugins, whether builtin or custom, may also now be configured if they are added to the engine object itself. The builtin plugins "autoreload", "thread_manager", "signal_handler", "timeout_monitor", and "console_control_handler" are already added. The "on" config entry subscribes or unsubscribes the plugin, and all other entries are set as attributes on the plugin instance.
Additional servers may now be turned on and off, and configured, via config entries in the `server.<servername>.*` namespace. The "servername" portion is arbitrary; it only matters that you use the same name for all settings for the same server. Any new name will add a new server, so that, for example, `server.2.socket_port` will start a new WSGIServer (on that port); any new server is on by default. To start a different type of server, set `server.<servername>.instance` to the server (or its class) you wish to use.
+`request.query_string_encoding` is now available to declare the expected encoding of querystring paramters.
+`response.headers` are now settable in config; just set `response.headers.<field-name> = <field-value>`. For example: `response.headers.Content-Type = "text/plain"`.
There's a new REQUEST_URI environ entry, which equals the [http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.2 Request-URI] in the HTTP spec. Also, the SERVER_NAME entry is no longer settable by the client.
+There's a new pairs of tools for JSON: `json_in` checks the Content-Type of the request and reads the body, decoding it and placing it into `request.json`; `json_out` sets the Content-Type response header and encodes the page handler output to JSON.
-The `trailing_slash` tool has a new `status` argument, to allow XmlHttpRequest's to receive 307 redirects. Defaults to 301.
+The `trailing_slash` tool has a new `status` argument, to allow XmlHttpRequest's to receive 307 redirects. Defaults to 301.
+`tools.autovary` keeps track of which request headers your application accesses, and auto-populates the Vary response header.