[Web-SIG] ANN: Pylons 0.9.5 Released
Ben Bangert
ben at groovie.org
Fri Apr 13 04:47:54 CEST 2007
I'm thrilled to announce a new release of Pylons, with one of the
largest ticket fix counts of any Pylons release thus far. This
release and its associated updates have only been possible with the
growing and active Pylons community. A big shout-out to the many
contributions by Phil Jenvey, Ian Bicking, James Gardner, Mike Orr,
Shannon -jj Behrens, David Smith, Graham Higgins, and Wyatt Baldwin
for their work on Pylons, Routes the mail list, and the
documentation. Many thanks to the numerous others that have reported
bugs and helped out on IRC and the mail list over the past few months.
Also, as Pylons uses so many contributed projects, there's work going
on to better integrate documentation across the smaller projects that
make up the whole. A first stab at this is being taken with the
Python Web Documentation effort which we realize not every single
'python web' project will be using; but its our hope that smaller
WSGI based web components will put their docs up so they can all be
utilized in a single place.
The new documentation wiki:
http://docs.pythonweb.org/
And onto update news for 0.9.5!
There's big change logs for both Pylons and Routes, with some
important updates in WebHelpers and Paste as well.
First, the big improvements in 0.9.5, Unicode and i18n:
- Routes now translates utf-8 characters during both URL generation,
and URL recognition, many thanks to David Smith for numerous patches
- The Request now has an option so that all GET/POST arguments come
in as unicode, with the decoding you prefer
- i18n now uses code contributed from Aquarium by Shannon -jj Behrens
for translation fall-backs and has browser language matching code
- Optional lazy translation options contributed by David Smith
- Routes implicit defaults (action=index, id=None) can be turned off
per route with _explicit=True
- Routes memory can also be disabled by setting the mapper to
explicit=True, which will also disable the implicit defaults
Next, some backward compatibility changes:
Webhelpers:
* WARNING: paginate now takes arguments intended for the collection
object as
query_args. This could affect backwards compatibility. This fixes
a common
issue that non-keyword arguments passed into paginate get eaten by
paginate's
keyword arguments instead of being in *args to go on to the
collection.
* WARNING: Due to a typo, the Text helper highlight function no longer
highlights text with the CSS class name 'hilight' by default: it
now uses the
CSS class name 'highlight' instead. The function's 'hilighter'
keyword
argument has also been deprecated, use 'highlighter' instead.
Pylons:
* WARNING: Pylons now requires the decorator module: it no longer
packages
it as pylons.decorator. Code relying on the
pylons.decorator.decorator
function will trigger a deprecation warning and should be changed
to use
decorator.decorator.
* WARNING: pylons.h was deprecated for using projects' lib.helpers
module
directly in 0.9.3. pylons.h is now formally deprecated (emits
DeprecationWarnings). Projects still accessing pylons.h must
change the
following import:
from pylons import h
to:
import MYPROJ.lib.helpers as h
And finally, the full changelog of the various parts that make Pylons
what it is:
PYLONS
* Fixed paster shell breaking for projects where the base package was
not
the first package listed in top_level.txt. Patch from Alberto
Valverde.
Fixes #229.
* Fixed doc references to config['app_conf']. Fixes #116.
* Changed `get_engine_conf` to properly evaluate sqlalchemy echo
statement
when its 'debug'. Fixes #226.
* make_session and create_engine now accept keyword arguments to pass to
SQLAlchemy's create_engine.
* make_session now accepts the keyword argument 'session_kwargs' to pass
to SQLAlchemy's create_session.
* Fixed _inspect_call to call function with keyword arguments instead
of list
args. Corrects issue with action defaults that caused the value
for the
latter args to be in the wrong spots. Spotted by Topher. Fixes #223.
* Added the allow_none option (passed to xmlrpc.dumps) to
XMLRPCController.
Suggested by Jaroslaw Zabiello.
* Updated XMLRPC Controller with patch for name lookup and additional
unit
tests for the patch. Fixes #216.
* Updated docs for validate decorator to more clearly illustrate what
the
post_only args apply to. Fixes #221.
* Added ability to return strings in the WSGIController. Fixes #218.
* Added lazy i18n translation functions. Patch from David Smith.
Fixes #181.
* Added fix for XMLRPCController system.methodHelp function and unit
test.
Patch and unit test submitted by Graham Higgins.
* Fixed bug in validate decorator with new UnicodeMultiDict response
content
not properly retaining form content as unicode for formencode's
htmlfill.
* Fixed bug in XMLRPC Controller with xmlrpclib Faults not being
properly
transformed into a WSGI response within the controller.
* WARNING: Pylons now requires the decorator module: it no longer
packages
it as pylons.decorator. Code relying on the
pylons.decorator.decorator
function will trigger a deprecation warning and should be changed
to use
decorator.decorator.
* WARNING: pylons.h was deprecated for using projects' lib.helpers
module
directly in 0.9.3. pylons.h is now formally deprecated (emits
DeprecationWarnings). Projects still accessing pylons.h must
change the
following import:
from pylons import h
to:
import MYPROJ.lib.helpers as h
* pylons.jsonify and pylons.Controller references have been deprecated
(they are misplaced references). They continue to be available at
pylons.decorators.jsonify and pylons.controllers.Controller, as
they always
have been.
* Updated templating Buffet to recognize format parameter and
properly pass it
to the template engine.
* Updated LICENSE for new year and to indicate license covering
templates
generated. Fixes #188.
* Interactive debugger now supports Mako. After r1780 if you are using a
custom theme you will need to change '%(myghty_data)s' to
'%(template_data)s' in your template. If you are using JavaScript
the tab
id is now "template_data".
* Fixed bug in WSGIController with private function attempts not
returning a
valid WSGI response.
* Added full unit test coverage of cache decorator.
* Adding messages binary file, enabling i18n unit tests. Updating
pylons.i18n
to import LanguageError. Fixes #193.
* Adding i18n tests, not active yet as they're waiting on a binary
file from a
patch. Refs #193.
* Updated tests so that they now work with nose, removing py.test
requirement.
* Switching config setup to load keys into main config dict with
app_conf and
global_conf keys set for any code looking for those keys. Fixes #116.
* PylonsInstaller is now the default paste.app_install entry point
for new
projects: this makes Cheetah no longer required for the paster
make-config
command. (Thanks Alexander Schremmer, Ian Bicking)
* Added custom redirect_to function in pylons.helpers that will take an
optional _response arg to pull headers and cookies out for
preservation
during a redirect. Fixes #136.
* Changed config.Config.__init__ to take all options as keyword args so
unused args can be skipped. Fixes #162.
* The request object can now automatically decode GET/POST/params
vars to
unicode, when its charset attribute is set.
* Added a new request_settings keyword arg to Config's constructor.
Allows
setting the default charset and errors values of of the request
object.
* Deprecated Config constructor's default_charset keyword arg. Use
Config's
response_settings keyword arg instead.
* Fixed paster controller to test for lib.base and only add that import
statement when its present. This fixes the controller template
when used with
minimal Pylons project templates. Fixes #140 and fixes #139.
* Fixed the paster shell error: KeyError: 'pylons.routes_dict' when
calling
app.get and app.post.
* Fixed paster shell not working on projects with names containing
hyphens.
* Fixed the config directive 'sqlalchemy.echo' set to False being
interpreted
as True. Patch by Alex Conrad.
* Fixed paster shell not restoring CONFIG['global_conf'].
ROUTES
* Fixed matching so that an attempt to match an empty path raises a
RouteException. Fixes #44.
* Added ability to use characters in URL's such as '-' and '_' in
map.resource. Patch by Wyatt Baldwin. Fixes #45.
* Updated Mapper.resource handling with name_prefix and path_prefix
checking
to specify defaults. Also ensures that should either of them be
set, they
override the prefixes should parent_resource be specified. Patch
by Wyatt
Baldwin. Fixes #42.
* Added utf-8 decoding of incoming path arguments, with fallback to
ignoring
them in the very rare cases a malformed request URL is sent. Patch
from
David Smith.
* Fixed treatment of '#' character as something that can be left off and
used in route paths. Found by Mike Orr.
* Added ability to specify parent resource to map.resource command.
Patch from
Wyatt Baldwin.
* Fixed formatted route issue with map.resource when additional
collection
methods are specified. Added unit tests to verify the collection
methods
work properly.
* Updated URL parsing to properly use HTTP_HOST for hostname + port
info before
falling back to SERVER_PORT and SERVER_NAME. Fixes #43.
* Added member_name and collection_name setting to Route object when
made with
map.resource.
* Updated routes.middleware to make the Routes matched accessible as
environ['routes.route'].
* Updating mapper object to use thread local for request data (such as
environ) and middleware now deletes environ references at the end
of the
request.
* Added explicit option to Routes and Mapper. Routes _explicit
setting will
prevent the Route defaults from being implicitly set, while
setting Mapper
to explicit will prevent Route implicit defaults and stop url_for
from using
Route memory. Fixes #38.
* Updated config object so that the route is attached if possible.
* Adding standard logging usage with debug messages.
* Added additional test for normal '.' match and fixed new special
matching to
match it properly. Thanks David Smith.
* Fixed hanging special char issue with 'special' URL chars at the
end of a URL
that are missing the variable afterwards.
* Changed Routes generation and recognition to handle other 'special'
URL chars
, . and ; as if they were /. This lets them be optionally left out
of the
resulting generated URL. Feature requested by David Smith.
* Fixed lookahead assertion in regexp builder to properly handle two
grouped
patterns in a row.
* Applied patch to generation and matching to handle Unicode characters
properly. Reported with patch by David Smith.
WEBHELPERS
* WARNING: paginate now takes arguments intended for the collection
object as
query_args. This could affect backwards compatibility. This fixes
a common
issue that non-keyword arguments passed into paginate get eaten by
paginate's
keyword arguments instead of being in *args to go on to the
collection.
* Added environ checking with Routes so that page will be
automatically pulled
out of the query string, or from the Routes match dict if available.
* Added ability for paginate to check for objects that had SQLAlchemy's
assign_mapper applied to them.
* Added better range checking to paginator to require a positive
value that is
less than the total amount of pages available for a page.
* WARNING: Due to a typo, the Text helper highlight function no longer
highlights text with the CSS class name 'hilight' by default: it
now uses the
CSS class name 'highlight' instead. The function's 'hilighter'
keyword
argument has also been deprecated, use 'highlighter' instead.
* Fixed the broken markdown function.
* Upgraded markdown from 1.5 to 1.6a.
* Sync'd Prototype helper to 6057.
* Sync'd Urls helper to 6070.
* Sync'd Text helper to 6096.
* Sync'd Date helper to 6080.
* Sync'd Tags helper to 5857.
* Sync'd Asset tag helper to 6057.
* Sync'd Rails Number helper to 6045.
* Updated Ajax commands to internally use 'with_' to avoid name
conflicts with
Python 2.5 and beyond. Reported by anilj. Fixes #190.
* Applied patch from David Smith to decode URL parts as Routes does.
Fixes #186.
* Changed pagination to give better response if its passed an invalid
object.
Patch from Christoph Haas.
* Fixed scriptaculous helper docs example. Fixes #178.
* Updated scriptaculous/prototype to Prototype 1.5.0 and
Scriptaculous 1.7.0.
* Updated scriptaculous javascripts to 1.6.5. Fixes #155.
* Updated remote_function doc-string to more clearly indicate the
arguments
it can receive.
* Synced Rails Javascript helper to 5245 (escape_javascript now escaping
backslashes and allow passing html_options to javascript_tag).
PASTE
* In ``paste.httpserver`` remove the reverse DNS lookup to set
``REMOTE_HOST``
* In ``paste.fileapp``, if the client sends both If-None-Match and
If-Modified-Since, prefer If-None-Match. Make ETags include the
size as well as last modified timestamp. Make it possible to
override how mimetypes are guessed.
* ``HTTPException`` objects now have a ``exc.response(environ)``
method that returns a ``WSGIResponse`` object.
* ``egg:Paste#watch_threads`` will show tracebacks of each thread
under Python 2.5.
* Made ``paste.util.template`` trim whitespace around statements that
are on their own line.
* ``paste.fileapp.DataApp`` now accepts ``allowed_headers=[...]`` to
specify the allowed headers. By default only ``GET`` and ``HEAD``
are allowed.
* Added ``paste.util.import_string.try_import_module``, which imports
modules and catches ``ImportError``, but only if it's an error
importing the specific module, not an uncaught ``ImportError`` in
the module being imported.
PASTESCRIPT
1.3.3
-----
* Fixed problem with ``paster serve`` on Windows. Also on Windows,
fixed issue with executables with spaces in their names (this case
requires the ``win32all`` module).
* You can use ``+dot+`` in your project template filenames,
specifically so that you can use leading dots in the filename.
Usually leading dots cause the file to be ignored. So if you want
to have new projects contain a ``.cvsignore`` file, you can put a
``+dot+cvsignore`` file in your template.
* Relatedly, ``+plus+`` has been added so you can include pluses.
1.3.2
-----
* ``paster`` was largely broken under Windows; fixed.
1.3.1
-----
* Fix related to Python 2.5 (when there are errors creating files, you
could get infinite recursion under Python 2.5).
* Use ``subprocess`` module in ``paster serve`` command. Added
``--monitor`` option which will restart the server if it exits.
* The ``exe`` command now does % substitution in keys (e.g.,
``pid_file=%(here)s/paste.pid``).
* Some import problems with Cheetah should be improved.
1.3
---
* Fixed an exception being raised when shutting down flup servers using
sockets.
* Fixed the CherryPy 3 WSGI server entry point's handling of SIGHUP
and SIGTERM.
* The CherryPy wsgiserver is now available at
``paste.script.wsgiserver`` (no longer requiring CherryPy to be
installed).
* Added entry point for twisted server.
* Made ``paste.script.pluginlib:egg_info_dir`` work with packages that
put the ``Package.egg-info/`` directory in a subdirectory (typically
``src/``).
* Remove Cheetah requirement. Packages using Cheetah templates should
require Cheetah themselves. If you are using ``paster make-config``
and you *don't* want to use Cheetah, you must add ``use_cheetah =
False`` to your ``Installer`` subclass (it defaults to true for
backward compatibility).
* Make scripts work when there is no ``setup.py`` (if you aren't
making a Python/setuptools package).
* When using ``paste.script.copydir.copy_dir`` (as with most ``paster
create`` templates), you can raise ``SkipTemplate`` (or call the
``skip_template()`` function) which will cause the template to be
skipped. You can use this to conditionally include files.
* When using ``paster serve c:/...``, it should no longer confuse
``c:`` with a scheme (such as ``config:`` or ``egg:``).
* More careful about catching import errors in ``websetup``, so if you
have a bug in your ``app.websetup`` module it won't swallow it.
Cheers,
Ben
More information about the Web-SIG
mailing list