From 07cb8f0e112642a6a40127232ddc06125a73750e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 15 Sep 2012 18:58:45 -0400 Subject: add pyramid.decorator.reify as an API. Closes #682 --- CHANGES.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 47f51575c..94c331cef 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -160,6 +160,9 @@ Features - ``request.context`` of environment request during ``bootstrap`` is now the root object if a context isn't already set on a provided request. +- The ``pyramid.decorator.reify`` function is now an API, and was added to + the API documentation. + Deprecations ------------ @@ -250,7 +253,9 @@ Documentation ------------- - Added an "Upgrading Pyramid" chapter to the narrative documentation. It - describes how to cope with deprecations and removals of Pyramid APIs. + describes how to cope with deprecations and removals of Pyramid APIs and + how to show Pyramid-generated deprecation warnings while running tests and + while running a server. Dependencies ------------ -- cgit v1.2.3 From d246597b50226456fd350d44be8af0cf6831cd15 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 15 Sep 2012 21:14:54 -0400 Subject: reclassify bug as feature --- CHANGES.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index da2399d9b..851941ff6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -33,11 +33,6 @@ Bug Fixes differ in the case ('text/html' vs. 'text/HTML') will now raise an error. https://github.com/Pylons/pyramid/pull/620 -- Configurator.add_directive now accepts arbitrary callables like partials or - objects implementing ``__call__`` which dont have ``__name__`` and - ``__doc__`` attributes. See https://github.com/Pylons/pyramid/issues/621 - and https://github.com/Pylons/pyramid/pull/647. - - Forward-port from 1.3 branch: when registering multiple views with an ``accept`` predicate in a Pyramid application runing under Python 3, you might have received a ``TypeError: unorderable types: function() < @@ -46,6 +41,11 @@ Bug Fixes Features -------- +- Configurator.add_directive now accepts arbitrary callables like partials or + objects implementing ``__call__`` which dont have ``__name__`` and + ``__doc__`` attributes. See https://github.com/Pylons/pyramid/issues/621 + and https://github.com/Pylons/pyramid/pull/647. + - Third-party custom view, route, and subscriber predicates can now be added for use by view authors via ``pyramid.config.Configurator.add_view_predicate``, -- cgit v1.2.3 From 54d3e3ecf8929f90373669b9682b9db3b4ce3290 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 15 Sep 2012 23:24:48 -0400 Subject: add a whatsnew-1.4 document --- CHANGES.txt | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 851941ff6..6c210600c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -104,13 +104,13 @@ Features and ``HTTPMovedPermanently`` exceptions, so these can be caught by the NotFound view (and other exception views). -- The Mako renderer now accepts a def name in an asset spect. When the def +- The Mako renderer now supports a def name in an asset spec. When the def name is present in the asset spec, the system will render the template def within the template and will return the result. An example asset spec is ``package:path/to/template#defname.mako``. This will render the def named - ``defname`` inside the ``template.pt`` package instead of rendering the - entire template. The old way of returning a tuple from the view is - supported for backward compatibility, ('defname', {}). + ``defname`` inside the ``template.mako`` template instead of rendering the + entire template. The old way of returning a tuple in the form + ``('defname', {})`` from the view is supported for backward compatibility, - The Chameleon ZPT renderer now accepts a macro name in an asset spec. When the macro name is present in the asset spec, the system will render the @@ -150,9 +150,6 @@ Features - Request properties and methods added via ``config.set_request_property`` or ``config.add_request_method`` are now available to tweens. -- Request properties and methods added via ``config.set_request_property`` or - ``config.add_request_method`` are now available to tweens. - - Request properties and methods added via ``config.set_request_property`` or ``config.add_request_method`` are now available in the request object returned from ``pyramid.paster.bootstrap``. -- cgit v1.2.3 From 37d2c224b804dfebe9ee217c7a536364eacdee15 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 16 Sep 2012 03:25:17 -0400 Subject: docs and test --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 6c210600c..6736f6d3e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -163,6 +163,9 @@ Features - Added the ``pyramid.testing.testConfig`` context manager, which can be used to generate a configurator in a test, e.g. ``with testing.testConfig(...):``. +- Users can now invoke a subrequest from within view code using the + ``request.subrequest`` API. + Deprecations ------------ @@ -257,6 +260,9 @@ Documentation how to show Pyramid-generated deprecation warnings while running tests and while running a server. +- Added a "Invoking a Subrequest" chapter to the documentation. It describes + how to use the new ``request.subrequest`` API. + Dependencies ------------ -- cgit v1.2.3 From 64452edb014423054d1bbc0bb3ed8a3e47b6f611 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 16 Sep 2012 03:54:08 -0400 Subject: rename subrequest to invoke_subrequest --- CHANGES.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 6736f6d3e..66ac42136 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -163,8 +163,8 @@ Features - Added the ``pyramid.testing.testConfig`` context manager, which can be used to generate a configurator in a test, e.g. ``with testing.testConfig(...):``. -- Users can now invoke a subrequest from within view code using the - ``request.subrequest`` API. +- Users can now invoke a subrequest from within view code using a new + ``request.invoke_subrequest`` API. Deprecations ------------ @@ -252,6 +252,12 @@ Backwards Incompatibilities * ``registerSettings``, use ``pyramid.config.Configurator.add_settings`` instead. +- In Pyramid 1.3 and previous, the ``__call__`` method of a Response object + was invoked before any finished callbacks were executed. As of this + release, the ``__call__`` method of a Response object is invoked *after* + finished callbacks are executed. This is in support of the + ``request.invoke_subrequest`` feature. + Documentation ------------- @@ -261,7 +267,7 @@ Documentation while running a server. - Added a "Invoking a Subrequest" chapter to the documentation. It describes - how to use the new ``request.subrequest`` API. + how to use the new ``request.invoke_subrequest`` API. Dependencies ------------ -- cgit v1.2.3 From ce1e86c44e812ae438c2647cd7d5b6a4ce2ab478 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 16 Sep 2012 23:15:45 -0400 Subject: prep for 1.4a1 --- CHANGES.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 66ac42136..592b08448 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,5 @@ -Next release -============ - +1.4a1 (2012-09-16) +================== Bug Fixes --------- -- cgit v1.2.3 From 0583963c30caa1e12a9fc9a3a69830f5b50f40e7 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 16 Sep 2012 23:20:59 -0400 Subject: change to kick rtd --- CHANGES.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 592b08448..a673396ba 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,7 @@ 1.4a1 (2012-09-16) ================== + Bug Fixes --------- -- cgit v1.2.3 From 8c51dfc02a889f0296df6455d0b62a2c805e39ec Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 16 Sep 2012 23:23:04 -0400 Subject: change to kick rtd --- CHANGES.txt | 1 - 1 file changed, 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index a673396ba..592b08448 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,7 +1,6 @@ 1.4a1 (2012-09-16) ================== - Bug Fixes --------- -- cgit v1.2.3 From 68c25d39f9c0531be2916ad433904c7247c0f5c7 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 19 Sep 2012 03:31:09 -0400 Subject: garden --- CHANGES.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 592b08448..e08a69b84 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,12 @@ +Next release +============ + +Features +-------- + +- A new ``pyramid.session.check_csrf_token`` convenience function was added. + + 1.4a1 (2012-09-16) ================== -- cgit v1.2.3 From 80cd0b1ab6b97c99863db045a2dda984e006c3b9 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 19 Sep 2012 04:48:14 -0400 Subject: garden --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index e08a69b84..58e484a92 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,11 @@ Features - A new ``pyramid.session.check_csrf_token`` convenience function was added. +- A ``check_csrf`` view predicate was added. For example, you can now do + ``config.add_view(someview, check_csrf=True)``. When the predicate is + checked, if the ``csrf_token`` value in ``request.params`` matches the CSRF + token in the request's session, the view will be permitted to execute. + Otherwise, it will not be permitted to execute. 1.4a1 (2012-09-16) ================== -- cgit v1.2.3 From d27bc7903516b8666ea814c5bb8c10de64a679f5 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 22 Sep 2012 07:59:53 -0400 Subject: garden --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 58e484a92..104ed1e98 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,12 @@ Next release ============ +Bug Fixes +--------- + +- It is now possible to use asset specifications which contain a hyphen in + Mako asset spec names. See https://github.com/Pylons/pyramid/pull/692 + Features -------- -- cgit v1.2.3 From 4388d317712be00a1d49cc73ac78407fe6906263 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 22 Sep 2012 08:06:52 -0400 Subject: mirror john's change for chameleon, better changelog message --- CHANGES.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 104ed1e98..4e6feb68c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,8 +4,9 @@ Next release Bug Fixes --------- -- It is now possible to use asset specifications which contain a hyphen in - Mako asset spec names. See https://github.com/Pylons/pyramid/pull/692 +- When trying to determine Mako defnames and Chameleon macro names in asset + specifications, take into account that the filename may have a hyphen in + it. See https://github.com/Pylons/pyramid/pull/692 Features -------- -- cgit v1.2.3 From 098599b497fb6cd7c9372ceb795e9e8a416d573e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 22 Sep 2012 10:04:14 -0400 Subject: - Add ``Base.metadata.bind = engine`` to alchemy template, so that tables defined imperatively will work. - update wiki2 SQLA tutorial with the changes required after inserting ``Base.metadata.bind = engine`` into the alchemy scaffold. --- CHANGES.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 4e6feb68c..0b27a74c3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -19,6 +19,15 @@ Features token in the request's session, the view will be permitted to execute. Otherwise, it will not be permitted to execute. +- Add ``Base.metadata.bind = engine`` to alchemy template, so that tables + defined imperatively will work. + +Documentation +------------- + +- update wiki2 SQLA tutorial with the changes required after inserting + ``Base.metadata.bind = engine`` into the alchemy scaffold. + 1.4a1 (2012-09-16) ================== -- cgit v1.2.3 From 072cbf7ae84e80185ebc122d0c11a6838ac36093 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 27 Sep 2012 11:40:57 -0400 Subject: prep for 1.4a2 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 0b27a74c3..cfdaf4216 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.4a2 (2012-09-27) +================== Bug Fixes --------- -- cgit v1.2.3 From d6fb00161a4d482dcfff856ce59b9dc34f78c2b1 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 30 Sep 2012 18:49:29 -0400 Subject: - 1.4a ``pyramid.scripting.prepare`` behaved differently than 1.3 series function of same name. In particular, if passed a request, it would not set the ``registry`` attribute of the request like 1.3 did. A symptom would be that passing a request to ``pyramid.paster.bootstrap`` (which uses the function) that did not have a ``registry`` attribute could assume that the registry would be attached to the request by Pyramid. This assumption could be made in 1.3, but not in 1.4. The assumption can now be made in 1.4 too (a registry is attached to a request passed to bootstrap or prepare). --- CHANGES.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index cfdaf4216..e40401528 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,19 @@ +Next release +============ + +Bug Fixes +--------- + +- 1.4a ``pyramid.scripting.prepare`` behaved differently than 1.3 series + function of same name. In particular, if passed a request, it would not + set the ``registry`` attribute of the request like 1.3 did. A symptom + would be that passing a request to ``pyramid.paster.bootstrap`` (which uses + the function) that did not have a ``registry`` attribute could assume that + the registry would be attached to the request by Pyramid. This assumption + could be made in 1.3, but not in 1.4. The assumption can now be made in + 1.4 too (a registry is attached to a request passed to bootstrap or + prepare). + 1.4a2 (2012-09-27) ================== -- cgit v1.2.3 From 66d277a1f6cdf752c0fd3716c3ef1780421b4eb1 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 5 Oct 2012 14:26:07 -0400 Subject: garden --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index e40401528..4b3dabbec 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,6 +14,13 @@ Bug Fixes 1.4 too (a registry is attached to a request passed to bootstrap or prepare). +- When registering a view configuration that named a Chameleon ZPT renderer + with a macro name in it (e.g. ``renderer='some/template#somemacro.pt``) as + well as a view configuration without a macro name it it that pointed to the + same template (e.g. ``renderer='some/template.pt'), internal caching could + confuse the two, and your code might have rendered one instead of the + other. + 1.4a2 (2012-09-27) ================== -- cgit v1.2.3 From 1273d56ee5c038f447dce0525844cd3ea6c15e4d Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 7 Oct 2012 02:03:47 -0400 Subject: - The Configurator ``testing_securitypolicy`` method now returns the policy object it creates. - The Configurator ``testing_securitypolicy`` method accepts two new arguments: ``remember_result`` and ``forget_result``. If supplied, these values influence the result of the policy's ``remember`` and ``forget`` methods, respectively. - The DummySecurityPolicy created by ``testing_securitypolicy`` now sets a ``forgotten`` value on the policy (the value ``True``) when its ``forget`` method is called. - The DummySecurityPolicy created by ``testing_securitypolicy`` now sets a ``remembered`` value on the policy, which is the value of the ``principal`` argument it's called with when its ``remember`` method is called. --- CHANGES.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 4b3dabbec..df4ada7e9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -21,6 +21,25 @@ Bug Fixes confuse the two, and your code might have rendered one instead of the other. +Features +-------- + +- The Configurator ``testing_securitypolicy`` method now returns the policy + object it creates. + +- The Configurator ``testing_securitypolicy`` method accepts two new + arguments: ``remember_result`` and ``forget_result``. If supplied, these + values influence the result of the policy's ``remember`` and ``forget`` + methods, respectively. + +- The DummySecurityPolicy created by ``testing_securitypolicy`` now sets a + ``forgotten`` value on the policy (the value ``True``) when its ``forget`` + method is called. + +- The DummySecurityPolicy created by ``testing_securitypolicy`` now sets a + ``remembered`` value on the policy, which is the value of the ``principal`` + argument it's called with when its ``remember`` method is called. + 1.4a2 (2012-09-27) ================== -- cgit v1.2.3