From 1b555e2b7911bc3d8cee811986ec67c88fa36cad Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sun, 5 Jan 2020 18:57:39 -0600 Subject: add changelog for #3559 --- CHANGES.rst | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CHANGES.rst') diff --git a/CHANGES.rst b/CHANGES.rst index 383906e00..70ee43b96 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -71,6 +71,13 @@ Features - Fix ``DeprecationWarning`` emitted by using the ``imp`` module. See https://github.com/Pylons/pyramid/pull/3553 +- Properties created via ``config.add_request_method(..., property=True)`` or + ``request.set_property`` used to be readonly. They can now be overridden + via ``request.foo = ...`` and until the value is deleted it will return + the overridden value. This is most useful when mocking request properties + in testing. + See https://github.com/Pylons/pyramid/pull/3559 + Deprecations ------------ -- cgit v1.2.3 From 5c05cd9837adcd9b0ee0ee775added2a6d3b6688 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Wed, 8 Jan 2020 01:15:02 -0600 Subject: invoke finished callbacks in prepare/bootstrap closers --- CHANGES.rst | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.rst') diff --git a/CHANGES.rst b/CHANGES.rst index 70ee43b96..70f5bbb64 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -78,6 +78,10 @@ Features in testing. See https://github.com/Pylons/pyramid/pull/3559 +- Finished callbacks are now executed as part of the ``closer`` that is + invoked as part of ``pyramid.scripting.prepare`` and + ``pyramid.paster.boostrap``. + Deprecations ------------ -- cgit v1.2.3 From 8415bc1778ea080aeed69ef2d752f3d0063e26f9 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Wed, 8 Jan 2020 01:15:31 -0600 Subject: add a RequestLocalCache class --- CHANGES.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CHANGES.rst') diff --git a/CHANGES.rst b/CHANGES.rst index 70f5bbb64..e93f8a813 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -82,6 +82,16 @@ Features invoked as part of ``pyramid.scripting.prepare`` and ``pyramid.paster.boostrap``. +- Added ``pyramid.request.RequestLocalCache`` which can be used to create + simple objects that are shared across requests and can be used to store + per-request data. This is useful when the source of data is external to + the request itself. Often a reified property is used on a request via + ``pyramid.config.Configurator.add_request_method``, or + ``pyramid.decorator.reify``, and these work great when the data is + generated on-demand when accessing the request property. However, often + the case is that the data is generated when accessing some other system + and then we want to cache the data for the duration of the request. + Deprecations ------------ -- cgit v1.2.3 From df1c19ac429d680f094b6323ad9fc02623d5e953 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Wed, 8 Jan 2020 01:19:17 -0600 Subject: link to pr --- CHANGES.rst | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CHANGES.rst') diff --git a/CHANGES.rst b/CHANGES.rst index e93f8a813..d1807103f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -81,6 +81,7 @@ Features - Finished callbacks are now executed as part of the ``closer`` that is invoked as part of ``pyramid.scripting.prepare`` and ``pyramid.paster.boostrap``. + See https://github.com/Pylons/pyramid/pull/3561 - Added ``pyramid.request.RequestLocalCache`` which can be used to create simple objects that are shared across requests and can be used to store @@ -91,6 +92,7 @@ Features generated on-demand when accessing the request property. However, often the case is that the data is generated when accessing some other system and then we want to cache the data for the duration of the request. + See https://github.com/Pylons/pyramid/pull/3561 Deprecations ------------ -- cgit v1.2.3 From 025824417f0d779f41717a28047dc420991015aa Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Wed, 8 Jan 2020 10:11:35 -0600 Subject: grammar fixes --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.rst') diff --git a/CHANGES.rst b/CHANGES.rst index d1807103f..8159cea36 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -80,7 +80,7 @@ Features - Finished callbacks are now executed as part of the ``closer`` that is invoked as part of ``pyramid.scripting.prepare`` and - ``pyramid.paster.boostrap``. + ``pyramid.paster.bootstrap``. See https://github.com/Pylons/pyramid/pull/3561 - Added ``pyramid.request.RequestLocalCache`` which can be used to create -- cgit v1.2.3