Next release ============ Bug Fixes --------- - Forward port from 1.3 branch: When no authentication policy was configured, a call to ``pyramid.security.effective_principals`` would unconditionally return the empty list. This was incorrect, it should have unconditionally returned ``[Everyone]``, and now does. - Explicit url dispatch regexes can now contain colons. https://github.com/Pylons/pyramid/issues/629 - On at least one 64-bit Ubuntu system under Python 3.2, using the ``view_config`` decorator caused a ``RuntimeError: dictionary changed size during iteration`` exception. It no longer does. See https://github.com/Pylons/pyramid/issues/635 for more information. Features -------- - Custom objects can be made easily JSON-serializable in Pyramid by defining a ``__json__`` method on the object's class. This method should return values natively serializable by ``json.dumps`` (such as ints, lists, dictionaries, strings, and so forth). - The JSON renderer now allows for the definition of custom type adapters to convert unknown objects to JSON serializations. - As of this release, the ``request_method`` predicate, when used, will also imply that ``HEAD`` is implied when you use ``GET``. For example, using ``@view_config(request_method='GET')`` is equivalent to using ``@view_config(request_method=('GET', 'HEAD'))``. Using ``@view_config(request_method=('GET', 'POST')`` is equivalent to using ``@view_config(request_method=('GET', 'HEAD', 'POST')``. This is because HEAD is a variant of GET that omits the body, and WebOb has special support to return an empty body when a HEAD is used. - ``config.set_request_property`` now causes less code to be executed at request construction time. - Don't add a ``?`` to URLs generated by request.resource_url if the ``query`` argument is provided but empty. - Don't add a ``?`` to URLs generated by request.route_url if the ``_query`` argument is provided but empty. - The static view machinery now raises (rather than returns) ``HTTPNotFound`` and ``HTTPMovedPermanently`` exceptions, so these can be caught by the NotFound view (and other exception views). - The mako renderer now accepts a def name and returns the template def result for the view being called. The uri format using an asset spec is package:path/to/template#defname.mako. The old way of returning a tuple from the view is supported for backward compatibility, ('defname', {}). - When there is a predicate mismatch exception (seen when no view matches for a given request due to predicates not working), the exception now contains a textual description of the predicate which didn't match.