From b73edc8a1b99dd513cfe82c045f3e6bb502f4c69 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Fri, 30 Dec 2011 02:32:54 -0600 Subject: Updated the changelog for Request.set_property. --- CHANGES.txt | 12 ++++++++++++ docs/whatsnew-1.3.rst | 10 ++++++++++ 2 files changed, 22 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 3feaa6332..5d05b60b8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,15 @@ +Unreleased +========== + +Features +-------- + +- New API: ``pyramid.request.Request.set_property``. Add lazy property + descriptors to a request without changing the request factory. New + properties may be reified, effectively caching the value for the lifetime + of the instance. Common use-cases for this would be to get a database + connection for the request or identify the current user. + 1.3a3 (2011-12-21) ================== diff --git a/docs/whatsnew-1.3.rst b/docs/whatsnew-1.3.rst index b61893536..acbaa1335 100644 --- a/docs/whatsnew-1.3.rst +++ b/docs/whatsnew-1.3.rst @@ -206,6 +206,16 @@ This also works for imperative view configurations that involve a class. See :ref:`view_defaults` for more information. +Extending a Request without Subclassing +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +It is now possible to extend a :class:`pyramid.request.Request` object +with property descriptors without having to create a subclass via +:meth:`pyramid.request.Request.set_property`. New properties may be +reified, effectively caching the value for the lifetime of the instance. +Common use-cases for this would be to get a database connection for the +request or identify the current user. + Minor Feature Additions ----------------------- -- cgit v1.2.3