Pyramid 1.1a2 发布

The second alpha of Pyramid 1.1 (1.1a2) has been released.

Here are the changes:

Bug Fixes
---------

- 1.1a1 broke Akhet by not providing a backwards compatibility import
shim for ``pyramid.paster.PyramidTemplate``.  Now one has been
added, although a deprecation warning is emitted when Akhet imports
it.

- If multiple specs were provided in a single call to
``config.add_translation_dirs``, the directories were inserted into
the beginning of the directory list in the wrong order: they were
inserted in the reverse of the order they were provided in the
``*specs`` list (items later in the list were added before ones
earlier in the list).  This is now fixed.

Backwards Incompatibilities
---------------------------

- The pyramid Router attempted to set a value into the key
``environ['repoze.bfg.message']`` when it caught a view-related
exception for backwards compatibility with applications written for
``repoze.bfg`` during error handling.  It did this by using code
that looked like so::

                   # "why" is an exception object
                   try:
                       msg = why[0]
                   except:
                       msg = ''

                   environ['repoze.bfg.message'] = msg

Use of the value ``environ['repoze.bfg.message']`` was
docs-deprecated in Pyramid 1.0.  Our standing policy is to not
remove features after a deprecation for two full major releases, so
this code was originally slated to be removed in Pyramid 1.2.
However, computing the ``repoze.bfg.message`` value was the source
of at least one bug found in the wild
(https://github.com/Pylons/pyramid/issues/199 ), and there isn't a
foolproof way to both preserve backwards compatibility and to fix
the bug.  Therefore, the code which sets the value has been removed
in this release.  Code in exception views which relies on this
value's presence in the environment should now use the ``exception``
attribute of the request (e.g. ``request.exception[0]``) to retrieve
the message instead of relying on
``request.environ['repoze.bfg.message']``.


A "What's New In Pyramid 1.1" document exists at
http://docs.pylonsproject.org/projects/pyramid/1.1/whatsnew-1.1.html  .

You will be able to see the 1.1 release documentation (across all
alphas and betas, as well as when it eventually gets to final release)
at http://docs.pylonsproject.org/projects/pyramid/1.1/  .

You can install it via PyPI:

easy_install Pyramid==1.1a2

Enjoy, and please report any issues you find to the issue tracker at
https://github.com/Pylons/pyramid/issues

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。