Anonymous committed 16820eb

Changed page WhatsNewIn32

Comments (0)

Files changed (1)

-[This document is up-to-date as of [2225].
+[This document is up-to-date as of [2366].
 = What's new in CherryPy 3.2 =
 !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.
-== Improvements to cherryd ==
+== cherryd ==
 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.
-== wsgiserver Improvements ==
+== wsgiserver ==
 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.
-=== MethodDispatcher ===
+=== !MethodDispatcher ===
 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.
+== Request Bodies ==
+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!
 == Configuration ==
+=== reprconf ===
+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 ===
 All engine attributes may now be changed in config via the "engine.*" config namespace.
 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.
                         'engine.my_plugin.a': 16})
+=== server ===
 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 ===
+`request.query_string_encoding` is now available to declare the expected encoding of querystring paramters.
+=== response ===
+`response.headers` are now settable in config; just set `response.headers.<field-name> = <field-value>`. For example: `response.headers.Content-Type = "text/plain"`.
 == HTTPError ==
 `cherrypy.HTTPError` now takes full reason phrases in the `status` argument. See #898.
 There's a new REQUEST_URI environ entry, which equals the [ Request-URI] in the HTTP spec. Also, the SERVER_NAME entry is no longer settable by the client.
-== Tool Improvements ==
+== Tools ==
+=== JSON ===
+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.
 === Sessions ===
 === trailing_slash ===
-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.
+=== autovary ===
+`tools.autovary` keeps track of which request headers your application accesses, and auto-populates the Vary response header.
+=== auth ===
+Thanks to visteya, the existing `basic_auth` and `digest_auth` tools have been supplemented with `tools.auth_basic` and `tools.auth_digest`. See #913 and #914 for all the reasons why you should switch.