Hi folks,

We're putting out a release candidate for 0.9.6 this time to ensure any quirks we find can be corrected before the final. Please feel free to update your projects (http://wiki.pylonshq.com/display/ pylonsdocs/Upgrading), of course keep a backup of your existing one. :)

After we're sure the release candidate is solid, we'll release the official 0.9.6.

I'd like to thank Phil Jenvey and the many other contributers who've helped make 0.9.6 a great update. David Smith is also now a core Pylons committer and we're looking forward to his help with the project.

There's some very important changes in this release as we further deprecate some things that will eventually be going away. All major changes that you should watch for in your project are in the changelog with a big WARNING.

The big changes summarized:
- Global response object
Back in 0.8, there was a global response object as well, which went away in favor of explicitly returning a Response object. However after much discussion with other Pylons users, the incredible usefulness of a global response object made it too tough to pass by. Bringing a global response object into the system also made a lot of tasks significantly simpler.

- pylons.database is deprecated, its not going away quite yet, but we *highly* encourage everyone to start using SAContext. It works great, and really makes things easy.

- Global config object
People have been trying to get to their config options from a variety of places, and there just wasn't a consistent and easy way to do it. Now there is, with the pylons.config object. This change also streamlines the environment.py and middleware.py files in your project, so that middleware is *just* middleware, and the environent file sets up all your project options.

There's a ton of other fixes as well, please submit any bugs discovered, hopefully we won't need a release candidate 2. :)

Cheers,
Ben Bangert


The CHANGELOG:

* Fixed cookie header addition to use add instead of append. Thanks to
  anonymous patcher. Fixes #268, again.
* Added ability to pass _code option to specify the status code type for
  redirect_to.
* Fixed redirect_to to not copy all headers into redirect for old _response
  usage. Fixes #268.
* WARNING: By default, the Pylons response object now returns unicode
parameter (pylons.GET/POST/params) values (and assumes those parameters
  were sent to Pylons as utf-8). Unicode parameters can cause major
problems if your application is not setup to handle unicode. To disable unicode parameters (0.9.5 default behavior), add the following to your
  load_environment function (0.9.6 syntax):

  pylons.config['request_options']['charset'] = None

or, if still using the deprecated pre-0.9.6 pylons.config syntax, add:

  request_settings = pylons.config.request_defaults.copy()
  request_settings['charset'] = None
  return pylons.config.Config(tmpl_options, map, paths,
                              request_settings=request_settings)

* WARNING: Template names beginning with a / (or the OS's path separator) will now result in the name not having the separator's replaced with '.'s for the template engine. This shouldn't affect most projects as they usually assume a dot notation will be used with dot notation template engines (Kid, Genshi, etc.). This change allows template engines that can take filename
  paths to function properly. Fixes #233.
* WARNING: The pylons.util.get_prefix(environ) function is deprecated. Please
  use:
      environ.get('SCRIPT_NAME', '')
instead (the get_prefix function is used in the default ErrorController).
  Fixes #243.
* WARNING: The paths dictionary's 'root_path' has moved to the less
  redundant 'root'.
* Fixed the Error Documents/EvalException css referencing non- existent images.
  Thanks Shannon -jj Behrens. Fixes #238.
* Added ability to pass _code option to specify the status code type for
  redirect_to.
* Fixed redirect_to to not copy all headers into redirect for old _response
  usage. Fixes #268.
* Added logging statements throughout Pylons code, added logging setup to
  default template. Fixes #98.
* Refactored global response to be setup in wsgiapp along with the other
globals. Updated WSGIController to copy in global response headers and
  cookies into a WSGI app's output.
* Added global pylons.response object. Thanks Shannon -jj Behrens and Damjan
  Georgievski. Fixes #268 and #201.
* Updated default project template files for new configuration layout. Options to handle config now just in environment.py, and middleware.py handling just
  middleware. Fixes #203.
* Removing mako tests, as its now the default. Default test changed from
  Myghty to Mako.
* Changing default templating to mako.
* Added the https decorator. It requires an action to be loaded via
  https. Patch by ido. Fixes #241.
* Added upgrade instructions, and posted a copy on the wiki. Fixes #230.
* Added deprecation warnings for usage of the Pylons Controller class, all
  controllers should inherit from WSGIController instead. Fixes #239.
* Removed deprecated attach_locals function from Controller class.
* Added an authenticate_form decorator for use with WebHelpers'
  secure_form_tag functions for preventing CSRF attacks. Original patch
  by David Turner. Fixes #157.
* Fix Buffet's include_pylons_variables not being upheld. Thanks Jonathan
  LaCour.
* The validate decorator now accepts extra keyword arguments (**htmlfill_kwargs)
  to pass along to formencode's htmlfill.render function.
* Removed POST-only restriction on validate decorator, now handles GET
requests. No form arg required during a GET request, which will run the
  current action with c.form_errors set to the errors. Fixes #246.
* Added PylonsConfig, which gets accessed as pylons.config dict. Contains
  all the merged ini options, in addition to the Config options such as
'routes.map', 'pylons.paths', 'buffet.template_options', etc. Check the
  pylons.config docs on PylonsConfig for dict keys populated by it.
* Split up resolution stages in wsgiapp, so that controller lookup is a
  separate function making it easier to subclass. PylonsApp now takes a
base_wsgi_app argument which is then used for the BaseWSGIApp instead of the
  one from wsgiapp.py.
* Added mako template render tests.
* Added storage of the action func used to handle a call, for later code that might need a reference to the action that originally handled the request.
  Fixes #253.
* Updated config object to optionally take a single merged conf dict, updated
  project templates to pass around the single merged conf dict.
* Changed project template to use new Beaker session keys.
* Changed default routing for raw template matching to not unicode decode the
  route argument. Fixes #242.
* Catch any exceptions raised by template engine entry points and emit a
  warning instead of crashing. Thanks markbradley. Fixes #249
* Fixed the validate decorator not working with formencode's
  CompoundValidators when variable_decode=False. Fixes #209.
* Fixed the validate decorator failing with a KeyError when no value is
specified to validate against for separate validators (as opposed to a
  schema). Reported by Graham Stratton.
* Fixed paster shell not merging app_conf and global_conf into the main CONFIG
  dict namespace. Original patch by David Smith. Fixes #244.
* Added logging to decorators. Refs #98.
* Fixed paster restcontroller to test for lib.base and only add that import statement when its present. This fixes the restcontroller template when used
  with minimal Pylons project templates. Fixes #237.
* Fixed the EvalException debugger showing broken links and buttons when the app's ErrorController was broken (such as when BaseController's __before__
  raises an exception). Suggested by Ian Bicking. Fixes #228.
* paster create now accepts a 'template_engine' option to setup the new
  project's default template engine. E.g. to create a new project that
  uses Genshi by default, use:
  paster create --template=pylons mygenshiproj template_engine=genshi
  Suggested by Ian Bicking. Fixes #141.
* Fixed the validate decorator triggering the following error with
  FormEncode>=0.7 and non-ascii rendered form content:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 10: ordinal not in range(128) the form was passed in as an encoded string, but some data or error messages were unicode strings; the form should be passed
  in as a unicode string
  Reported by Christoph Haas.
* HTTPExceptions are now converted to Response objects (for __after__),
  making the httpexceptions middleware no longer required.
* Added Warning to jsonify to warn about cross-site attacks when returning
  a list as the outer-most element to jsonify. Fixes #232.
* Fixed beaker_cache decorator to take optional keyword arguments intended
  for the backend cache container (such as url for memcached).
* Fixed paster controller assuming the minimal template was in use when
  the lib.base module existed but raised an exception.
* Fixed bug in XMLRPC Controller not setting proper Content-Type. Fixes #236.
* Added the '-d' ('--disable-ipython') option to paster shell for
  disabling IPython.
* Allow creation of controllers named 'setup' via paster controller.
  Reported by Matt Good.
* Added support for generic arguments to SQLAlchemy's create_engine of
  the form sqlalchemy.* from the PasteDeploy config file.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to