Chris McDonough
2010-11-11 5a972bc6a0c608395a495eb12e63020e2295ef6d
refs
author Chris McDonough <chrism@plope.com>
Thursday, November 11, 2010 21:59 +0100
committer Chris McDonough <chrism@plope.com>
Thursday, November 11, 2010 21:59 +0100
commit5a972bc6a0c608395a495eb12e63020e2295ef6d
tree 46b2d7822fcb1c0a7847bd19c331f7149f9649bc tree | zip | gz
parent 5efc45b6387f5ae6e6d3517b294964fb0c15d732 view | diff
Features
--------

- The ``settings`` object which used to be available only when
``request.settings.get_settings`` was called is now available as
``registry.settings`` (e.g. ``request.registry.settings`` in view code).

Deprecations
------------

- Obtaining the ``settings`` object via
``registry.{get|query}Utility(ISettings)`` is now deprecated. Instead,
obtain the ``settings`` object via the ``registry.settings`` attribute. A
backwards compatibility shim was added to the registry object to register
the settings object as an ISettings utility when ``setattr(registry,
'settings', foo)`` is called, but it will be removed in a later release.

- Obtaining the ``settings`` object via ``pyramid.settings.get_settings`` is
now deprecated. Obtain it as the ``settings`` attribute of the registry
now (obtain the registry via ``pyramid.threadlocal.get_registry`` or as
``request.registry``).
12 files modified
92 ■■■■■ changed files
CHANGES.txt 19 ●●●●● diff | view | raw | blame | history
pyramid/configuration.py 18 ●●●● diff | view | raw | blame | history
pyramid/registry.py 13 ●●●●● diff | view | raw | blame | history
pyramid/renderers.py 3 ●●●● diff | view | raw | blame | history
pyramid/router.py 3 ●●●● diff | view | raw | blame | history
pyramid/settings.py 2 ●●● diff | view | raw | blame | history
pyramid/tests/test_configuration.py 9 ●●●●● diff | view | raw | blame | history
pyramid/tests/test_i18n.py 3 ●●●● diff | view | raw | blame | history
pyramid/tests/test_registry.py 10 ●●●●● diff | view | raw | blame | history
pyramid/tests/test_renderers.py 6 ●●●●● diff | view | raw | blame | history
pyramid/tests/test_router.py 3 ●●●● diff | view | raw | blame | history
pyramid/tests/test_settings.py 3 ●●●● diff | view | raw | blame | history