From 1ffb8e3cc21603b29ccd78152f82cca7f61a09b1 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 16 May 2011 02:11:56 -0400 Subject: - Added API docs for ``pyramid.httpexceptions.abort`` and ``pyramid.httpexceptions.redirect``. - Added "HTTP Exceptions" section to Views narrative chapter including a description of ``pyramid.httpexceptions.abort``; adjusted redirect section to note ``pyramid.httpexceptions.redirect``. - A default exception view for the context ``webob.exc.HTTPException`` (aka ``pyramid.httpexceptions.HTTPException``) is now registered by default. This means that an instance of any exception class imported from ``pyramid.httpexceptions`` (such as ``HTTPFound``) can now be raised from within view code; when raised, this exception view will render the exception to a response. - New functions named ``pyramid.httpexceptions.abort`` and ``pyramid.httpexceptions.redirect`` perform the equivalent of their Pylons brethren when an HTTP exception handler is registered. These functions take advantage of the newly registered exception view for ``webob.exc.HTTPException``. - The Configurator now accepts an additional keyword argument named ``httpexception_view``. By default, this argument is populated with a default exception view function that will be used when an HTTP exception is raised. When ``None`` is passed for this value, an exception view for HTTP exceptions will not be registered. Passing ``None`` returns the behavior of raising an HTTP exception to that of Pyramid 1.0 (the exception will propagate to middleware and to the WSGI server). --- CHANGES.txt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 0992af9ef..756d1345c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -37,6 +37,13 @@ Documentation - Added "What's New in Pyramid 1.1" to HTML rendering of documentation. +- Added API docs for ``pyramid.httpexceptions.abort`` and + ``pyramid.httpexceptions.redirect``. + +- Added "HTTP Exceptions" section to Views narrative chapter including a + description of ``pyramid.httpexceptions.abort``; adjusted redirect section + to note ``pyramid.httpexceptions.redirect``. + Features -------- @@ -97,6 +104,27 @@ Features section entitled "Static Routes" in the URL Dispatch narrative chapter for more information. +- A default exception view for the context ``webob.exc.HTTPException`` (aka + ``pyramid.httpexceptions.HTTPException``) is now registered by default. + This means that an instance of any exception class imported from + ``pyramid.httpexceptions`` (such as ``HTTPFound``) can now be raised from + within view code; when raised, this exception view will render the + exception to a response. + +- New functions named ``pyramid.httpexceptions.abort`` and + ``pyramid.httpexceptions.redirect`` perform the equivalent of their Pylons + brethren when an HTTP exception handler is registered. These functions + take advantage of the newly registered exception view for + ``webob.exc.HTTPException``. + +- The Configurator now accepts an additional keyword argument named + ``httpexception_view``. By default, this argument is populated with a + default exception view function that will be used when an HTTP exception is + raised. When ``None`` is passed for this value, an exception view for HTTP + exceptions will not be registered. Passing ``None`` returns the behavior + of raising an HTTP exception to that of Pyramid 1.0 (the exception will + propagate to middleware and to the WSGI server). + Bug Fixes --------- -- cgit v1.2.3 From 966b5cfe03009069d7bbe92cc047b32a5e3cd4e6 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 30 May 2011 03:23:31 -0400 Subject: - Fix older CHANGES entries. - The ``pyramid.request.Request`` class now has a ``ResponseClass`` interface which points at ``pyramid.response.Response``. - The ``pyramid.request.Response`` class now has a ``RequestClass`` interface which points at ``pyramid.response.Request``. - ``pyramid.response.Response`` is now a *subclass* of ``webob.response.Response``. It also inherits from the built-in Python ``Exception`` class and implements the ``pyramid.interfaces.IExceptionResponse`` class so it can be raised as an exception from view code. --- CHANGES.txt | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 756d1345c..15c86c13c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -104,12 +104,13 @@ Features section entitled "Static Routes" in the URL Dispatch narrative chapter for more information. -- A default exception view for the context ``webob.exc.HTTPException`` (aka - ``pyramid.httpexceptions.HTTPException``) is now registered by default. - This means that an instance of any exception class imported from - ``pyramid.httpexceptions`` (such as ``HTTPFound``) can now be raised from - within view code; when raised, this exception view will render the - exception to a response. +- A default exception view for the context + ``pyramid.interfaces.IExceptionResponse`` (aka + ``pyramid.response.Response`` or ``pyramid.httpexceptions.HTTPException``) + is now registered by default. This means that an instance of any exception + response class imported from ``pyramid.httpexceptions`` (such as + ``HTTPFound``) can now be raised from within view code; when raised, this + exception view will render the exception to a response. - New functions named ``pyramid.httpexceptions.abort`` and ``pyramid.httpexceptions.redirect`` perform the equivalent of their Pylons @@ -118,12 +119,18 @@ Features ``webob.exc.HTTPException``. - The Configurator now accepts an additional keyword argument named - ``httpexception_view``. By default, this argument is populated with a - default exception view function that will be used when an HTTP exception is - raised. When ``None`` is passed for this value, an exception view for HTTP - exceptions will not be registered. Passing ``None`` returns the behavior - of raising an HTTP exception to that of Pyramid 1.0 (the exception will - propagate to middleware and to the WSGI server). + ``exceptionresponse_view``. By default, this argument is populated with a + default exception view function that will be used when a response is raised + as an exception. When ``None`` is passed for this value, an exception view + for responses will not be registered. Passing ``None`` returns the + behavior of raising an HTTP exception to that of Pyramid 1.0 (the exception + will propagate to middleware and to the WSGI server). + +- The ``pyramid.request.Request`` class now has a ``ResponseClass`` interface + which points at ``pyramid.response.Response``. + +- The ``pyramid.request.Response`` class now has a ``RequestClass`` interface + which points at ``pyramid.response.Request``. Bug Fixes --------- @@ -289,6 +296,12 @@ Behavior Changes implements its own ``__getattr__``, ``__setattr__`` or ``__delattr__`` as a result. +- ``pyramid.response.Response`` is now a *subclass* of + ``webob.response.Response``. It also inherits from the built-in Python + ``Exception`` class and implements the + ``pyramid.interfaces.IExceptionResponse`` class so it can be raised as an + exception from view code. + Dependencies ------------ -- cgit v1.2.3 From df15ed98612e7962e3122da52d8d5f5b9d8882b2 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 4 Jun 2011 18:43:25 -0400 Subject: - It is now possible to control how the Pyramid router calls the WSGI ``start_response`` callable and obtains the WSGI ``app_iter`` based on adapting the response object to the new ``pyramid.interfaces.IResponder`` interface. The default ``IResponder`` uses Pyramid 1.0's logic to do this. To override the responder:: from pyramid.interfaces import IResponder from pyramid.response import Response from myapp import MyResponder config.registry.registerAdapter(MyResponder, (Response,), IResponder, name='') This makes it possible to reuse response object implementations which have, for example, their own ``__call__`` expected to be used as a WSGI application (like ``pyramid.response.Response``), e.g.: class MyResponder(object): def __init__(self, response): """ Obtain a reference to the response """ self.response = response def __call__(self, request, start_response): """ Call start_response and return an app_iter """ app_iter = self.response(request.environ, start_response) return app_iter --- CHANGES.txt | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 15c86c13c..7840bc525 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -132,6 +132,32 @@ Features - The ``pyramid.request.Response`` class now has a ``RequestClass`` interface which points at ``pyramid.response.Request``. +- It is now possible to control how the Pyramid router calls the WSGI + ``start_response`` callable and obtains the WSGI ``app_iter`` based on + adapting the response object to the new ``pyramid.interfaces.IResponder`` + interface. The default ``IResponder`` uses Pyramid 1.0's logic to do this. + To override the responder:: + + from pyramid.interfaces import IResponder + from pyramid.response import Response + from myapp import MyResponder + + config.registry.registerAdapter(MyResponder, (Response,), + IResponder, name='') + + This makes it possible to reuse response object implementations which have, + for example, their own ``__call__`` expected to be used as a WSGI + application (like ``pyramid.response.Response``), e.g.: + + class MyResponder(object): + def __init__(self, response): + """ Obtain a reference to the response """ + self.response = response + def __call__(self, request, start_response): + """ Call start_response and return an app_iter """ + app_iter = self.response(request.environ, start_response) + return app_iter + Bug Fixes --------- -- cgit v1.2.3 From 99edc51a3b05309c7f5d98ff96289ec51b1d7660 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 11 Jun 2011 05:35:27 -0400 Subject: - Pyramid now expects Response objects to have a __call__ method which implements the WSGI application interface instead of the three webob attrs status, headerlist and app_iter. Backwards compatibility exists for code which returns response objects that do not have a __call__. - pyramid.response.Response is no longer an exception (and therefore cannot be raised in order to generate a response). - Changed my mind about moving stuff from pyramid.httpexceptions to pyramid.response. The stuff I moved over has been moved back to pyramid.httpexceptions. --- CHANGES.txt | 79 +++++++++++++++++++++++++++++-------------------------------- 1 file changed, 37 insertions(+), 42 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 7840bc525..e413f0657 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -37,12 +37,10 @@ Documentation - Added "What's New in Pyramid 1.1" to HTML rendering of documentation. -- Added API docs for ``pyramid.httpexceptions.abort`` and - ``pyramid.httpexceptions.redirect``. +- Added API docs for ``pyramid.httpexceptions.responsecode``. - Added "HTTP Exceptions" section to Views narrative chapter including a - description of ``pyramid.httpexceptions.abort``; adjusted redirect section - to note ``pyramid.httpexceptions.redirect``. + description of ``pyramid.httpexceptions.responsecode``. Features -------- @@ -105,18 +103,15 @@ Features more information. - A default exception view for the context - ``pyramid.interfaces.IExceptionResponse`` (aka - ``pyramid.response.Response`` or ``pyramid.httpexceptions.HTTPException``) - is now registered by default. This means that an instance of any exception - response class imported from ``pyramid.httpexceptions`` (such as - ``HTTPFound``) can now be raised from within view code; when raised, this - exception view will render the exception to a response. - -- New functions named ``pyramid.httpexceptions.abort`` and - ``pyramid.httpexceptions.redirect`` perform the equivalent of their Pylons - brethren when an HTTP exception handler is registered. These functions - take advantage of the newly registered exception view for - ``webob.exc.HTTPException``. + ``pyramid.interfaces.IExceptionResponse`` is now registered by default. + This means that an instance of any exception response class imported from + ``pyramid.httpexceptions`` (such as ``HTTPFound``) can now be raised from + within view code; when raised, this exception view will render the + exception to a response. + +- A function named ``pyramid.httpexceptions.responsecode`` is a shortcut that + can be used to create HTTP exception response objects using an HTTP integer + status code. - The Configurator now accepts an additional keyword argument named ``exceptionresponse_view``. By default, this argument is populated with a @@ -135,28 +130,13 @@ Features - It is now possible to control how the Pyramid router calls the WSGI ``start_response`` callable and obtains the WSGI ``app_iter`` based on adapting the response object to the new ``pyramid.interfaces.IResponder`` - interface. The default ``IResponder`` uses Pyramid 1.0's logic to do this. - To override the responder:: - - from pyramid.interfaces import IResponder - from pyramid.response import Response - from myapp import MyResponder - - config.registry.registerAdapter(MyResponder, (Response,), - IResponder, name='') - - This makes it possible to reuse response object implementations which have, - for example, their own ``__call__`` expected to be used as a WSGI - application (like ``pyramid.response.Response``), e.g.: + interface. See the section in the Hooks chapter of the documentation + entitled "Changing How Pyramid Treats Response Objects". - class MyResponder(object): - def __init__(self, response): - """ Obtain a reference to the response """ - self.response = response - def __call__(self, request, start_response): - """ Call start_response and return an app_iter """ - app_iter = self.response(request.environ, start_response) - return app_iter +- The Pyramid router will now, by default, call the ``__call__`` method of + WebOb response objects when returning a WSGI response. This means that, + among other things, the ``conditional_response`` feature of WebOb response + objects will now behave properly. Bug Fixes --------- @@ -291,7 +271,7 @@ Deprecations Behavior Changes ---------------- -- A custom request factory is now required to return a response object that +- A custom request factory is now required to return a request object that has a ``response`` attribute (or "reified"/lazy property) if they the request is meant to be used in a view that uses a renderer. This ``response`` attribute should be an instance of the class @@ -323,10 +303,25 @@ Behavior Changes result. - ``pyramid.response.Response`` is now a *subclass* of - ``webob.response.Response``. It also inherits from the built-in Python - ``Exception`` class and implements the - ``pyramid.interfaces.IExceptionResponse`` class so it can be raised as an - exception from view code. + ``webob.response.Response`` (in order to directly implement the + ``pyramid.interfaces.IResponse`` interface). + +- The ``pyramid.interfaces.IResponse`` interface now includes a ``__call__`` + method which has the WSGI application call signature (and which expects an + iterable as a result). + +- The Pyramid router now, by default, expects response objects returned from + views to implement the WSGI application interface (a ``__call__`` method + that accepts ``environ`` and ``start_response``, and which returns an + ``app_iter`` iterable). If such a method exists, Pyramid will now call it + in order to satisfy the WSGI request. Backwards compatibility code in the + default responder exists which will fall back to the older behavior, but + Pyramid will raise a deprecation warning if it is reached. See the section + in the Hooks chapter of the documentation entitled "Changing How Pyramid + Treats Response Objects" to default back to the older behavior, where the + ``app_iter``, ``headerlist``, and ``status`` attributes of the object were + consulted directly (without any indirection through ``__call__``) to + silence the deprecation warnings. Dependencies ------------ -- cgit v1.2.3 From d868fff7597c5a05acd1f5c024fc45dde9880413 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 13 Jun 2011 06:17:00 -0400 Subject: - Remove IResponder abstraction in favor of more general IResponse abstraction. - It is now possible to return an arbitrary object from a Pyramid view callable even if a renderer is not used, as long as a suitable adapter to ``pyramid.interfaces.IResponse`` is registered for the type of the returned object. See the section in the Hooks chapter of the documentation entitled "Changing How Pyramid Treats View Responses". - The Pyramid router now, by default, expects response objects returned from view callables to implement the ``pyramid.interfaces.IResponse`` interface. Unlike the Pyramid 1.0 version of this interface, objects which implement IResponse now must define a ``__call__`` method that accepts ``environ`` and ``start_response``, and which returns an ``app_iter`` iterable, among other things. Previously, it was possible to return any object which had the three WebOb ``app_iter``, ``headerlist``, and ``status`` attributes as a response, so this is a backwards incompatibility. It is possible to get backwards compatibility back by registering an adapter to IResponse from the type of object you're now returning from view callables. See the section in the Hooks chapter of the documentation entitled "Changing How Pyramid Treats View Responses". - The ``pyramid.interfaces.IResponse`` interface is now much more extensive. Previously it defined only ``app_iter``, ``status`` and ``headerlist``; now it is basically intended to directly mirror the ``webob.Response`` API, which has many methods and attributes. - Documentation changes to support above. --- CHANGES.txt | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index e413f0657..5e8df1a0b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -127,11 +127,11 @@ Features - The ``pyramid.request.Response`` class now has a ``RequestClass`` interface which points at ``pyramid.response.Request``. -- It is now possible to control how the Pyramid router calls the WSGI - ``start_response`` callable and obtains the WSGI ``app_iter`` based on - adapting the response object to the new ``pyramid.interfaces.IResponder`` - interface. See the section in the Hooks chapter of the documentation - entitled "Changing How Pyramid Treats Response Objects". +- It is now possible to return an arbitrary object from a Pyramid view + callable even if a renderer is not used, as long as a suitable adapter to + ``pyramid.interfaces.IResponse`` is registered for the type of the returned + object. See the section in the Hooks chapter of the documentation entitled + "Changing How Pyramid Treats View Responses". - The Pyramid router will now, by default, call the ``__call__`` method of WebOb response objects when returning a WSGI response. This means that, @@ -306,22 +306,26 @@ Behavior Changes ``webob.response.Response`` (in order to directly implement the ``pyramid.interfaces.IResponse`` interface). -- The ``pyramid.interfaces.IResponse`` interface now includes a ``__call__`` - method which has the WSGI application call signature (and which expects an - iterable as a result). +Backwards Incompatibilities +--------------------------- - The Pyramid router now, by default, expects response objects returned from - views to implement the WSGI application interface (a ``__call__`` method - that accepts ``environ`` and ``start_response``, and which returns an - ``app_iter`` iterable). If such a method exists, Pyramid will now call it - in order to satisfy the WSGI request. Backwards compatibility code in the - default responder exists which will fall back to the older behavior, but - Pyramid will raise a deprecation warning if it is reached. See the section - in the Hooks chapter of the documentation entitled "Changing How Pyramid - Treats Response Objects" to default back to the older behavior, where the - ``app_iter``, ``headerlist``, and ``status`` attributes of the object were - consulted directly (without any indirection through ``__call__``) to - silence the deprecation warnings. + view callables to implement the ``pyramid.interfaces.IResponse`` interface. + Unlike the Pyramid 1.0 version of this interface, objects which implement + IResponse now must define a ``__call__`` method that accepts ``environ`` + and ``start_response``, and which returns an ``app_iter`` iterable, among + other things. Previously, it was possible to return any object which had + the three WebOb ``app_iter``, ``headerlist``, and ``status`` attributes as + a response, so this is a backwards incompatibility. It is possible to get + backwards compatibility back by registering an adapter to IResponse from + the type of object you're now returning from view callables. See the + section in the Hooks chapter of the documentation entitled "Changing How + Pyramid Treats View Responses". + +- The ``pyramid.interfaces.IResponse`` interface is now much more extensive. + Previously it defined only ``app_iter``, ``status`` and ``headerlist``; now + it is basically intended to directly mirror the ``webob.Response`` API, + which has many methods and attributes. Dependencies ------------ -- cgit v1.2.3 From 1a6fc7062f803b9f15b7677db9a9257a4f00bfcb Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 14 Jun 2011 02:36:07 -0400 Subject: - Added new add_response_adapter method to Configurator. - Fix Configurator docstring wrt exception responses. - Speed up registry.queryAdapterOrSelf --- CHANGES.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 5e8df1a0b..c7ca3794d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -130,8 +130,10 @@ Features - It is now possible to return an arbitrary object from a Pyramid view callable even if a renderer is not used, as long as a suitable adapter to ``pyramid.interfaces.IResponse`` is registered for the type of the returned - object. See the section in the Hooks chapter of the documentation entitled - "Changing How Pyramid Treats View Responses". + object by using the new + ``pyramid.config.Configurator.add_response_adapter`` API. See the section + in the Hooks chapter of the documentation entitled "Changing How Pyramid + Treats View Responses". - The Pyramid router will now, by default, call the ``__call__`` method of WebOb response objects when returning a WSGI response. This means that, -- cgit v1.2.3 From 92099080859976ce78882de477ddc2c01bc880b2 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 14 Jun 2011 03:37:08 -0400 Subject: - New method named ``pyramid.request.Request.is_response``. This method should be used instead of the ``pyramid.view.is_response`` function, which has been deprecated. - Deprecated ``pyramid.view.is_response`` function in favor of (newly-added) ``pyramid.request.Request.is_response`` method. Determining if an object is truly a valid response object now requires access to the registry, which is only easily available as a request attribute. The ``pyramid.view.is_response`` function will still work until it is removed, but now may return an incorrect answer under some (very uncommon) circumstances. --- CHANGES.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index c7ca3794d..ea4bedc7e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -140,6 +140,10 @@ Features among other things, the ``conditional_response`` feature of WebOb response objects will now behave properly. +- New method named ``pyramid.request.Request.is_response``. This method + should be used instead of the ``pyramid.view.is_response`` function, which + has been deprecated. + Bug Fixes --------- @@ -270,6 +274,14 @@ Deprecations 1.0 and before). In a future version, these methods will be removed entirely. +- Deprecated ``pyramid.view.is_response`` function in favor of (newly-added) + ``pyramid.request.Request.is_response`` method. Determining if an object + is truly a valid response object now requires access to the registry, which + is only easily available as a request attribute. The + ``pyramid.view.is_response`` function will still work until it is removed, + but now may return an incorrect answer under some (very uncommon) + circumstances. + Behavior Changes ---------------- -- cgit v1.2.3 From 53d11e7793317eee0f756b1e77b853ae7e1e6726 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 14 Jun 2011 04:31:26 -0400 Subject: - Move default app_iter generation logic into __call__ for exception responses. - Add note about why we've created a shadow exception hierarchy parallel to that of webob.exc. --- CHANGES.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index ea4bedc7e..a2976d1a2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -320,6 +320,25 @@ Behavior Changes ``webob.response.Response`` (in order to directly implement the ``pyramid.interfaces.IResponse`` interface). +- The "exception response" objects importable from ``pyramid.httpexceptions`` + (e.g. ``HTTPNotFound``) are no longer just import aliases for classes that + actually live in ``webob.exc``. Instead, we've defined our own exception + classes within the module that mirror and emulate the ``webob.exc`` + exception response objects almost entirely. We do this in order to a) + allow the exception responses to subclass ``pyramid.response.Response``, + which speeds up response generation slightly due to the way the Pyramid + router works, b) allows us to provide alternate __call__ logic which also + speeds up response generation, c) allows the exception classes to provide + for the proper value of ``self.RequestClass`` (pyramid.request.Request), d) + allows us freedom from having to think about backwards compatibility code + present in ``webob.exc`` having to do with Python 2.4, which we no longer + support, e) We change the behavior of two classes (HTTPNotFound and + HTTPForbidden) in the module so that they can be used internally for + notfound and forbidden exceptions, f) allows us to influence the docstrings + of the exception classes to provide Pyramid-specific documentation, and g) + allows us to silence a stupid deprecation warning under Python 2.6 when the + response objects are used as exceptions (related to ``self.message``). + Backwards Incompatibilities --------------------------- -- cgit v1.2.3 From 5484e3e9be61b82b55e6e1e94365cfb3cd4d3a94 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 14 Jun 2011 06:17:39 -0400 Subject: we no longer support 2.4 --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index c58ff755b..6a41f30fe 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -361,6 +361,9 @@ Behavior Changes Backwards Incompatibilities --------------------------- +- Pyramid no longer supports Python 2.4. Python 2.5 or better is required to + run Pyramid 1.1+. + - The Pyramid router now, by default, expects response objects returned from view callables to implement the ``pyramid.interfaces.IResponse`` interface. Unlike the Pyramid 1.0 version of this interface, objects which implement -- cgit v1.2.3 From 1e5e3181206de1e61e8eb4bd595cffda5603a316 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 18 Jun 2011 23:14:29 -0400 Subject: move defense from changes to design defense document --- CHANGES.txt | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 6a41f30fe..9a25a6b04 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -343,20 +343,9 @@ Behavior Changes (e.g. ``HTTPNotFound``) are no longer just import aliases for classes that actually live in ``webob.exc``. Instead, we've defined our own exception classes within the module that mirror and emulate the ``webob.exc`` - exception response objects almost entirely. We do this in order to a) - allow the exception responses to subclass ``pyramid.response.Response``, - which speeds up response generation slightly due to the way the Pyramid - router works, b) allows us to provide alternate __call__ logic which also - speeds up response generation, c) allows the exception classes to provide - for the proper value of ``self.RequestClass`` (pyramid.request.Request), d) - allows us freedom from having to think about backwards compatibility code - present in ``webob.exc`` having to do with Python 2.4, which we no longer - support, e) We change the behavior of two classes (HTTPNotFound and - HTTPForbidden) in the module so that they can be used internally for - notfound and forbidden exceptions, f) allows us to influence the docstrings - of the exception classes to provide Pyramid-specific documentation, and g) - allows us to silence a stupid deprecation warning under Python 2.6 when the - response objects are used as exceptions (related to ``self.message``). + exception response objects almost entirely. See the "Design Defense" doc + section named "Pyramid Uses its Own HTTP Exception Classes" for more + information. Backwards Incompatibilities --------------------------- -- cgit v1.2.3 From d0a5f0654e0468f9d50a4c1b98f9d316253ad64d Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 19 Jun 2011 20:19:27 -0400 Subject: - Base exception response content type again on accept header. - The ``pyramid.httpexceptions`` classes named ``HTTPFound``, ``HTTPMultipleChoices``, ``HTTPMovedPermanently``, ``HTTPSeeOther``, ``HTTPUseProxy``, and ``HTTPTemporaryRedirect`` now accept ``location`` as their first positional argument rather than ``detail``. This means that you can do, e.g. ``return pyramid.httpexceptions.HTTPFound('http://foo')`` rather than ``return pyramid.httpexceptions.HTTPFound(location='http//foo')`` (the latter will of course continue to work). --- CHANGES.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 9a25a6b04..dd3673173 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -371,6 +371,15 @@ Backwards Incompatibilities it is basically intended to directly mirror the ``webob.Response`` API, which has many methods and attributes. +- The ``pyramid.httpexceptions`` classes named ``HTTPFound``, + ``HTTPMultipleChoices``, ``HTTPMovedPermanently``, ``HTTPSeeOther``, + ``HTTPUseProxy``, and ``HTTPTemporaryRedirect`` now accept ``location`` as + their first positional argument rather than ``detail``. This means that + you can do, e.g. ``return pyramid.httpexceptions.HTTPFound('http://foo')`` + rather than ``return + pyramid.httpexceptions.HTTPFound(location='http//foo')`` (the latter will + of course continue to work). + Dependencies ------------ -- cgit v1.2.3 From 22bac63ecd35deac5f580c2d081b11c2caea4045 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 20 Jun 2011 00:37:34 -0400 Subject: note backwards incompat related to ISettings --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index dd3673173..30001a7b5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -563,6 +563,11 @@ Deprecations Backwards Incompatibilities --------------------------- +- Using ``testing.setUp`` now registers an ISettings utility as a side + effect. Some test code which queries for this utility after + ``testing.setUp`` via queryAdapter will expect a return value of ``None``. + This code will need to be changed. + - When a ``pyramid.exceptions.Forbidden`` error is raised, its status code now ``403 Forbidden``. It was previously ``401 Unauthorized``, for backwards compatibility purposes with ``repoze.bfg``. This change will -- cgit v1.2.3 From f8f08bac0ea9edcac40fae2b3ad56e6a1ac7f47f Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 20 Jun 2011 00:57:30 -0400 Subject: responsecode -> exception_response --- CHANGES.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 30001a7b5..ba392c7c6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -39,10 +39,10 @@ Documentation - Added API docs for ``pyramid.authentication.SessionAuthenticationPolicy``. -- Added API docs for ``pyramid.httpexceptions.responsecode``. +- Added API docs for ``pyramid.httpexceptions.exception_response``. - Added "HTTP Exceptions" section to Views narrative chapter including a - description of ``pyramid.httpexceptions.responsecode``. + description of ``pyramid.httpexceptions.exception_response``. Features -------- @@ -121,9 +121,9 @@ Features within view code; when raised, this exception view will render the exception to a response. -- A function named ``pyramid.httpexceptions.responsecode`` is a shortcut that - can be used to create HTTP exception response objects using an HTTP integer - status code. +- A function named ``pyramid.httpexceptions.exception_response`` is a + shortcut that can be used to create HTTP exception response objects using + an HTTP integer status code. - The Configurator now accepts an additional keyword argument named ``exceptionresponse_view``. By default, this argument is populated with a -- cgit v1.2.3 From 8cbbd98daa3ef4f43cfc46359c4e5bae85b1185c Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 20 Jun 2011 01:19:18 -0400 Subject: bring whatsnew up to date --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index ba392c7c6..16a6f9650 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -136,8 +136,8 @@ Features - The ``pyramid.request.Request`` class now has a ``ResponseClass`` interface which points at ``pyramid.response.Response``. -- The ``pyramid.request.Response`` class now has a ``RequestClass`` interface - which points at ``pyramid.response.Request``. +- The ``pyramid.response.Response`` class now has a ``RequestClass`` + interface which points at ``pyramid.request.Request``. - It is now possible to return an arbitrary object from a Pyramid view callable even if a renderer is not used, as long as a suitable adapter to -- cgit v1.2.3 From 83549e631fe28e8e3b0b0274d0e631f1ebebd205 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 20 Jun 2011 01:31:27 -0400 Subject: prep for 1.1a1 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 16a6f9650..413f76729 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.1a1 (2011-06-20) +================== Documentation ------------- -- cgit v1.2.3 From c724f039d58f2c126594b7a644a0de1b97e17910 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 21 Jun 2011 02:18:19 -0400 Subject: - 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 :mod:`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']``. Closes #199. --- CHANGES.txt | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 413f76729..29d3d472c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,35 @@ +Next release +============ + +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 :mod:`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']``. + 1.1a1 (2011-06-20) ================== -- cgit v1.2.3 From d74d5350422dd99eb41cefb391729dafd0e1c637 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 21 Jun 2011 14:38:49 -0400 Subject: garden --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 29d3d472c..104700cfd 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,13 @@ Next release ============ +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 raised. + Backwards Incompatibilities --------------------------- -- cgit v1.2.3 From bf7544c683803c4490e7c82e25e31d36261fb973 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 22 Jun 2011 00:29:36 -0400 Subject: suggestions from sluggo --- CHANGES.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 104700cfd..f4cd65b36 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -351,12 +351,14 @@ Behavior Changes - The JSON and string renderer factories now assign to ``request.response.content_type`` rather than - ``request.response_content_type``. Each renderer factory determines - whether it should change the content type of the response by comparing the - response's content type against the response's default content type; if the - content type is not the default content type (usually ``text/html``), the - renderer changes the content type (to ``application/json`` or - ``text/plain`` for JSON and string renderers respectively). + ``request.response_content_type``. + +- Each built-in renderer factory now determines whether it should change the + content type of the response by comparing the response's content type + against the response's default content type; if the content type is the + default content type (usually ``text/html``), the renderer changes the + content type (to ``application/json`` or ``text/plain`` for JSON and string + renderers respectively). - The ``pyramid.wsgi.wsgiapp2`` now uses a slightly different method of figuring out how to "fix" ``SCRIPT_NAME`` and ``PATH_INFO`` for the -- cgit v1.2.3 From 6ed33ec54b0dae6ae2a38a0c7a6d383e2ac1967e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 22 Jun 2011 03:08:03 -0400 Subject: - 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 trumped ones earlier in the list). This is now fixed. Note however, that later calls to ``config.add_translation_dirs`` continue to insert directories into the beginning of the list of translation directories created by earlier calls. This means that the same translation found in a directory added via ``add_translation_dirs`` later in the configuration process will be found before one added earlier via a separate call to ``add_translation_dirs`` in the configuration process. --- CHANGES.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index f4cd65b36..f03dcd067 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,19 @@ Bug Fixes for ``pyramid.paster.PyramidTemplate``. Now one has been added, although a deprecation warning is raised. +- 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 trumped ones earlier in the list). This is now fixed. + + Note however, that later calls to ``config.add_translation_dirs`` continue + to insert directories into the beginning of the list of translation + directories created by earlier calls. This means that the same translation + found in a directory added via ``add_translation_dirs`` later in the + configuration process will be found before one added earlier via a separate + call to ``add_translation_dirs`` in the configuration process. + Backwards Incompatibilities --------------------------- -- cgit v1.2.3 From 4f11dc142a1e515bce106a6ebf09e22433d0a845 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 22 Jun 2011 03:31:23 -0400 Subject: take robert forkels advice --- CHANGES.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index f03dcd067..cade195e7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -12,14 +12,14 @@ Bug Fixes ``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 trumped ones earlier in the list). This is now fixed. + later in the list were added before ones earlier in the list). This is now + fixed. Note however, that later calls to ``config.add_translation_dirs`` continue to insert directories into the beginning of the list of translation - directories created by earlier calls. This means that the same translation - found in a directory added via ``add_translation_dirs`` later in the - configuration process will be found before one added earlier via a separate - call to ``add_translation_dirs`` in the configuration process. + directories created by earlier calls. This means that messages defined in + catalogs added earlier via ``add_translation_dirs`` take precedence over + the ones in catalogs added later. Backwards Incompatibilities --------------------------- -- cgit v1.2.3 From b0c075ce8eeb7cb95188c1f41feca7af42bb46c7 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 22 Jun 2011 03:32:55 -0400 Subject: leave undefined --- CHANGES.txt | 6 ------ 1 file changed, 6 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index cade195e7..6522297ec 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -15,12 +15,6 @@ Bug Fixes later in the list were added before ones earlier in the list). This is now fixed. - Note however, that later calls to ``config.add_translation_dirs`` continue - to insert directories into the beginning of the list of translation - directories created by earlier calls. This means that messages defined in - catalogs added earlier via ``add_translation_dirs`` take precedence over - the ones in catalogs added later. - Backwards Incompatibilities --------------------------- -- cgit v1.2.3 From cc85e7a96ccbb1671514adb1a1b1992fd1f02461 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 22 Jun 2011 19:39:45 -0400 Subject: prep for 1.1a2 --- CHANGES.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 6522297ec..0bb15c35b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,12 +1,12 @@ -Next release -============ +1.1a2 (2011-06-22) +================== 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 raised. + 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 @@ -20,8 +20,8 @@ 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 :mod:`repoze.bfg` during error handling. - It did this by using code that looked like so:: + 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: -- cgit v1.2.3 From 05fd08652293809fc6fd344cd1d4fe3a90cc2201 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 23 Jun 2011 15:47:13 -0400 Subject: garden --- CHANGES.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 0bb15c35b..3c1d16fa5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,14 @@ +Next release +============ + +Bug fixes +--------- + +- Pyramid would raise an AttributeError in the Configurator when attempting + to set a ``__text__`` attribute on a custom predicate that was actually a + classmethod. See https://github.com/Pylons/pyramid/pull/217 . + + 1.1a2 (2011-06-22) ================== -- cgit v1.2.3 From d8c55c0157b37594a5266ad92b8d203b5f6cb0ca Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 26 Jun 2011 02:59:19 -0400 Subject: - Accessing or setting deprecated response_* attrs on request (e.g. ``response_content_type``) now issues a deprecation warning at access time rather than at rendering time. --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 3c1d16fa5..b95211d09 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,9 @@ Bug fixes to set a ``__text__`` attribute on a custom predicate that was actually a classmethod. See https://github.com/Pylons/pyramid/pull/217 . +- Accessing or setting deprecated response_* attrs on request + (e.g. ``response_content_type``) now issues a deprecation warning at access + time rather than at rendering time. 1.1a2 (2011-06-22) ================== -- cgit v1.2.3 From 8bd6cf291b91977f22d8e153328cc13d38d00ff2 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 26 Jun 2011 03:46:47 -0400 Subject: - Added ``mako.preprocessor`` config file parameter; allows for a Mako preprocessor to be specified as a Python callable or Python dotted name. See https://github.com/Pylons/pyramid/pull/183 for rationale. Closes #183. --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index b95211d09..81004b00e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,13 @@ Next release ============ +Features +-------- + +- Added ``mako.preprocessor`` config file parameter; allows for a Mako + preprocessor to be specified as a Python callable or Python dotted name. + See https://github.com/Pylons/pyramid/pull/183 for rationale. + Bug fixes --------- -- cgit v1.2.3 From 1ba6fe34b9f37594d926cc63b6219ad61dbeebb6 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 26 Jun 2011 04:00:52 -0400 Subject: prep for 1.1a3 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 81004b00e..d25b1be66 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.1a3 (2011-06-26) +================== Features -------- -- cgit v1.2.3 From 9395f0747ab5cee6b97674251c586dd662d0dd6d Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 26 Jun 2011 21:00:57 -0400 Subject: - ``pyramid.testing.DummyRequest`` now raises deprecation warnings when attributes deprecated for ``pyramid.request.Request`` are accessed (like ``response_content_type``). This is for the benefit of folks running unit tests which use DummyRequest instead of a "real" request, so they know things are deprecated without necessarily needing a functional test suite. --- CHANGES.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index d25b1be66..1f0549895 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,15 @@ +Next release +============ + +Bug Fixes +--------- + +- ``pyramid.testing.DummyRequest`` now raises deprecation warnings when + attributes deprecated for ``pyramid.request.Request`` are accessed (like + ``response_content_type``). This is for the benefit of folks running unit + tests which use DummyRequest instead of a "real" request, so they know + things are deprecated without necessarily needing a functional test suite. + 1.1a3 (2011-06-26) ================== -- cgit v1.2.3 From c1f3d0fd89eb7f62a7de365ca5c0ef5600ffd900 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 1 Jul 2011 00:59:11 -0400 Subject: Add JSONP renderer --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 1f0549895..9bf8197ab 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,6 +10,12 @@ Bug Fixes tests which use DummyRequest instead of a "real" request, so they know things are deprecated without necessarily needing a functional test suite. +Features +-------- + +- Add JSONP renderer (see "JSONP renderer" in the Renderers chapter of the + documentation). + 1.1a3 (2011-06-26) ================== -- cgit v1.2.3 From b7f33b5fdd062e007723d0eb60001442f35c0bf7 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 1 Jul 2011 01:24:39 -0400 Subject: - Deprecated the ``set_renderer_globals_factory`` method of the Configurator and the ``renderer_globals`` Configurator constructor parameter. --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 9bf8197ab..d2b97ece6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -16,6 +16,12 @@ Features - Add JSONP renderer (see "JSONP renderer" in the Renderers chapter of the documentation). +Deprecations +------------ + +- Deprecated the ``set_renderer_globals_factory`` method of the Configurator + and the ``renderer_globals`` Configurator constructor parameter. + 1.1a3 (2011-06-26) ================== -- cgit v1.2.3 From 05a1b4a37df7e855747f66174a472b0de3ce1c9e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 1 Jul 2011 02:08:03 -0400 Subject: - The Wiki2 tutorial "Tests" chapter had two bugs: it did not tell the user to depend on WebTest, and 2 tests failed as the result of changes to Pyramid itself. These issues have been fixed. --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index d2b97ece6..5279f1c9c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -22,6 +22,13 @@ Deprecations - Deprecated the ``set_renderer_globals_factory`` method of the Configurator and the ``renderer_globals`` Configurator constructor parameter. +Documentation +------------- + +- The Wiki2 tutorial "Tests" chapter had two bugs: it did not tell the user + to depend on WebTest, and 2 tests failed as the result of changes to + Pyramid itself. These issues have been fixed. + 1.1a3 (2011-06-26) ================== -- cgit v1.2.3 From 6c9959c34b403c2b1e3088d34b67bef5c79ee9fc Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 1 Jul 2011 02:23:39 -0400 Subject: fix wiki tests too --- CHANGES.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 5279f1c9c..2779f905a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -25,9 +25,9 @@ Deprecations Documentation ------------- -- The Wiki2 tutorial "Tests" chapter had two bugs: it did not tell the user - to depend on WebTest, and 2 tests failed as the result of changes to - Pyramid itself. These issues have been fixed. +- The Wiki and Wiki2 tutorial "Tests" chapters each had two bugs: neither did + told the user to depend on WebTest, and 2 tests failed in each as the + result of changes to Pyramid itself. These issues have been fixed. 1.1a3 (2011-06-26) ================== -- cgit v1.2.3 From 2ea5c1fbe9fef8fc6a1f16f98368abe68100783d Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 1 Jul 2011 03:18:03 -0400 Subject: - The ``pyramid.events.subscriber`` directive behaved contrary to the documentation when passed more than one interface object to its constructor. For example, when the following listener was registered:: @subscriber(IFoo, IBar) def expects_ifoo_events_and_ibar_events(event): print event The Events chapter docs claimed that the listener would be registered and listening for both ``IFoo`` and ``IBar`` events. Instead, it registered an "object event" subscriber which would only be called if an IObjectEvent was emitted where the object interface was ``IFoo`` and the event interface was ``IBar``. The behavior now matches the documentation. If you were relying on the buggy behavior of the 1.0 ``subscriber`` directive in order to register an object event subscriber, you must now pass a sequence to indicate you'd like to register a subscriber for an object event. e.g.: @subscriber([IFoo, IBar]) def expects_object_event(object, event): print object, event --- CHANGES.txt | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 2779f905a..3f8fd5049 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,6 +10,29 @@ Bug Fixes tests which use DummyRequest instead of a "real" request, so they know things are deprecated without necessarily needing a functional test suite. +- The ``pyramid.events.subscriber`` directive behaved contrary to the + documentation when passed more than one interface object to its + constructor. For example, when the following listener was registered:: + + @subscriber(IFoo, IBar) + def expects_ifoo_events_and_ibar_events(event): + print event + + The Events chapter docs claimed that the listener would be registered and + listening for both ``IFoo`` and ``IBar`` events. Instead, it registered an + "object event" subscriber which would only be called if an IObjectEvent was + emitted where the object interface was ``IFoo`` and the event interface was + ``IBar``. + + The behavior now matches the documentation. If you were relying on the + buggy behavior of the 1.0 ``subscriber`` directive in order to register an + object event subscriber, you must now pass a sequence to indicate you'd + like to register a subscriber for an object event. e.g.: + + @subscriber([IFoo, IBar]) + def expects_object_event(object, event): + print object, event + Features -------- -- cgit v1.2.3 From 8519c9a97dfdc4be7e4ba76e6e175ec9e7668b78 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 1 Jul 2011 03:20:34 -0400 Subject: fix --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 3f8fd5049..9a6107efc 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -27,7 +27,7 @@ Bug Fixes The behavior now matches the documentation. If you were relying on the buggy behavior of the 1.0 ``subscriber`` directive in order to register an object event subscriber, you must now pass a sequence to indicate you'd - like to register a subscriber for an object event. e.g.: + like to register a subscriber for an object event. e.g.:: @subscriber([IFoo, IBar]) def expects_object_event(object, event): -- cgit v1.2.3 From b9c0e79be2764b8f6c59e5be9044675666154ea0 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 1 Jul 2011 04:41:34 -0400 Subject: prep for 1.1a4 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 9a6107efc..4867c9e88 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.1a4 (2011-07-01) +================== Bug Fixes --------- -- cgit v1.2.3 From e21ed88a6dccc1b6f7fee825c6e7afa6d22bd51e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 1 Jul 2011 05:02:38 -0400 Subject: move 1.0 stuff to HISTORY.txt --- CHANGES.txt | 1202 +---------------------------------------------------------- 1 file changed, 2 insertions(+), 1200 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 4867c9e88..224860b47 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -52,6 +52,8 @@ Documentation told the user to depend on WebTest, and 2 tests failed in each as the result of changes to Pyramid itself. These issues have been fixed. +- Move 1.0.X CHANGES.txt entries to HISTORY.txt. + 1.1a3 (2011-06-26) ================== @@ -511,1203 +513,3 @@ Dependencies (Note that in reality, everyone should probably be using 1.0.4 or better though, as WebOb 1.0.2 and 1.0.3 were effectively brownbag releases.) -1.0 (2011-01-30) -================ - -Documentation -------------- - -- Fixed bug in ZODB Wiki tutorial (missing dependency on ``docutils`` in - "models" step within ``setup.py``). - -- Removed API documentation for ``pyramid.testing`` APIs named - ``registerDummySecurityPolicy``, ``registerResources``, ``registerModels``, - ``registerEventListener``, ``registerTemplateRenderer``, - ``registerDummyRenderer``, ``registerView``, ``registerUtility``, - ``registerAdapter``, ``registerSubscriber``, ``registerRoute``, - and ``registerSettings``. - -- Moved "Using ZODB With ZEO" and "Using repoze.catalog Within Pyramid" - tutorials out of core documentation and into the Pyramid Tutorials site - (http://docs.pylonsproject.org/projects/pyramid_tutorials/dev/). - -- Changed "Cleaning up After a Request" section in the URL Dispatch chapter - to use ``request.add_finished_callback`` instead of jamming an object with - a ``__del__`` into the WSGI environment. - -- Remove duplication of ``add_route`` API documentation from URL Dispatch - narrative chapter. - -- Remove duplication of API and narrative documentation in - ``pyramid.view.view_config`` API docs by pointing to - ``pyramid.config.add_view`` documentation and narrative chapter - documentation. - -- Removed some API documentation duplicated in narrative portions of - documentation - -- Removed "Overall Flow of Authentication" from SQLAlchemy + URL Dispatch - wiki tutorial due to print space concerns (moved to Pyramid Tutorials - site). - -Bug Fixes ---------- - -- Deprecated-since-BFG-1.2 APIs from ``pyramid.testing`` now properly emit - deprecation warnings. - -- Added ``egg:repoze.retry#retry`` middleware to the WSGI pipeline in ZODB - templates (retry ZODB conflict errors which occur in normal operations). - -- Removed duplicate implementations of ``is_response``. Two competing - implementations existed: one in ``pyramid.config`` and one in - ``pyramid.view``. Now the one defined in ``pyramid.view`` is used - internally by ``pyramid.config`` and continues to be advertised as an API. - -1.0b3 (2011-01-28) -================== - -Bug Fixes ---------- - -- Use © instead of copyright symbol in paster templates / tutorial - templates for the benefit of folks who cutnpaste and save to a non-UTF8 - format. - -- ``pyramid.view.append_slash_notfound_view`` now preserves GET query - parameters across redirects. - -Documentation -------------- - -- Beef up documentation related to ``set_default_permission``: explicitly - mention that default permissions also protect exception views. - -- Paster templates and tutorials now use spaces instead of tabs in their HTML - templates. - -1.0b2 (2011-01-24) -================== - -Bug Fixes ---------- - -- The ``production.ini`` generated by all paster templates now have an - effective logging level of WARN, which prevents e.g. SQLAlchemy statement - logging and other inappropriate output. - -- The ``production.ini`` of the ``pyramid_routesalchemy`` and - ``pyramid_alchemy`` paster templates did not have a ``sqlalchemy`` logger - section, preventing ``paster serve production.ini`` from working. - -- The ``pyramid_routesalchemy`` and ``pyramid_alchemy`` paster templates used - the ``{{package}}`` variable in a place where it should have used the - ``{{project}}`` variable, causing applications created with uppercase - letters e.g. ``paster create -t pyramid_routesalchemy Dibbus`` to fail to - start when ``paster serve development.ini`` was used against the result. - See https://github.com/Pylons/pyramid/issues/#issue/107 - -- The ``render_view`` method of ``pyramid.renderers.RendererHelper`` passed - an incorrect value into the renderer for ``renderer_info``. It now passes - an instance of ``RendererHelper`` instead of a dictionary, which is - consistent with other usages. See - https://github.com/Pylons/pyramid/issues#issue/106 - -- A bug existed in the ``pyramid.authentication.AuthTktCookieHelper`` which - would break any usage of an AuthTktAuthenticationPolicy when one was - configured to reissue its tokens (``reissue_time`` < ``timeout`` / - ``max_age``). Symptom: ``ValueError: ('Invalid token %r', '')``. See - https://github.com/Pylons/pyramid/issues#issue/108. - -1.0b1 (2011-01-21) -================== - -Features --------- - -- The AuthTktAuthenticationPolicy now accepts a ``tokens`` parameter via - ``pyramid.security.remember``. The value must be a sequence of strings. - Tokens are placed into the auth_tkt "tokens" field and returned in the - auth_tkt cookie. - -- Add ``wild_domain`` argument to AuthTktAuthenticationPolicy, which defaults - to ``True``. If it is set to ``False``, the feature of the policy which - sets a cookie with a wilcard domain will be turned off. - -- Add a ``MANIFEST.in`` file to each paster template. See - https://github.com/Pylons/pyramid/issues#issue/95 - -Bug Fixes ---------- - -- ``testing.setUp`` now adds a ``settings`` attribute to the registry (both - when it's passed a registry without any settings and when it creates one). - -- The ``testing.setUp`` function now takes a ``settings`` argument, which - should be a dictionary. Its values will subsequently be available on the - returned ``config`` object as ``config.registry.settings``. - -Documentation -------------- - -- Added "What's New in Pyramid 1.0" chapter to HTML rendering of - documentation. - -- Merged caseman-master narrative editing branch, many wording fixes and - extensions. - -- Fix deprecated example showing ``chameleon_zpt`` API call in testing - narrative chapter. - -- Added "Adding Methods to the Configurator via ``add_directive``" section to - Advanced Configuration narrative chapter. - -- Add docs for ``add_finished_callback``, ``add_response_callback``, - ``route_path``, ``route_url``, and ``static_url`` methods to - ``pyramid.request.Request`` API docs. - -- Add (minimal) documentation about using I18N within Mako templates to - "Internationalization and Localization" narrative chapter. - -- Move content of "Forms" chapter back to "Views" chapter; I can't think of a - better place to put it. - -- Slightly improved interface docs for ``IAuthorizationPolicy``. - -- Minimally explain usage of custom regular expressions in URL dispatch - replacement markers within URL Dispatch chapter. - -Deprecations -------------- - -- Using the ``pyramid.view.bfg_view`` alias for ``pyramid.view.view_config`` - (a backwards compatibility shim) now issues a deprecation warning. - -Backwards Incompatibilities ---------------------------- - -- Using ``testing.setUp`` now registers an ISettings utility as a side - effect. Some test code which queries for this utility after - ``testing.setUp`` via queryAdapter will expect a return value of ``None``. - This code will need to be changed. - -- When a ``pyramid.exceptions.Forbidden`` error is raised, its status code - now ``403 Forbidden``. It was previously ``401 Unauthorized``, for - backwards compatibility purposes with ``repoze.bfg``. This change will - cause problems for users of Pyramid with ``repoze.who``, which intercepts - ``401 Unauthorized`` by default, but allows ``403 Forbidden`` to pass - through. Those deployments will need to configure ``repoze.who`` to also - react to ``403 Forbidden``. - -- The default value for the ``cookie_on_exception`` parameter to - ``pyramid.session.UnencyrptedCookieSessionFactory`` is now ``True``. This - means that when view code causes an exception to be raised, and the session - has been mutated, a cookie will be sent back in the response. Previously - its default value was ``False``. - -Paster Templates ----------------- - -- The ``pyramid_zodb``, ``pyramid_routesalchemy`` and ``pyramid_alchemy`` - paster templates now use a default "commit veto" hook when configuring the - ``repoze.tm2`` transaction manager in ``development.ini``. This prevents a - transaction from being committed when the response status code is within - the 400 or 500 ranges. See also - http://docs.repoze.org/tm2/#using-a-commit-veto. - -1.0a10 (2011-01-18) -=================== - -Bug Fixes ---------- - -- URL dispatch now properly handles a ``.*`` or ``*`` appearing in a regex - match when used inside brackets. Resolves issue #90. - -Backwards Incompatibilities ---------------------------- - -- The ``add_handler`` method of a Configurator has been removed from the - Pyramid core. Handlers are now a feature of the ``pyramid_handlers`` - package, which can be downloaded from PyPI. Documentation for the package - should be available via - http://pylonsproject.org/projects/pyramid_handlers/dev/, which describes how - to add a configuration statement to your ``main`` block to reobtain this - method. You will also need to add an ``install_requires`` dependency upon - ``pyramid_handlers`` to your ``setup.py`` file. - -- The ``load_zcml`` method of a Configurator has been removed from the - Pyramid core. Loading ZCML is now a feature of the ``pyramid_zcml`` - package, which can be downloaded from PyPI. Documentation for the package - should be available via - http://pylonsproject.org/projects/pyramid_zcml/dev/, which describes how - to add a configuration statement to your ``main`` block to reobtain this - method. You will also need to add an ``install_requires`` dependency upon - ``pyramid_zcml`` to your ``setup.py`` file. - -- The ``pyramid.includes`` subpackage has been removed. ZCML files which use - include the package ``pyramid.includes`` (e.g. ````) now must include the ``pyramid_zcml`` - package instead (e.g. ````). - -- The ``pyramid.view.action`` decorator has been removed from the Pyramid - core. Handlers are now a feature of the ``pyramid_handlers`` package. It - should now be imported from ``pyramid_handlers`` e.g. ``from - pyramid_handlers import action``. - -- The ``handler`` ZCML directive has been removed. It is now a feature of - the ``pyramid_handlers`` package. - -- The ``pylons_minimal``, ``pylons_basic`` and ``pylons_sqla`` paster - templates were removed. Use ``pyramid_sqla`` (available from PyPI) as a - generic replacement for Pylons-esque development. - -- The ``make_app`` function has been removed from the ``pyramid.router`` - module. It continues life within the ``pyramid_zcml`` package. This - leaves the ``pyramid.router`` module without any API functions. - -- The ``configure_zcml`` setting within the deployment settings (within - ``**settings`` passed to a Pyramid ``main`` function) has ceased to have any - meaning. - -Features --------- - -- ``pyramid.testing.setUp`` and ``pyramid.testing.tearDown`` have been - undeprecated. They are now the canonical setup and teardown APIs for test - configuration, replacing "direct" creation of a Configurator. This is a - change designed to provide a facade that will protect against any future - Configurator deprecations. - -- Add ``charset`` attribute to ``pyramid.testing.DummyRequest`` - (unconditionally ``UTF-8``). - -- Add ``add_directive`` method to configurator, which allows framework - extenders to add methods to the configurator (ala ZCML directives). - -- When ``Configurator.include`` is passed a *module* as an argument, it - defaults to attempting to find and use a callable named ``includeme`` - within that module. This makes it possible to use - ``config.include('some.module')`` rather than - ``config.include('some.module.somefunc')`` as long as the include function - within ``some.module`` is named ``includeme``. - -- The ``bfg2pyramid`` script now converts ZCML include tags that have - ``repoze.bfg.includes`` as a package attribute to the value - ``pyramid_zcml``. For example, ```` - will be converted to ````. - -Paster Templates ----------------- - -- All paster templates now use ``pyramid.testing.setUp`` and - ``pyramid.testing.tearDown`` rather than creating a Configurator "by hand" - within their ``tests.py`` module, as per decision in features above. - -- The ``starter_zcml`` paster template has been moved to the ``pyramid_zcml`` - package. - -Documentation -------------- - -- The wiki and wiki2 tutorials now use ``pyramid.testing.setUp`` and - ``pyramid.testing.tearDown`` rather than creating a Configurator "by hand", - as per decision in features above. - -- The "Testing" narrative chapter now explains ``pyramid.testing.setUp`` and - ``pyramid.testing.tearDown`` instead of Configurator creation and - ``Configurator.begin()`` and ``Configurator.end()``. - -- Document the ``request.override_renderer`` attribute within the narrative - "Renderers" chapter in a section named "Overriding A Renderer at Runtime". - -- The "Declarative Configuration" narrative chapter has been removed (it was - moved to the ``pyramid_zcml`` package). - -- Most references to ZCML in narrative chapters have been removed or - redirected to ``pyramid_zcml`` locations. - -Deprecations ------------- - -- Deprecation warnings related to import of the following API functions were - added: ``pyramid.traversal.find_model``, ``pyramid.traversal.model_path``, - ``pyramid.traversal.model_path_tuple``, ``pyramid.url.model_url``. The - instructions emitted by the deprecation warnings instruct the developer to - change these method spellings to their ``resource`` equivalents. This is a - consequence of the mass concept rename of "model" to "resource" performed - in 1.0a7. - -1.0a9 (2011-01-08) -================== - -Bug Fixes ---------- - -- The ``proutes`` command tried too hard to resolve the view for printing, - resulting in exceptions when an exceptional root factory was encountered. - Instead of trying to resolve the view, if it cannot, it will now just print - ````. - -- The `self` argument was included in new methods of the ``ISession`` interface - signature, causing ``pyramid_beaker`` tests to fail. - -- Readd ``pyramid.traversal.model_path_tuple`` as an alias for - ``pyramid.traversal.resource_path_tuple`` for backwards compatibility. - -Features --------- - -- Add a new API ``pyramid.url.current_route_url``, which computes a URL based - on the "current" route (if any) and its matchdict values. - -- ``config.add_view`` now accepts a ``decorator`` keyword argument, a callable - which will decorate the view callable before it is added to the registry. - -- If a handler class provides an ``__action_decorator__`` attribute (usually - a classmethod or staticmethod), use that as the decorator for each view - registration for that handler. - -- The ``pyramid.interfaces.IAuthenticationPolicy`` interface now specifies an - ``unauthenticated_userid`` method. This method supports an important - optimization required by people who are using persistent storages which do - not support object caching and whom want to create a "user object" as a - request attribute. - -- A new API has been added to the ``pyramid.security`` module named - ``unauthenticated_userid``. This API function calls the - ``unauthenticated_userid`` method of the effective security policy. - -- An ``unauthenticated_userid`` method has been added to the dummy - authentication policy returned by - ``pyramid.config.Configurator.testing_securitypolicy``. It returns the - same thing as that the dummy authentication policy's - ``authenticated_userid`` method. - -- The class ``pyramid.authentication.AuthTktCookieHelper`` is now an API. - This class can be used by third-party authentication policy developers to - help in the mechanics of authentication cookie-setting. - -- New constructor argument to Configurator: ``default_view_mapper``. Useful - to create systems that have alternate view calling conventions. A view - mapper allows objects that are meant to be used as view callables to have - an arbitrary argument list and an arbitrary result. The object passed as - ``default_view_mapper`` should implement the - ``pyramid.interfaces.IViewMapperFactory`` interface. - -- add a ``set_view_mapper`` API to Configurator. Has - the same result as passing ``default_view_mapper`` to the Configurator - constructor. - -- ``config.add_view`` now accepts a ``mapper`` keyword argument, which should - either be ``None``, a string representing a Python dotted name, or an - object which is an ``IViewMapperFactory``. This feature is not useful for - "civilians", only for extension writers. - -- Allow static renderer provided during view registration to be overridden at - request time via a request attribute named ``override_renderer``, which - should be the name of a previously registered renderer. Useful to provide - "omnipresent" RPC using existing rendered views. - -- Instances of ``pyramid.testing.DummyRequest`` now have a ``session`` - object, which is mostly a dictionary, but also implements the other session - API methods for flash and CSRF. - -Backwards Incompatibilities ---------------------------- - -- Since the ``pyramid.interfaces.IAuthenticationPolicy`` interface now - specifies that a policy implementation must implement an - ``unauthenticated_userid`` method, all third-party custom authentication - policies now must implement this method. It, however, will only be called - when the global function named ``pyramid.security.unauthenticated_userid`` - is invoked, so if you're not invoking that, you will not notice any issues. - -- ``pyramid.interfaces.ISession.get_csrf_token`` now mandates that an - implementation should return a *new* token if one doesn't already exist in - the session (previously it would return None). The internal sessioning - implementation has been changed. - -Documentation -------------- - -- The (weak) "Converting a CMF Application to Pyramid" tutorial has been - removed from the tutorials section. It was moved to the - ``pyramid_tutorials`` Github repository. - -- The "Resource Location and View Lookup" chapter has been replaced with a - variant of Rob Miller's "Much Ado About Traversal" (originally published at - http://blog.nonsequitarian.org/2010/much-ado-about-traversal/). - -- Many minor wording tweaks and refactorings (merged Casey Duncan's docs - fork, in which he is working on general editing). - -- Added (weak) description of new view mapper feature to Hooks narrative - chapter. - -- Split views chapter into 2: View Callables and View Configuration. - -- Reorder Renderers and Templates chapters after View Callables but before - View Configuration. - -- Merge Session Objects, Cross-Site Request Forgery, and Flash Messaging - chapter into a single Sessions chapter. - -- The Wiki and Wiki2 tutorials now have much nicer CSS and graphics. - -Internals ---------- - -- The "view derivation" code is now factored into a set of classes rather - than a large number of standalone functions (a side effect of the - view mapper refactoring). - -- The ``pyramid.renderer.RendererHelper`` class has grown a ``render_view`` - method, which is used by the default view mapper (a side effect of the - view mapper refactoring). - -- The object passed as ``renderer`` to the "view deriver" is now an instance - of ``pyramid.renderers.RendererHelper`` rather than a dictionary (a side - effect of view mapper refactoring). - -- The class used as the "page template" in ``pyramid.chameleon_text`` was - removed, in preference to using a Chameleon-inbuilt version. - -- A view callable wrapper registered in the registry now contains an - ``__original_view__`` attribute which references the original view callable - (or class). - -- The (non-API) method of all internal authentication policy implementations - previously named ``_get_userid`` is now named ``unauthenticated_userid``, - promoted to an API method. If you were overriding this method, you'll now - need to override it as ``unauthenticated_userid`` instead. - -- Remove (non-API) function of config.py named _map_view. - -1.0a8 (2010-12-27) -================== - -Bug Fixes ---------- - -- The name ``registry`` was not available in the ``paster pshell`` - environment under IPython. - -Features --------- - -- If a resource implements a ``__resource_url__`` method, it will be called - as the result of invoking the ``pyramid.url.resource_url`` function to - generate a URL, overriding the default logic. See the new "Generating The - URL Of A Resource" section within the Resources narrative chapter. - -- Added flash messaging, as described in the "Flash Messaging" narrative - documentation chapter. - -- Added CSRF token generation, as described in the narrative chapter entitled - "Preventing Cross-Site Request Forgery Attacks". - -- Prevent misunderstanding of how the ``view`` and ``view_permission`` - arguments to add_route work by raising an exception during configuration if - view-related arguments exist but no ``view`` argument is passed. - -- Add ``paster proute`` command which displays a summary of the routing - table. See the narrative documentation section within the "URL Dispatch" - chapter entitled "Displaying All Application Routes". - -Paster Templates ----------------- - -- The ``pyramid_zodb`` Paster template no longer employs ZCML. Instead, it - is based on scanning. - -Documentation -------------- - -- Added "Generating The URL Of A Resource" section to the Resources narrative - chapter (includes information about overriding URL generation using - ``__resource_url__``). - -- Added "Generating the Path To a Resource" section to the Resources - narrative chapter. - -- Added "Finding a Resource by Path" section to the Resources narrative - chapter. - -- Added "Obtaining the Lineage of a Resource" to the Resources narrative - chapter. - -- Added "Determining if a Resource is In The Lineage of Another Resource" to - Resources narrative chapter. - -- Added "Finding the Root Resource" to Resources narrative chapter. - -- Added "Finding a Resource With a Class or Interface in Lineage" to - Resources narrative chapter. - -- Added a "Flash Messaging" narrative documentation chapter. - -- Added a narrative chapter entitled "Preventing Cross-Site Request Forgery - Attacks". - -- Changed the "ZODB + Traversal Wiki Tutorial" based on changes to - ``pyramid_zodb`` Paster template. - -- Added "Advanced Configuration" narrative chapter which documents how to - deal with configuration conflicts, two-phase configuration, ``include`` and - ``commit``. - -- Fix API documentation rendering for ``pyramid.view.static`` - -- Add "Pyramid Provides More Than One Way to Do It" to Design Defense - documentation. - -- Changed "Static Assets" narrative chapter: clarify that ``name`` represents - a prefix unless it's a URL, added an example of a root-relative static view - fallback for URL dispatch, added an example of creating a simple view that - returns the body of a file. - -- Move ZCML usage in Hooks chapter to Declarative Configuration chapter. - -- Merge "Static Assets" chapter into the "Assets" chapter. - -- Added narrative documentation section within the "URL Dispatch" chapter - entitled "Displaying All Application Routes" (for ``paster proutes`` - command). - -1.0a7 (2010-12-20) -================== - -Terminology Changes -------------------- - -- The Pyramid concept previously known as "model" is now known as "resource". - As a result: - - - The following API changes have been made:: - - pyramid.url.model_url -> - pyramid.url.resource_url - - pyramid.traversal.find_model -> - pyramid.url.find_resource - - pyramid.traversal.model_path -> - pyramid.traversal.resource_path - - pyramid.traversal.model_path_tuple -> - pyramid.traversal.resource_path_tuple - - pyramid.traversal.ModelGraphTraverser -> - pyramid.traversal.ResourceTreeTraverser - - pyramid.config.Configurator.testing_models -> - pyramid.config.Configurator.testing_resources - - pyramid.testing.registerModels -> - pyramid.testing.registerResources - - pyramid.testing.DummyModel -> - pyramid.testing.DummyResource - - - All documentation which previously referred to "model" now refers to - "resource". - - - The ``starter`` and ``starter_zcml`` paster templates now have a - ``resources.py`` module instead of a ``models.py`` module. - - - Positional argument names of various APIs have been changed from - ``model`` to ``resource``. - - Backwards compatibility shims have been left in place in all cases. They - will continue to work "forever". - -- The Pyramid concept previously known as "resource" is now known as "asset". - As a result: - - - The (non-API) module previously known as ``pyramid.resource`` is now - known as ``pyramid.asset``. - - - All docs that previously referred to "resource specification" now refer - to "asset specification". - - - The following API changes were made:: - - pyramid.config.Configurator.absolute_resource_spec -> - pyramid.config.Configurator.absolute_asset_spec - - pyramid.config.Configurator.override_resource -> - pyramid.config.Configurator.override_asset - - - The ZCML directive previously known as ``resource`` is now known as - ``asset``. - - - The setting previously known as ``BFG_RELOAD_RESOURCES`` (envvar) or - ``reload_resources`` (config file) is now known, respectively, as - ``PYRAMID_RELOAD_ASSETS`` and ``reload_assets``. - - Backwards compatibility shims have been left in place in all cases. They - will continue to work "forever". - -Bug Fixes ---------- - -- Make it possible to succesfully run all tests via ``nosetests`` command - directly (rather than indirectly via ``python setup.py nosetests``). - -- When a configuration conflict is encountered during scanning, the conflict - exception now shows the decorator information that caused the conflict. - -Features --------- - -- Added ``debug_routematch`` configuration setting that logs matched routes - (including the matchdict and predicates). - -- The name ``registry`` is now available in a ``pshell`` environment by - default. It is the application registry object. - -Environment ------------ - -- All environment variables which used to be prefixed with ``BFG_`` are now - prefixed with ``PYRAMID_`` (e.g. ``BFG_DEBUG_NOTFOUND`` is now - ``PYRAMID_DEBUG_NOTFOUND``) - -Documentation -------------- - -- Added "Debugging Route Matching" section to the urldispatch narrative - documentation chapter. - -- Added reference to ``PYRAMID_DEBUG_ROUTEMATCH`` envvar and ``debug_routematch`` - config file setting to the Environment narrative docs chapter. - -- Changed "Project" chapter slightly to expand on use of ``paster pshell``. - -- Direct Jython users to Mako rather than Jinja2 in "Install" narrative - chapter. - -- Many changes to support terminological renaming of "model" to "resource" - and "resource" to "asset". - -- Added an example of ``WebTest`` functional testing to the testing narrative - chapter. - -- Rearranged chapter ordering by popular demand (URL dispatch first, then - traversal). Put hybrid chapter after views chapter. - -- Split off "Renderers" as its own chapter from "Views" chapter in narrative - documentation. - -Paster Templates ----------------- - -- Added ``debug_routematch = false`` to all paster templates. - -Dependencies ------------- - -- Depend on Venusian >= 0.5 (for scanning conflict exception decoration). - -1.0a6 (2010-12-15) -================== - -Bug Fixes ---------- - -- 1.0a5 introduced a bug when ``pyramid.config.Configurator.scan`` was used - without a ``package`` argument (e.g. ``config.scan()`` as opposed to - ``config.scan('packagename')``. The symptoms were: lots of deprecation - warnings printed to the console about imports of deprecated Pyramid - functions and classes and non-detection of view callables decorated with - ``view_config`` decorators. This has been fixed. - -- Tests now pass on Windows (no bugs found, but a few tests in the test suite - assumed UNIX path segments in filenames). - -Documentation -------------- - -- If you followed it to-the-letter, the ZODB+Traversal Wiki tutorial would - instruct you to run a test which would fail because the view callable - generated by the ``pyramid_zodb`` tutorial used a one-arg view callable, - but the test in the sample code used a two-arg call. - -- Updated ZODB+Traversal tutorial setup.py of all steps to match what's - generated by ``pyramid_zodb``. - -- Fix reference to ``repoze.bfg.traversalwrapper`` in "Models" chapter (point - at ``pyramid_traversalwrapper`` instead). - -1.0a5 (2010-12-14) -================== - -Features --------- - -- Add a ``handler`` ZCML directive. This directive does the same thing as - ``pyramid.configuration.add_handler``. - -- A new module named ``pyramid.config`` was added. It subsumes the duties of - the older ``pyramid.configuration`` module. - -- The new ``pyramid.config.Configurator` class has API methods that the older - ``pyramid.configuration.Configurator`` class did not: ``with_context`` (a - classmethod), ``include``, ``action``, and ``commit``. These methods exist - for imperative application extensibility purposes. - -- The ``pyramid.testing.setUp`` function now accepts an ``autocommit`` - keyword argument, which defaults to ``True``. If it is passed ``False``, - the Config object returned by ``setUp`` will be a non-autocommiting Config - object. - -- Add logging configuration to all paster templates. - -- ``pyramid_alchemy``, ``pyramid_routesalchemy``, and ``pylons_sqla`` paster - templates now use idiomatic SQLAlchemy configuration in their respective - ``.ini`` files and Python code. - -- ``pyramid.testing.DummyRequest`` now has a class variable, - ``query_string``, which defaults to the empty string. - -- Add support for json on GAE by catching NotImplementedError and importing - simplejson from django.utils. - -- The Mako renderer now accepts a resource specification for - ``mako.module_directory``. - -- New boolean Mako settings variable ``mako.strict_undefined``. See `Mako - Context Variables - `_ for - its meaning. - -Dependencies ------------- - -- Depend on Mako 0.3.6+ (we now require the ``strict_undefined`` feature). - -Bug Fixes ---------- - -- When creating a Configurator from within a ``paster pshell`` session, you - were required to pass a ``package`` argument although ``package`` is not - actually required. If you didn't pass ``package``, you would receive an - error something like ``KeyError: '__name__'`` emanating from the - ``pyramid.path.caller_module`` function. This has now been fixed. - -- The ``pyramid_routesalchemy`` paster template's unit tests failed - (``AssertionError: 'SomeProject' != 'someproject'``). This is fixed. - -- Make default renderer work (renderer factory registered with no name, which - is active for every view unless the view names a specific renderer). - -- The Mako renderer did not properly turn the ``mako.imports``, - ``mako.default_filters``, and ``mako.imports`` settings into lists. - -- The Mako renderer did not properly convert the ``mako.error_handler`` - setting from a dotted name to a callable. - -Documentation -------------- - -- Merged many wording, readability, and correctness changes to narrative - documentation chapters from https://github.com/caseman/pyramid (up to and - including "Models" narrative chapter). - -- "Sample Applications" section of docs changed to note existence of Cluegun, - Shootout and Virginia sample applications, ported from their repoze.bfg - origin packages. - -- SQLAlchemy+URLDispatch tutorial updated to integrate changes to - ``pyramid_routesalchemy`` template. - -- Add ``pyramid.interfaces.ITemplateRenderer`` interface to Interfaces API - chapter (has ``implementation()`` method, required to be used when getting - at Chameleon macros). - -- Add a "Modifying Package Structure" section to the project narrative - documentation chapter (explain turning a module into a package). - -- Documentation was added for the new ``handler`` ZCML directive in the ZCML - section. - -Deprecations ------------- - -- ``pyramid.configuration.Configurator`` is now deprecated. Use - ``pyramid.config.Configurator``, passing its constructor - ``autocommit=True`` instead. The ``pyramid.configuration.Configurator`` - alias will live for a long time, as every application uses it, but its - import now issues a deprecation warning. The - ``pyramid.config.Configurator`` class has the same API as - ``pyramid.configuration.Configurator`` class, which it means to replace, - except by default it is a *non-autocommitting* configurator. The - now-deprecated ``pyramid.configuration.Configurator`` will autocommit every - time a configuration method is called. - - The ``pyramid.configuration`` module remains, but it is deprecated. Use - ``pyramid.config`` instead. - -1.0a4 (2010-11-21) -================== - -Features --------- - -- URL Dispatch now allows for replacement markers to be located anywhere - in the pattern, instead of immediately following a ``/``. - -- URL Dispatch now uses the form ``{marker}`` to denote a replace marker in - the route pattern instead of ``:marker``. The old colon-style marker syntax - is still accepted for backwards compatibility. The new format allows a - regular expression for that marker location to be used instead of the - default ``[^/]+``, for example ``{marker:\d+}`` is now valid to require the - marker to be digits. - -- Add a ``pyramid.url.route_path`` API, allowing folks to generate relative - URLs. Calling ``route_path`` is the same as calling - ``pyramid.url.route_url`` with the argument ``_app_url`` equal to the empty - string. - -- Add a ``pyramid.request.Request.route_path`` API. This is a convenience - method of the request which calls ``pyramid.url.route_url``. - -- Make test suite pass on Jython (requires PasteScript trunk, presumably to - be 1.7.4). - -- Make test suite pass on PyPy (Chameleon doesn't work). - -- Surrounding application configuration with ``config.begin()`` and - ``config.end()`` is no longer necessary. All paster templates have been - changed to no longer call these functions. - -- Fix configurator to not convert ``ImportError`` to ``ConfigurationError`` - if the import that failed was unrelated to the import requested via a - dotted name when resolving dotted names (such as view dotted names). - -Documentation -------------- - -- SQLAlchemy+URLDispatch and ZODB+Traversal tutorials have been updated to - not call ``config.begin()`` or ``config.end()``. - -Bug Fixes ---------- - -- Add deprecation warnings to import of ``pyramid.chameleon_text`` and - ``pyramid.chameleon_zpt`` of ``get_renderer``, ``get_template``, - ``render_template``, and ``render_template_to_response``. - -- Add deprecation warning for import of ``pyramid.zcml.zcml_configure`` and - ``pyramid.zcml.file_configure``. - -- The ``pyramid_alchemy`` paster template had a typo, preventing an import - from working. - -- Fix apparent failures when calling ``pyramid.traversal.find_model(root, - path)`` or ``pyramid.traversal.traverse(path)`` when ``path`` is - (erroneously) a Unicode object. The user is meant to pass these APIs a - string object, never a Unicode object. In practice, however, users indeed - pass Unicode. Because the string that is passed must be ASCII encodeable, - now, if they pass a Unicode object, its data is eagerly converted to an - ASCII string rather than being passed along to downstream code as a - convenience to the user and to prevent puzzling second-order failures from - cropping up (all failures will occur within ``pyramid.traversal.traverse`` - rather than later down the line as the result of calling e.g. - ``traversal_path``). - -Backwards Incompatibilities ---------------------------- - -- The ``pyramid.testing.zcml_configure`` API has been removed. It had been - advertised as removed since repoze.bfg 1.2a1, but hadn't actually been. - -Deprecations ------------- - -- The ``pyramid.settings.get_settings`` API is now deprecated. Use - ``pyramid.threadlocals.get_current_registry().settings`` instead or use the - ``settings`` attribute of the registry available from the request - (``request.registry.settings``). - -Documentation -------------- - -- Removed ``zodbsessions`` tutorial chapter. It's still useful, but we now - have a SessionFactory abstraction which competes with it, and maintaining - documentation on both ways to do it is a distraction. - -Internal --------- - -- Replace Twill with WebTest in internal integration tests (avoid deprecation - warnings generated by Twill). - -1.0a3 (2010-11-16) -================== - -Features --------- - -- Added Mako TemplateLookup settings for ``mako.error_handler``, - ``mako.default_filters``, and ``mako.imports``. - -- Normalized all paster templates: each now uses the name ``main`` to - represent the function that returns a WSGI application, each now uses - WebError, each now has roughly the same shape of development.ini style. - -- Added class vars ``matchdict`` and ``matched_route`` to - ``pyramid.request.Request``. Each is set to ``None``. - -- New API method: ``pyramid.settings.asbool``. - -- New API methods for ``pyramid.request.Request``: ``model_url``, - ``route_url``, and ``static_url``. These are simple passthroughs for their - respective functions in ``pyramid.url``. - -- 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). - -Bug Fixes ---------- - -- The pylons_* paster templates erroneously used the ``{squiggly}`` routing - syntax as the pattern supplied to ``add_route``. This style of routing is - not supported. They were replaced with ``:colon`` style route patterns. - -- The pylons_* paster template used the same string - (``your_app_secret_string``) for the ``session.secret`` setting in the - generated ``development.ini``. This was a security risk if left unchanged - in a project that used one of the templates to produce production - applications. It now uses a randomly generated string. - -Documentation -------------- - -- ZODB+traversal wiki (``wiki``) tutorial updated due to changes to - ``pyramid_zodb`` paster template. - -- SQLAlchemy+urldispach wiki (``wiki2``) tutorial updated due to changes to - ``pyramid_routesalchemy`` paster template. - -- Documented the ``matchdict`` and ``matched_route`` attributes of the - request object in the Request API documentation. - -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``). - -Behavior Differences --------------------- - -- Internal: ZCML directives no longer call get_current_registry() if there's - a ``registry`` attribute on the ZCML context (kill off use of - threadlocals). - -- Internal: Chameleon template renderers now accept two arguments: ``path`` - and ``lookup``. ``Lookup`` will be an instance of a lookup class which - supplies (late-bound) arguments for debug, reload, and translate. Any - third-party renderers which use (the non-API) function - ``pyramid.renderers.template_renderer_factory`` will need to adjust their - implementations to obey the new callback argument list. This change was to - kill off inappropriate use of threadlocals. - -1.0a2 (2010-11-09) -================== - -Documentation -------------- - -- All references to events by interface - (e.g. ``pyramid.interfaces.INewRequest``) have been changed to reference - their concrete classes (e.g. ``pyramid.events.NewRequest``) in - documentation about making subscriptions. - -- All references to Pyramid-the-application were changed from mod-`pyramid` - to app-`Pyramid`. A custom role setting was added to ``docs/conf.py`` to - allow for this. (internal) - -1.0a1 (2010-11-05) -================== - -Features (delta from BFG 1.3) -------------------------------- - -- Mako templating renderer supports resource specification format for - template lookups and within Mako templates. Absolute filenames must - be used in Pyramid to avoid this lookup process. - -- Add ``pyramid.httpexceptions`` module, which is a facade for the - ``webob.exc`` module. - -- Direct built-in support for the Mako templating language. - -- A new configurator method exists: ``add_handler``. This method adds - a Pylons-style "view handler" (such a thing used to be called a - "controller" in Pylons 1.0). - -- New argument to configurator: ``session_factory``. - -- New method on configurator: ``set_session_factory`` - -- Using ``request.session`` now returns a (dictionary-like) session - object if a session factory has been configured. - -- The request now has a new attribute: ``tmpl_context`` for benefit of - Pylons users. - -- The decorator previously known as ``pyramid.view.bfg_view`` is now - known most formally as ``pyramid.view.view_config`` in docs and - paster templates. An import of ``pyramid.view.bfg_view``, however, - will continue to work "forever". - -- New API methods in ``pyramid.session``: ``signed_serialize`` and - ``signed_deserialize``. - -- New interface: ``pyramid.interfaces.IRendererInfo``. An object of this type - is passed to renderer factory constructors (see "Backwards - Incompatibilities"). - -- New event type: ``pyramid.interfaces.IBeforeRender``. An object of this type - is sent as an event before a renderer is invoked (but after the - application-level renderer globals factory added via - ``pyramid.configurator.configuration.set_renderer_globals_factory``, if any, - has injected its own keys). Applications may now subscribe to the - ``IBeforeRender`` event type in order to introspect the and modify the set of - renderer globals before they are passed to a renderer. The event object - iself has a dictionary-like interface that can be used for this purpose. For - example:: - - from repoze.events import subscriber - from pyramid.interfaces import IRendererGlobalsEvent - - @subscriber(IRendererGlobalsEvent) - def add_global(event): - event['mykey'] = 'foo' - - If a subscriber attempts to add a key that already exist in the renderer - globals dictionary, a ``KeyError`` is raised. This limitation is due to the - fact that subscribers cannot be ordered relative to each other. The set of - keys added to the renderer globals dictionary by all subscribers and - app-level globals factories must be unique. - -- New class: ``pyramid.response.Response``. This is a pure facade for - ``webob.Response`` (old code need not change to use this facade, it's - existence is mostly for vanity and documentation-generation purposes). - -- All preexisting paster templates (except ``zodb``) now use "imperative" - configuration (``starter``, ``routesalchemy``, ``alchemy``). - -- A new paster template named ``pyramid_starter_zcml`` exists, which uses - declarative configuration. - -Documentation (delta from BFG 1.3) ------------------------------------ - -- Added a ``pyramid.httpexceptions`` API documentation chapter. - -- Added a ``pyramid.session`` API documentation chapter. - -- Added a ``Session Objects`` narrative documentation chapter. - -- Added an API chapter for the ``pyramid.personality`` module. - -- Added an API chapter for the ``pyramid.response`` module. - -- All documentation which previously referred to ``webob.Response`` now uses - ``pyramid.response.Response`` instead. - -- The documentation has been overhauled to use imperative configuration, - moving declarative configuration (ZCML) explanations to a separate - narrative chapter ``declarative.rst``. - -- The ZODB Wiki tutorial was updated to take into account changes to the - ``pyramid_zodb`` paster template. - -- The SQL Wiki tutorial was updated to take into account changes to the - ``pyramid_routesalchemy`` paster template. - -Backwards Incompatibilities (with BFG 1.3) ------------------------------------------- - -- There is no longer an ``IDebugLogger`` registered as a named utility - with the name ``repoze.bfg.debug``. - -- The logger which used to have the name of ``repoze.bfg.debug`` now - has the name ``pyramid.debug``. - -- The deprecated API ``pyramid.testing.registerViewPermission`` - has been removed. - -- The deprecated API named ``pyramid.testing.registerRoutesMapper`` - has been removed. - -- The deprecated API named ``pyramid.request.get_request`` was removed. - -- The deprecated API named ``pyramid.security.Unauthorized`` was - removed. - -- The deprecated API named ``pyramid.view.view_execution_permitted`` - was removed. - -- The deprecated API named ``pyramid.view.NotFound`` was removed. - -- The ``bfgshell`` paster command is now named ``pshell``. - -- The Venusian "category" for all built-in Venusian decorators - (e.g. ``subscriber`` and ``view_config``/``bfg_view``) is now - ``pyramid`` instead of ``bfg``. - -- ``pyramid.renderers.rendered_response`` function removed; use - ``render_pyramid.renderers.render_to_response`` instead. - -- Renderer factories now accept a *renderer info object* rather than an - absolute resource specification or an absolute path. The object has the - following attributes: ``name`` (the ``renderer=`` value), ``package`` (the - 'current package' when the renderer configuration statement was found), - ``type``: the renderer type, ``registry``: the current registry, and - ``settings``: the deployment settings dictionary. - - Third-party ``repoze.bfg`` renderer implementations that must be ported to - Pyramid will need to account for this. - - This change was made primarily to support more flexible Mako template - rendering. - -- The presence of the key ``repoze.bfg.message`` in the WSGI environment when - an exception occurs is now deprecated. Instead, code which relies on this - environ value should use the ``exception`` attribute of the request - (e.g. ``request.exception[0]``) to retrieve the message. - -- The values ``bfg_localizer`` and ``bfg_locale_name`` kept on the request - during internationalization for caching purposes were never APIs. These - however have changed to ``localizer`` and ``locale_name``, respectively. - -- The default ``cookie_name`` value of the ``authtktauthenticationpolicy`` ZCML - now defaults to ``auth_tkt`` (it used to default to ``repoze.bfg.auth_tkt``). - -- The default ``cookie_name`` value of the - ``pyramid.authentication.AuthTktAuthenticationPolicy`` constructor now - defaults to ``auth_tkt`` (it used to default to ``repoze.bfg.auth_tkt``). - -- The ``request_type`` argument to the ``view`` ZCML directive, the - ``pyramid.configuration.Configurator.add_view`` method, or the - ``pyramid.view.view_config`` decorator (nee ``bfg_view``) is no longer - permitted to be one of the strings ``GET``, ``HEAD``, ``PUT``, ``POST`` or - ``DELETE``, and now must always be an interface. Accepting the - method-strings as ``request_type`` was a backwards compatibility strategy - servicing repoze.bfg 1.0 applications. Use the ``request_method`` - parameter instead to specify that a view a string request-method predicate. -- cgit v1.2.3 From 0fa1993d2abe87e197374f6abd3e45e62afb8a19 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 4 Jul 2011 01:07:45 -0400 Subject: - A new value ``http_cache`` can be used as a view configuration parameter. When you supply an ``http_cache`` value to a view configuration, the ``Expires`` and ``Cache-Control`` headers of a response generated by the associated view callable are modified. The value for ``http_cache`` may be one of the following: - A nonzero integer. If it's a nonzero integer, it's treated as a number of seconds. This number of seconds will be used to compute the ``Expires`` header and the ``Cache-Control: max-age`` parameter of responses to requests which call this view. For example: ``http_cache=3600`` instructs the requesting browser to 'cache this response for an hour, please'. - A ``datetime.timedelta`` instance. If it's a ``datetime.timedelta`` instance, it will be converted into a number of seconds, and that number of seconds will be used to compute the ``Expires`` header and the ``Cache-Control: max-age`` parameter of responses to requests which call this view. For example: ``http_cache=datetime.timedelta(days=1)`` instructs the requesting browser to 'cache this response for a day, please'. - Zero (``0``). If the value is zero, the ``Cache-Control`` and ``Expires`` headers present in all responses from this view will be composed such that client browser cache (and any intermediate caches) are instructed to never cache the response. - A two-tuple. If it's a two tuple (e.g. ``http_cache=(1, {'public':True})``), the first value in the tuple may be a nonzero integer or a ``datetime.timedelta`` instance; in either case this value will be used as the number of seconds to cache the response. The second value in the tuple must be a dictionary. The values present in the dictionary will be used as input to the ``Cache-Control`` response header. For example: ``http_cache=(3600, {'public':True})`` means 'cache for an hour, and add ``public`` to the Cache-Control header of the response'. All keys and values supported by the ``webob.cachecontrol.CacheControl`` interface may be added to the dictionary. Supplying ``{'public':True}`` is equivalent to calling ``response.cache_control.public = True``. Providing a non-tuple value as ``http_cache`` is equivalent to calling ``response.cache_expires(value)`` within your view's body. Providing a two-tuple value as ``http_cache`` is equivalent to calling ``response.cache_expires(value[0], **value[1])`` within your view's body. If you wish to avoid influencing, the ``Expires`` header, and instead wish to only influence ``Cache-Control`` headers, pass a tuple as ``http_cache`` with the first element of ``None``, e.g.: ``(None, {'public':True})``. --- CHANGES.txt | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 224860b47..67163d3e7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,60 @@ +Next release +============ + +Features +-------- + +- A new value ``http_cache`` can be used as a view configuration + parameter. + + When you supply an ``http_cache`` value to a view configuration, the + ``Expires`` and ``Cache-Control`` headers of a response generated by the + associated view callable are modified. The value for ``http_cache`` may be + one of the following: + + - A nonzero integer. If it's a nonzero integer, it's treated as a number + of seconds. This number of seconds will be used to compute the + ``Expires`` header and the ``Cache-Control: max-age`` parameter of + responses to requests which call this view. For example: + ``http_cache=3600`` instructs the requesting browser to 'cache this + response for an hour, please'. + + - A ``datetime.timedelta`` instance. If it's a ``datetime.timedelta`` + instance, it will be converted into a number of seconds, and that number + of seconds will be used to compute the ``Expires`` header and the + ``Cache-Control: max-age`` parameter of responses to requests which call + this view. For example: ``http_cache=datetime.timedelta(days=1)`` + instructs the requesting browser to 'cache this response for a day, + please'. + + - Zero (``0``). If the value is zero, the ``Cache-Control`` and + ``Expires`` headers present in all responses from this view will be + composed such that client browser cache (and any intermediate caches) are + instructed to never cache the response. + + - A two-tuple. If it's a two tuple (e.g. ``http_cache=(1, + {'public':True})``), the first value in the tuple may be a nonzero + integer or a ``datetime.timedelta`` instance; in either case this value + will be used as the number of seconds to cache the response. The second + value in the tuple must be a dictionary. The values present in the + dictionary will be used as input to the ``Cache-Control`` response + header. For example: ``http_cache=(3600, {'public':True})`` means 'cache + for an hour, and add ``public`` to the Cache-Control header of the + response'. All keys and values supported by the + ``webob.cachecontrol.CacheControl`` interface may be added to the + dictionary. Supplying ``{'public':True}`` is equivalent to calling + ``response.cache_control.public = True``. + + Providing a non-tuple value as ``http_cache`` is equivalent to calling + ``response.cache_expires(value)`` within your view's body. + + Providing a two-tuple value as ``http_cache`` is equivalent to calling + ``response.cache_expires(value[0], **value[1])`` within your view's body. + + If you wish to avoid influencing, the ``Expires`` header, and instead wish + to only influence ``Cache-Control`` headers, pass a tuple as ``http_cache`` + with the first element of ``None``, e.g.: ``(None, {'public':True})``. + 1.1a4 (2011-07-01) ================== -- cgit v1.2.3 From b78effb723e5a6b2f3980dac7830f8932abd7890 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 4 Jul 2011 03:58:00 -0400 Subject: - New request attribute: ``json``. If the request's ``content_type`` is ``application/json``, this attribute will contain the JSON-decoded variant of the request body. If the request's ``content_type`` is not ``application/json``, this attribute will be ``None``. --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 67163d3e7..0eb02baad 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,11 @@ Next release Features -------- +- New request attribute: ``json``. If the request's ``content_type`` is + ``application/json``, this attribute will contain the JSON-decoded + variant of the request body. If the request's ``content_type`` is not + ``application/json``, this attribute will be ``None``. + - A new value ``http_cache`` can be used as a view configuration parameter. -- cgit v1.2.3 From fca1efe07ac46b2817f30299bbebbc2031cce339 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 6 Jul 2011 14:57:59 -0400 Subject: - The ``config.scan`` method has grown a ``**kw`` argument. ``kw`` argument represents a set of keyword arguments to pass to the Venusian ``Scanner`` object created by Pyramid. (See the Venusian documentation for more information about ``Scanner``). --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 0eb02baad..041ff0bb7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,11 @@ Next release Features -------- +- The ``config.scan`` method has grown a ``**kw`` argument. ``kw`` argument + represents a set of keyword arguments to pass to the Venusian ``Scanner`` + object created by Pyramid. (See the Venusian documentation for more + information about ``Scanner``). + - New request attribute: ``json``. If the request's ``content_type`` is ``application/json``, this attribute will contain the JSON-decoded variant of the request body. If the request's ``content_type`` is not -- cgit v1.2.3 From b44aab103120749bd42e531974f28e67c16a1be0 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 9 Jul 2011 08:52:23 -0400 Subject: add a note about response wrapping bug fix --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 041ff0bb7..feabf0e26 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -65,6 +65,14 @@ Features to only influence ``Cache-Control`` headers, pass a tuple as ``http_cache`` with the first element of ``None``, e.g.: ``(None, {'public':True})``. +Bug Fixes +--------- + +- Framework wrappers of the original view (such as http_cached and so on) + relied on being able to trust that the response they were receiving was an + IResponse. It wasn't always, because the response was resolved by the + router instead of early in the view wrapping process. This has been fixed. + 1.1a4 (2011-07-01) ================== -- cgit v1.2.3 From 6a0602b3ce4d2a6de9dca25d8e0d390796a79267 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 9 Jul 2011 21:12:06 -0400 Subject: request.json -> request.json_body; add some docs for json_body --- CHANGES.txt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index feabf0e26..ff4036036 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,10 +9,9 @@ Features object created by Pyramid. (See the Venusian documentation for more information about ``Scanner``). -- New request attribute: ``json``. If the request's ``content_type`` is - ``application/json``, this attribute will contain the JSON-decoded - variant of the request body. If the request's ``content_type`` is not - ``application/json``, this attribute will be ``None``. +- New request property: ``json_body``. This property will return the + JSON-decoded variant of the request body. If the request body is not + well-formed JSON, this property will raise an exception. - A new value ``http_cache`` can be used as a view configuration parameter. @@ -73,6 +72,12 @@ Bug Fixes IResponse. It wasn't always, because the response was resolved by the router instead of early in the view wrapping process. This has been fixed. +Documentation +------------- + +- Added a section in the "Webob" chapter named "Dealing With A JSON-Encoded + Request Body" (usage of ``request.json_body``). + 1.1a4 (2011-07-01) ================== -- cgit v1.2.3 From 7565006cf1f3b929d9ea54256214f3a39385936a Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 10 Jul 2011 00:30:30 -0400 Subject: add info to changes.txt and whatsnew about pshell changes; removed unused import and unwrap string --- CHANGES.txt | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index ff4036036..ae8395234 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,21 @@ Next release Features -------- +- It is now possible to invoke ``paster pshell`` even if the paste ini file + section name pointed to in its argument is not actually a Pyramid WSGI + application. The shell will work in a degraded mode, and will warn the + user. See "The Interactive Shell" in the "Creating a Pyramid Project" + narrative documentation section. + +- ``paster pshell`` now offers more built-in global variables by default + (including ``app`` and ``settings``). See "The Interactive Shell" in the + "Creating a Pyramid Project" narrative documentation section. + +- It is now possible to add a ``[pshell]`` section to your application's .ini + configuration file, which influences the global names available to a pshell + session. See "Extending the Shell" in the "Creating a Pyramid Project" + narrative documentation chapter. + - The ``config.scan`` method has grown a ``**kw`` argument. ``kw`` argument represents a set of keyword arguments to pass to the Venusian ``Scanner`` object created by Pyramid. (See the Venusian documentation for more @@ -78,6 +93,15 @@ Documentation - Added a section in the "Webob" chapter named "Dealing With A JSON-Encoded Request Body" (usage of ``request.json_body``). +Behavior Changes +---------------- + +- The ``paster pshell``, ``paster proutes``, and ``paster pviews`` commands + now take a single argument in the form ``/path/to/config.ini#sectionname`` + rather than the previous 2-argument spelling ``/path/to/config.ini + sectionname``. ``#sectionname`` may be omitted, in which case ``#main`` is + assumed. + 1.1a4 (2011-07-01) ================== -- cgit v1.2.3 From a36fdbd40967117d34a70f156d2865aa2b21991e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 10 Jul 2011 01:13:44 -0400 Subject: prep for 1.1b1 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index ae8395234..2dead04b4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.1b1 (2011-07-10) +================== Features -------- -- cgit v1.2.3 From 82efa44c0d8f4b18b4f341519f54ecad68b56364 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 12 Jul 2011 03:52:42 -0400 Subject: - Previously, If a ``BeforeRender`` event subscriber added a value via the ``__setitem__`` or ``update`` methods of the event object with a key that already existed in the renderer globals dictionary, a ``KeyError`` was raised. With the deprecation of the "add_renderer_globals" feature of the configurator, there was no way to override an existing value in the renderer globals dictionary that already existed. Now, the event object will overwrite an older value that is already in the globals dictionary when its ``__setitem__`` or ``update`` is called (as well as the new ``setdefault`` method), just like a plain old dictionary. As a result, for maximum interoperability with other third-party subscribers, if you write an event subscriber meant to be used as a BeforeRender subscriber, your subscriber code will now need to (using ``.get`` or ``__contains__`` of the event object) ensure no value already exists in the renderer globals dictionary before setting an overriding value. --- CHANGES.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 2dead04b4..b9e645a38 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,24 @@ +Next Release +============ + +Behavior Changes +---------------- + +- Previously, If a ``BeforeRender`` event subscriber added a value via the + ``__setitem__`` or ``update`` methods of the event object with a key that + already existed in the renderer globals dictionary, a ``KeyError`` was + raised. With the deprecation of the "add_renderer_globals" feature of the + configurator, there was no way to override an existing value in the + renderer globals dictionary that already existed. Now, the event object + will overwrite an older value that is already in the globals dictionary + when its ``__setitem__`` or ``update`` is called (as well as the new + ``setdefault`` method), just like a plain old dictionary. As a result, for + maximum interoperability with other third-party subscribers, if you write + an event subscriber meant to be used as a BeforeRender subscriber, your + subscriber code will now need to (using ``.get`` or ``__contains__`` of the + event object) ensure no value already exists in the renderer globals + dictionary before setting an overriding value. + 1.1b1 (2011-07-10) ================== -- cgit v1.2.3 From 94ab244f121fa1bf8df57f75fad9da5f5f39c594 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 12 Jul 2011 19:21:11 -0400 Subject: - The ``Configurator.add_route`` method allowed two routes with the same route to be added without an intermediate ``config.commit()``. If you now receive a ``ConfigurationError`` at startup time that appears to be ``add_route`` related, you'll need to either a) ensure that all of your route names are unique or b) call ``config.commit()`` before adding a second route with the name of a previously added name or c) use a Configurator that works in ``autocommit`` mode. --- CHANGES.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index b9e645a38..403969fc0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -19,6 +19,17 @@ Behavior Changes event object) ensure no value already exists in the renderer globals dictionary before setting an overriding value. +Bug Fixes +--------- + +- The ``Configurator.add_route`` method allowed two routes with the same + route to be added without an intermediate ``config.commit()``. If you now + receive a ``ConfigurationError`` at startup time that appears to be + ``add_route`` related, you'll need to either a) ensure that all of your + route names are unique or b) call ``config.commit()`` before adding a + second route with the name of a previously added name or c) use a + Configurator that works in ``autocommit`` mode. + 1.1b1 (2011-07-10) ================== -- cgit v1.2.3 From aec6b29b42ad2acf0c9febd884ae9db1316022c5 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 12 Jul 2011 19:52:26 -0400 Subject: - The ``pyramid_routesalchemy`` and ``pyramid_alchemy`` scaffolds inappropriately used ``DBSession.rollback()`` instead of ``transaction.abort()`` in one place. - Wiki2 (SQLAlchemy + URL Dispatch) tutorial ``models.initialize_sql`` didn't match the ``pyramid_routesalchemy`` scaffold function of the same name; it didn't get synchronized when it was changed in the scaffold. --- CHANGES.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 403969fc0..fd11a16d1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -30,6 +30,17 @@ Bug Fixes second route with the name of a previously added name or c) use a Configurator that works in ``autocommit`` mode. +- The ``pyramid_routesalchemy`` and ``pyramid_alchemy`` scaffolds + inappropriately used ``DBSession.rollback()`` instead of + ``transaction.abort()`` in one place. + +Documentation +------------- + +- Wiki2 (SQLAlchemy + URL Dispatch) tutorial ``models.initialize_sql`` didn't + match the ``pyramid_routesalchemy`` scaffold function of the same name; it + didn't get synchronized when it was changed in the scaffold. + 1.1b1 (2011-07-10) ================== -- cgit v1.2.3 From e573d4356ed0371f5ba34ff3ff396fefd2e55913 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 12 Jul 2011 20:56:53 -0400 Subject: - New environment setting ``PYRAMID_PREVENT_HTTP_CACHE`` and new configuration file value ``prevent_http_cache``. These are synomymous and allow you to prevent HTTP cache headers from being set by Pyramid's ``http_cache`` machinery globally in a process. see the "Influencing HTTP Caching" section of the "View Configuration" narrative chapter and the detailed documentation for this setting in the "Environment Variables and Configuration Settings" narrative chapter. - New documentation section in View Configuration narrative chapter: "Influencing HTTP Caching". --- CHANGES.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index fd11a16d1..ea83827cc 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,17 @@ Next Release ============ +Features +-------- + +- New environment setting ``PYRAMID_PREVENT_HTTP_CACHE`` and new + configuration file value ``prevent_http_cache``. These are synomymous and + allow you to prevent HTTP cache headers from being set by Pyramid's + ``http_cache`` machinery globally in a process. see the "Influencing HTTP + Caching" section of the "View Configuration" narrative chapter and the + detailed documentation for this setting in the "Environment Variables and + Configuration Settings" narrative chapter. + Behavior Changes ---------------- @@ -41,6 +52,9 @@ Documentation match the ``pyramid_routesalchemy`` scaffold function of the same name; it didn't get synchronized when it was changed in the scaffold. +- New documentation section in View Configuration narrative chapter: + "Influencing HTTP Caching". + 1.1b1 (2011-07-10) ================== -- cgit v1.2.3 From d05117e9655e3619e66bfef86f40043fbcc61829 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 13 Jul 2011 00:41:59 -0400 Subject: - We now clear ``request.response`` before we invoke an exception view; an exception view will be working with a request.response that has not been touched by any code prior to the exception. --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index ea83827cc..21bea6572 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -45,6 +45,10 @@ Bug Fixes inappropriately used ``DBSession.rollback()`` instead of ``transaction.abort()`` in one place. +- We now clear ``request.response`` before we invoke an exception view; an + exception view will be working with a request.response that has not been + touched by any code prior to the exception. + Documentation ------------- -- cgit v1.2.3 From 873d9be3a787793caeb66223d2bb68dbc1fc396e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 13 Jul 2011 01:54:03 -0400 Subject: - Views associated with routes with spaces in the route name may not have been looked up correctly when using Pyramid with ``zope.interface`` 3.6.4 and better. Closes #232. --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 21bea6572..71491cb9b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -49,6 +49,10 @@ Bug Fixes exception view will be working with a request.response that has not been touched by any code prior to the exception. +- Views associated with routes with spaces in the route name may not have + been looked up correctly when using Pyramid with ``zope.interface`` 3.6.4 + and better. + Documentation ------------- -- cgit v1.2.3 From d4ccb85f76f38400eaf90b40ccbc56b017e3a6bd Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 13 Jul 2011 03:34:05 -0400 Subject: prep for 1.1b2 --- CHANGES.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 71491cb9b..c2c0cc86a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next Release -============ +1.1b2 (2011-07-13) +================== Features -------- @@ -51,7 +51,7 @@ Bug Fixes - Views associated with routes with spaces in the route name may not have been looked up correctly when using Pyramid with ``zope.interface`` 3.6.4 - and better. + and better. See https://github.com/Pylons/pyramid/issues/232. Documentation ------------- -- cgit v1.2.3 From 2ad827b4c67111f76e9c2fb54d082a50eb2b4c23 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 13 Jul 2011 18:31:41 -0400 Subject: - Fix corner case to ease semifunctional testing of views: create a new rendererinfo to clear out old registry on a rescan. See https://github.com/Pylons/pyramid/pull/234. Closes #234. --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index c2c0cc86a..cd9f42dd9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,13 @@ +Next release +============ + +Features +-------- + +- Fix corner case to ease semifunctional testing of views: create a new + rendererinfo to clear out old registry on a rescan. See + https://github.com/Pylons/pyramid/pull/234. + 1.1b2 (2011-07-13) ================== -- cgit v1.2.3 From 56d0fe4a9f97daa4d5fd0c28ea83c6ef32856b3d Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 14 Jul 2011 01:13:27 -0400 Subject: - New API class: ``pyramid.static.static_view``. This supersedes the deprecated ``pyramid.view.static`` class. ``pyramid.satic.static_view`` by default serves up documents as the result of the request's ``path_info``, attribute rather than it's ``subpath`` attribute (the inverse was true of ``pyramid.view.static``, and still is). ``pyramid.static.static_view`` exposes a ``use_subpath`` flag for use when you don't want the static view to behave like the older deprecated version. - The ``pyramid.view.static`` class has been deprecated in favor of the newer ``pyramid.static.static_view`` class. A deprecation warning is raised when it is used. You should replace it with a reference to ``pyramid.static.static_view`` with the ``use_subpath=True`` argument. --- CHANGES.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index cd9f42dd9..d898c5ca6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,22 @@ Features rendererinfo to clear out old registry on a rescan. See https://github.com/Pylons/pyramid/pull/234. +- New API class: ``pyramid.static.static_view``. This supersedes the + deprecated ``pyramid.view.static`` class. ``pyramid.satic.static_view`` by + default serves up documents as the result of the request's ``path_info``, + attribute rather than it's ``subpath`` attribute (the inverse was true of + ``pyramid.view.static``, and still is). ``pyramid.static.static_view`` + exposes a ``use_subpath`` flag for use when you don't want the static view + to behave like the older deprecated version. + +Deprecations +------------ + +- The ``pyramid.view.static`` class has been deprecated in favor of the newer + ``pyramid.static.static_view`` class. A deprecation warning is raised when + it is used. You should replace it with a reference to + ``pyramid.static.static_view`` with the ``use_subpath=True`` argument. + 1.1b2 (2011-07-13) ================== -- cgit v1.2.3 From 100a571ebbbe7b9f7143ac6015a1b870191683d5 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 14 Jul 2011 01:15:40 -0400 Subject: forgot to change whatsnew --- CHANGES.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index d898c5ca6..f1c153f3f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,12 +9,12 @@ Features https://github.com/Pylons/pyramid/pull/234. - New API class: ``pyramid.static.static_view``. This supersedes the - deprecated ``pyramid.view.static`` class. ``pyramid.satic.static_view`` by - default serves up documents as the result of the request's ``path_info``, - attribute rather than it's ``subpath`` attribute (the inverse was true of - ``pyramid.view.static``, and still is). ``pyramid.static.static_view`` - exposes a ``use_subpath`` flag for use when you don't want the static view - to behave like the older deprecated version. + deprecated ``pyramid.view.static`` class. ``pyramid.static.static_view`` + by default serves up documents as the result of the request's + ``path_info``, attribute rather than it's ``subpath`` attribute (the + inverse was true of ``pyramid.view.static``, and still is). + ``pyramid.static.static_view`` exposes a ``use_subpath`` flag for use when + you don't want the static view to behave like the older deprecated version. Deprecations ------------ -- cgit v1.2.3 From 10408c799257d6727c968d63cf439b1ebfbfd335 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 14 Jul 2011 01:18:46 -0400 Subject: typo --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index f1c153f3f..1a0573278 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,7 +14,7 @@ Features ``path_info``, attribute rather than it's ``subpath`` attribute (the inverse was true of ``pyramid.view.static``, and still is). ``pyramid.static.static_view`` exposes a ``use_subpath`` flag for use when - you don't want the static view to behave like the older deprecated version. + you want the static view to behave like the older deprecated version. Deprecations ------------ -- cgit v1.2.3 From 5b5cd6fa80421b594fa14a75f3daf6a5703f1898 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 14 Jul 2011 17:35:00 -0400 Subject: - Without a mo-file loaded for the combination of domain/locale, ``pyramid.i18n.Localizer.pluralize`` run using that domain/locale combination raised an inscrutable "translations object has no attr 'plural' error. Now, instead it "works" (it uses a germanic pluralization by default). This is not the "right" thing really (it's nonsensical to try to pluralize something without translations for that locale/domain available), but it matches the behavior of ``pyramid.i18n.Localizer.translate`` so it's at least consistent; see https://github.com/Pylons/pyramid/issues/235. Closes #235. --- CHANGES.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 1a0573278..02c2da33d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -24,6 +24,18 @@ Deprecations it is used. You should replace it with a reference to ``pyramid.static.static_view`` with the ``use_subpath=True`` argument. +Bug Fixes +--------- + +- Without a mo-file loaded for the combination of domain/locale, + ``pyramid.i18n.Localizer.pluralize`` run using that domain/locale + combination raised an inscrutable "translations object has no attr 'plural' + error. Now, instead it "works" (it uses a germanic pluralization by + default). This is not the "right" thing really (it's nonsensical to try to + pluralize something without translations for that locale/domain available), + but it matches the behavior of ``pyramid.i18n.Localizer.translate`` so it's + at least consistent; see https://github.com/Pylons/pyramid/issues/235. + 1.1b2 (2011-07-13) ================== -- cgit v1.2.3 From acc2d3ade4f5016ffd2f76923d3f56310b2ba577 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 14 Jul 2011 17:36:35 -0400 Subject: typo --- CHANGES.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 02c2da33d..bc906772d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -29,12 +29,12 @@ Bug Fixes - Without a mo-file loaded for the combination of domain/locale, ``pyramid.i18n.Localizer.pluralize`` run using that domain/locale - combination raised an inscrutable "translations object has no attr 'plural' - error. Now, instead it "works" (it uses a germanic pluralization by - default). This is not the "right" thing really (it's nonsensical to try to - pluralize something without translations for that locale/domain available), - but it matches the behavior of ``pyramid.i18n.Localizer.translate`` so it's - at least consistent; see https://github.com/Pylons/pyramid/issues/235. + combination raised an inscrutable "translations object has no attr + 'plural'" error. Now, instead it "works" (it uses a germanic pluralization + by default). It's nonsensical to try to pluralize something without + translations for that locale/domain available, but this behavior matches + the behavior of ``pyramid.i18n.Localizer.translate`` so it's at least + consistent; see https://github.com/Pylons/pyramid/issues/235. 1.1b2 (2011-07-13) ================== -- cgit v1.2.3 From c515d77de5b2f62727251ebc32d1292e67811771 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 15 Jul 2011 10:13:07 -0400 Subject: - get_root2 -> prepare - change prepare return value to a dict, and return the registry, request, etc - various docs and changelog entries. --- CHANGES.txt | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index bc906772d..0e1f67cdc 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -16,6 +16,39 @@ Features ``pyramid.static.static_view`` exposes a ``use_subpath`` flag for use when you want the static view to behave like the older deprecated version. +- A new API function ``pyramid.paster.bootstrap`` has been added to make + writing scripts that bootstrap a Pyramid environment easier, e.g.:: + + from pyramid.paster import bootstrap + info = bootstrap('/path/to/my/development.ini') + request = info['request'] + print request.route_url('myroute') + +- A new API function ``pyramid.scripting.prepare`` has been added. It is a + lower-level analogue of ``pyramid.paster.boostrap`` that accepts a request + and a registry instead of a config file argument, and is used for the same + purpose:: + + from pyramid.scripting import prepare + info = prepare(registry=myregistry) + request = info['request'] + print request.route_url('myroute') + +- A new API function ``pyramid.scripting.make_request`` has been added. The + resulting request will have a ``registry`` attribute. It is meant to be + used in conjunction with ``pyramid.scripting.prepare`` and/or + ``pyramid.paster.bootstrap`` (both of which accept a request as an + argument):: + + from pyramid.scripting import make_request + request = make_request('/') + +- New API attribute ``pyramid.config.global_registries`` is an iterable + object that contains references to every Pyramid registry loaded into the + current process via ``pyramid.config.Configurator.make_app``. It also has + a ``last`` attribute containing the last registry loaded. This is used by + the scripting machinery, and is available for introspection. + Deprecations ------------ -- cgit v1.2.3 From 999d44cf53e2213be8df881c2b407986b462c79c Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 15 Jul 2011 10:40:35 -0400 Subject: prep for 1.1b3 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 0e1f67cdc..00ac78835 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.1b3 (2011-07-15) +================== Features -------- -- cgit v1.2.3 From 5fb458c0dd70096e5d619e42992390bb1af071e1 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 16 Jul 2011 01:08:43 -0400 Subject: - Added a section entitled "Writing a Script" to the "Command-Line Pyramid" chapter. --- CHANGES.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 00ac78835..afbc12747 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,12 @@ +Next release +============ + +Documentation +------------- + +- Added a section entitled "Writing a Script" to the "Command-Line Pyramid" + chapter. + 1.1b3 (2011-07-15) ================== -- cgit v1.2.3 From 4b3ba9a09ba5491b6752315a9c68189f3a9d1780 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 16 Jul 2011 16:47:59 -0400 Subject: - Omit custom environ variables when rendering a custom exception template in ``pyramid.httpexceptions.WSGIHTTPException._set_default_attrs``; stringifying thse may trigger code that should not be executed; see https://github.com/Pylons/pyramid/issues/239 Closes #239 --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index afbc12747..e8fce9c8d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,14 @@ Documentation - Added a section entitled "Writing a Script" to the "Command-Line Pyramid" chapter. +Bug Fixes +--------- + +- Omit custom environ variables when rendering a custom exception template in + ``pyramid.httpexceptions.WSGIHTTPException._set_default_attrs``; + stringifying thse may trigger code that should not be executed; see + https://github.com/Pylons/pyramid/issues/239 + 1.1b3 (2011-07-15) ================== -- cgit v1.2.3 From f06ce6f0dad47bd9b804b17b04035252fdd7868e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 16 Jul 2011 20:05:35 -0400 Subject: add note about removing make_request --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index e8fce9c8d..fd10a7219 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,13 @@ Documentation - Added a section entitled "Writing a Script" to the "Command-Line Pyramid" chapter. +Backwards Incompatibilities +--------------------------- + +- We added the ``pyramid.scripting.make_request`` API too hastily in 1.1b3. + It has been removed. Sorry for any inconvenience. Use the + ``pyramid.request.Request.blank`` API instead. + Bug Fixes --------- -- cgit v1.2.3 From 95df4223bfd0306a9296214c30ca14dccdd8c6c4 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 16 Jul 2011 20:07:52 -0400 Subject: mention paster pshell using prepare --- CHANGES.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index fd10a7219..895713767 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,6 +14,15 @@ Backwards Incompatibilities It has been removed. Sorry for any inconvenience. Use the ``pyramid.request.Request.blank`` API instead. +Features +-------- + +- The ``paster pshell`` command now under the hood uses + ``pyramid.scripting.prepare``, which makes it possible to supply an + ``.ini`` file without naming the "right" section in the file that points at + the actual Pyramid application. Instead, you can generally just run + ``paster pshell development.ini`` and it will do mostly the right thing. + Bug Fixes --------- -- cgit v1.2.3 From 9c5b83710cd86ef4ddeae49a37518d869e504308 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 16 Jul 2011 20:09:05 -0400 Subject: mention paster pshell using bootstrap --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 895713767..5a709b332 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -18,7 +18,7 @@ Features -------- - The ``paster pshell`` command now under the hood uses - ``pyramid.scripting.prepare``, which makes it possible to supply an + ``pyramid.paster.bootstrap``, which makes it possible to supply an ``.ini`` file without naming the "right" section in the file that points at the actual Pyramid application. Instead, you can generally just run ``paster pshell development.ini`` and it will do mostly the right thing. -- cgit v1.2.3 From af056046970db9b1d3732f4c5978fcb3fb863d1f Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 16 Jul 2011 21:23:07 -0400 Subject: - Change paster pviews and paster proutes to use bootstrap. --- CHANGES.txt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 5a709b332..9edeb63c9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -17,11 +17,13 @@ Backwards Incompatibilities Features -------- -- The ``paster pshell`` command now under the hood uses - ``pyramid.paster.bootstrap``, which makes it possible to supply an - ``.ini`` file without naming the "right" section in the file that points at - the actual Pyramid application. Instead, you can generally just run - ``paster pshell development.ini`` and it will do mostly the right thing. +- The ``paster pshell``, ``paster pviews``, and ``paster proutes`` commands + each now under the hood uses ``pyramid.paster.bootstrap``, which makes it + possible to supply an ``.ini`` file without naming the "right" section in + the file that points at the actual Pyramid application. Instead, you can + generally just run ``paster {pshell|proutes|pviews} development.ini`` and + it will do mostly the right thing. + Bug Fixes --------- -- cgit v1.2.3 From 40c643e07e1a5eeb48e86070cd0ffbd998899669 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 18 Jul 2011 02:59:50 -0400 Subject: prep for 1.1b4 --- CHANGES.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 9edeb63c9..1b85d39be 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.1b4 (2011-07-18) +================== Documentation ------------- @@ -24,7 +24,6 @@ Features generally just run ``paster {pshell|proutes|pviews} development.ini`` and it will do mostly the right thing. - Bug Fixes --------- -- cgit v1.2.3 From ead3c7e169dbac62f97cbaffc15f3c40430b70ea Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 19 Jul 2011 08:26:05 -0400 Subject: - Fixed two typos in wiki2 (SQLA + URL Dispatch) tutorial. --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 1b85d39be..117204e11 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,11 @@ +Next release +============ + +Documentation +------------- + +- Fixed two typos in wiki2 (SQLA + URL Dispatch) tutorial. + 1.1b4 (2011-07-18) ================== -- cgit v1.2.3 From 8cb68208d42899b50025418812bb339f578d553f Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 20 Jul 2011 07:16:14 -0400 Subject: - Reordered chapters in narrative section for better new user friendliness. - Added more indexing markers to sections in documentation. --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 117204e11..09e6139cc 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,10 @@ Documentation - Fixed two typos in wiki2 (SQLA + URL Dispatch) tutorial. +- Reordered chapters in narrative section for better new user friendliness. + +- Added more indexing markers to sections in documentation. + 1.1b4 (2011-07-18) ================== -- cgit v1.2.3 From e7cb93e1c07fb59a523ff8e79732787a3f4ae213 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 21 Jul 2011 02:19:16 -0400 Subject: - Remove ``compat`` code that served only the purpose of providing backwards compatibility with Python 2.4. --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 09e6139cc..609f62bd3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,12 @@ Next release ============ +Internals +--------- + +- Remove ``compat`` code that served only the purpose of providing backwards + compatibility with Python 2.4. + Documentation ------------- -- cgit v1.2.3 From 73c0aee5571bbdd7273033eda3a798d5597a76af Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 21 Jul 2011 19:59:36 -0400 Subject: - Add a deprecation warning for non-API function ``pyramid.renderers.renderer_from_name`` which has seen use in the wild. - Add a ``clone`` method to ``pyramid.renderers.RendererHelper`` for use by the ``pyramid.view.view_config`` decorator. --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 609f62bd3..bb5828811 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,12 @@ Internals - Remove ``compat`` code that served only the purpose of providing backwards compatibility with Python 2.4. +- Add a deprecation warning for non-API function + ``pyramid.renderers.renderer_from_name`` which has seen use in the wild. + +- Add a ``clone`` method to ``pyramid.renderers.RendererHelper`` for use by + the ``pyramid.view.view_config`` decorator. + Documentation ------------- -- cgit v1.2.3 From aa2fe1b0a02ba4edde4d285ec0a5a6ec545b7fec Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 21 Jul 2011 22:02:37 -0400 Subject: - Added the ``pyramid.renderers.null_renderer`` object as an API. The null renderer is an object that can be used in advanced integration cases as input to the view configuration ``renderer=`` argument. When the null renderer is used as a view renderer argument, Pyramid avoids converting the view callable result into a Response object. This is useful if you want to reuse the view configuration and lookup machinery outside the context of its use by the Pyramid router. This feature was added for consumption by the ``pyramid_rpc`` package, which uses view configuration and lookup outside the context of a router in exactly this way. ``pyramid_rpc`` has been broken under 1.1 since 1.1b1; adding it allows us to make it work again. --- CHANGES.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index bb5828811..5e2fb2970 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,21 @@ Next release ============ +Features +-------- + +- Added the ``pyramid.renderers.null_renderer`` object as an API. The null + renderer is an object that can be used in advanced integration cases as + input to the view configuration ``renderer=`` argument. When the null + renderer is used as a view renderer argument, Pyramid avoids converting the + view callable result into a Response object. This is useful if you want to + reuse the view configuration and lookup machinery outside the context of + its use by the Pyramid router. This feature was added for consumption by + the ``pyramid_rpc`` package, which uses view configuration and lookup + outside the context of a router in exactly this way. ``pyramid_rpc`` has + been broken under 1.1 since 1.1b1; adding it allows us to make it work + again. + Internals --------- -- cgit v1.2.3 From 39e88a1f2903f840feeff77e572c7bf3efebb875 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 21 Jul 2011 23:08:31 -0400 Subject: - Change all scaffolding templates that point to docs.pylonsproject.org to use ``/projects/pyramid/current`` rather than ``/projects/pyramid/dev``. --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 5e2fb2970..912c198bb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -16,6 +16,9 @@ Features been broken under 1.1 since 1.1b1; adding it allows us to make it work again. +- Change all scaffolding templates that point to docs.pylonsproject.org to + use ``/projects/pyramid/current`` rather than ``/projects/pyramid/dev``. + Internals --------- -- cgit v1.2.3 From 8c03444dd5d80adaf65e30ebdabf1e6dde644965 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 21 Jul 2011 23:32:50 -0400 Subject: prep for 1.1; gather contributors --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 912c198bb..a2ad1f720 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.1 (2011-07-22) +================ Features -------- -- cgit v1.2.3 From 9a66aa09a8a773f67da59642a6642f1a3240c254 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 23 Jul 2011 13:40:24 -0400 Subject: - The ``pyramid.events.BeforeRender`` event now has an attribute named ``rendering_val``. This can be used to introspect the value returned by a view in a BeforeRender subscriber. --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index a2ad1f720..57ab76e46 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,13 @@ +Next release +============ + +Features +-------- + +- The ``pyramid.events.BeforeRender`` event now has an attribute named + ``rendering_val``. This can be used to introspect the value returned by a + view in a BeforeRender subscriber. + 1.1 (2011-07-22) ================ -- cgit v1.2.3 From b723792bfc43dc3d4446837c48d78c9258697e6d Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 23 Jul 2011 19:57:34 -0400 Subject: - New method: ``pyramid.request.Request.add_view_mapper``. A view wrapper is used to wrap the found view callable before it is called by Pyramid's router. This is a feature usually only used by framework extensions, to provide, for example, view timing support. A view wrapper factory must be a callable which accepts three arguments: ``view_callable``, ``request``, and ``exc``. It must return a view callable. The view callable returned by the factory must implement the ``context, request`` view callable calling convention. For example:: import time def wrapper_factory(view_callable, request, exc): def wrapper(context, request): start = time.time() result = view_callable(context, request) end = time.time() request.view_timing = end - start return result return wrapper The ``view_callable`` argument to the factory will be the view callable found by Pyramid via view lookup. The ``request`` argument to the factory will be the current request. The ``exc`` argument to the factory will be an Exception object if the found view is an exception view; it will be ``None`` otherwise. View wrappers only last for the duration of a single request. You can add such a factory for every request by using the ``pyramid.events.NewRequest`` subscriber:: from pyramid.events import subscriber, NewRequest @subscriber(NewRequest) def newrequest(event): event.request.add_view_wrapper(wrapper_factory) If more than one view wrapper is registered during a single request, a 'later' view wrapper factory will be called with the result of its directly former view wrapper factory as its ``view_callable`` argument; this chain will be returned to Pyramid as a single view callable. --- CHANGES.txt | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 57ab76e46..666b89b96 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,50 @@ Features ``rendering_val``. This can be used to introspect the value returned by a view in a BeforeRender subscriber. +- New method: ``pyramid.request.Request.add_view_mapper``. A view wrapper is + used to wrap the found view callable before it is called by Pyramid's + router. This is a feature usually only used by framework extensions, to + provide, for example, view timing support. + + A view wrapper factory must be a callable which accepts three arguments: + ``view_callable``, ``request``, and ``exc``. It must return a view + callable. The view callable returned by the factory must implement the + ``context, request`` view callable calling convention. For example:: + + import time + + def wrapper_factory(view_callable, request, exc): + def wrapper(context, request): + start = time.time() + result = view_callable(context, request) + end = time.time() + request.view_timing = end - start + return result + return wrapper + + The ``view_callable`` argument to the factory will be the view callable + found by Pyramid via view lookup. The ``request`` argument to the factory + will be the current request. The ``exc`` argument to the factory will be + an Exception object if the found view is an exception view; it will be + ``None`` otherwise. + + View wrappers only last for the duration of a single request. You can add + such a factory for every request by using the + ``pyramid.events.NewRequest`` subscriber:: + + from pyramid.events import subscriber, NewRequest + + @subscriber(NewRequest) + def newrequest(event): + event.request.add_view_wrapper(wrapper_factory) + + If more than one view wrapper is registered during a single request, + a 'later' view wrapper factory will be called with the result of its + directly former view wrapper factory as its ``view_callable`` + argument; this chain will be returned to Pyramid as a single view + callable. + + 1.1 (2011-07-22) ================ -- cgit v1.2.3 From ac77e365c8269953a5dde89157d7468529ee7432 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 23 Jul 2011 19:58:55 -0400 Subject: typo --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 666b89b96..3c232d880 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,8 +8,8 @@ Features ``rendering_val``. This can be used to introspect the value returned by a view in a BeforeRender subscriber. -- New method: ``pyramid.request.Request.add_view_mapper``. A view wrapper is - used to wrap the found view callable before it is called by Pyramid's +- New method: ``pyramid.request.Request.add_view_wrapper``. A view wrapper + is used to wrap the found view callable before it is called by Pyramid's router. This is a feature usually only used by framework extensions, to provide, for example, view timing support. -- cgit v1.2.3 From af2323bcb169653dd2d76d7c40909fd881041beb Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 24 Jul 2011 01:01:38 -0400 Subject: first cut --- CHANGES.txt | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 3c232d880..b1979347a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -51,6 +51,65 @@ Features argument; this chain will be returned to Pyramid as a single view callable. +- New configurator directive: + ``pyramid.config.Configurator.add_request_handler``. This directive adds + a request handler factory. + + A request handler factory is used to wrap the Pyramid router's primary + request handling function. This is a feature usually only used by + framework extensions, to provide, for example, view timing support and as + a convenient place to hang bookkeeping code that examines exceptions + before they are returned to the server. + + A request handler factory (passed as ``handler_factory``) must be a + callable which accepts two arguments: ``handler`` and ``registry``. + ``handler`` will be the request handler being wrapped. ``registry`` will + be the Pyramid application registry represented by this Configurator. A + request handler factory must return a request handler when it is called. + + A request handler accepts a request object and returns a response object. + + Here's an example of creating both a handler factory and a handler, and + registering the handler factory: + + .. code-block:: python + + import time + + def timing_handler_factory(handler, registry): + if registry.settings['do_timing']: + # if timing support is enabled, return a wrapper + def timing_handler(request): + start = time.time() + try: + response = handler(request) + finally: + end = time.time() + print: 'The request took %s seconds' % (end - start) + return response + return timing_handler + # if timing support is not enabled, return the original handler + return handler + + config.add_request_handler(timing_handler_factory, 'timing') + + The ``request`` argument to the handler will be the request created by + Pyramid's router when it receives a WSGI request. + + If more than one request handler factory is registered into a single + configuration, the request handlers will be chained together. The first + request handler factory added (in code execution order) will be called + with the default Pyramid request handler, the second handler factory added + will be called with the result of the first handler factory, ad + infinitum. The Pyramid router will use the outermost wrapper in this chain + (which is a bit like a WSGI middleware "pipeline") as its handler + function. + + The ``name`` argument to this function is required. The name is used as a + key for conflict detection. No two request handler factories may share + the same name in the same configuration (unless + automatic_conflict_resolution is able to resolve the conflict or + this is an autocommitting configurator). 1.1 (2011-07-22) ================ -- cgit v1.2.3 From 6434998267a4930fd9175df06b9a07d83937b71d Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 24 Jul 2011 01:05:56 -0400 Subject: back this feature out; we'll try a different approach --- CHANGES.txt | 44 -------------------------------------------- 1 file changed, 44 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 3c232d880..57ab76e46 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,50 +8,6 @@ Features ``rendering_val``. This can be used to introspect the value returned by a view in a BeforeRender subscriber. -- New method: ``pyramid.request.Request.add_view_wrapper``. A view wrapper - is used to wrap the found view callable before it is called by Pyramid's - router. This is a feature usually only used by framework extensions, to - provide, for example, view timing support. - - A view wrapper factory must be a callable which accepts three arguments: - ``view_callable``, ``request``, and ``exc``. It must return a view - callable. The view callable returned by the factory must implement the - ``context, request`` view callable calling convention. For example:: - - import time - - def wrapper_factory(view_callable, request, exc): - def wrapper(context, request): - start = time.time() - result = view_callable(context, request) - end = time.time() - request.view_timing = end - start - return result - return wrapper - - The ``view_callable`` argument to the factory will be the view callable - found by Pyramid via view lookup. The ``request`` argument to the factory - will be the current request. The ``exc`` argument to the factory will be - an Exception object if the found view is an exception view; it will be - ``None`` otherwise. - - View wrappers only last for the duration of a single request. You can add - such a factory for every request by using the - ``pyramid.events.NewRequest`` subscriber:: - - from pyramid.events import subscriber, NewRequest - - @subscriber(NewRequest) - def newrequest(event): - event.request.add_view_wrapper(wrapper_factory) - - If more than one view wrapper is registered during a single request, - a 'later' view wrapper factory will be called with the result of its - directly former view wrapper factory as its ``view_callable`` - argument; this chain will be returned to Pyramid as a single view - callable. - - 1.1 (2011-07-22) ================ -- cgit v1.2.3 From 3a80546633185b64390b7779bab459a7e58f22c4 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 24 Jul 2011 02:08:51 -0400 Subject: - The Pyramid debug logger now uses the standard logging configuration (usually set up by Paste as part of startup). This means that output from e.g. ``debug_notfound``, ``debug_authorization``, etc. will go to the normal logging channels. The logger name of the debug logger will be the package name of the *caller* of the Configurator's constructor. - If a string is passed as the ``debug_logger`` parameter to a Configurator, that string is considered to be the name of a global Python logger rather than a dotted name to an instance of a logger. --- CHANGES.txt | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index c9c95fd7f..e14d4629b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,7 +8,7 @@ Features ``rendering_val``. This can be used to introspect the value returned by a view in a BeforeRender subscriber. -- New configurator directive: +- New configurator directive:^ ``pyramid.config.Configurator.add_request_handler``. This directive adds a request handler factory. @@ -66,6 +66,19 @@ Features same name in the same configuration (unless automatic_conflict_resolution is able to resolve the conflict or this is an autocommitting configurator). +- The Pyramid debug logger now uses the standard logging configuration + (usually set up by Paste as part of startup). This means that output from + e.g. ``debug_notfound``, ``debug_authorization``, etc. will go to the + normal logging channels. The logger name of the debug logger will be the + package name of the *caller* of the Configurator's constructor. + +Backwards Incompatibilities +--------------------------- + +- If a string is passed as the ``debug_logger`` parameter to a Configurator, + that string is considered to be the name of a global Python logger rather + than a dotted name to an instance of a logger. + 1.1 (2011-07-22) ================ -- cgit v1.2.3 From f91e0c8bebe0d18c3e65850515b8b1cb7fdbd335 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 24 Jul 2011 02:09:43 -0400 Subject: stray hat --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index e14d4629b..2bc462008 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,7 +8,7 @@ Features ``rendering_val``. This can be used to introspect the value returned by a view in a BeforeRender subscriber. -- New configurator directive:^ +- New configurator directive: ``pyramid.config.Configurator.add_request_handler``. This directive adds a request handler factory. -- cgit v1.2.3 From 1f901ab75c55bafc9c233c3c9588cc1bd92d9d66 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 28 Jul 2011 17:06:29 -0400 Subject: add some edits to the docs for response_adapter decorator; fix renderings --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 2bc462008..5ca9e9379 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,10 @@ Next release Features -------- +- Added a decorator-based way to configure a response adapter: + ``pyramid.response.response_adapter``. This decorator has the same use as + ``pyramid.config.Configurator.add_response_adapter`` but it's declarative. + - The ``pyramid.events.BeforeRender`` event now has an attribute named ``rendering_val``. This can be used to introspect the value returned by a view in a BeforeRender subscriber. -- cgit v1.2.3 From ef6f6b8ce83288678db81cf528fbeb03db0b650e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 30 Jul 2011 04:33:42 -0400 Subject: note prefixes --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 5ca9e9379..1f6da0d8b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -76,6 +76,16 @@ Features normal logging channels. The logger name of the debug logger will be the package name of the *caller* of the Configurator's constructor. +Deprecations +------------ + +- All Pyramid-related deployment settings (e.g. ``debug_all``, + ``debug_notfound``) are now meant to be prefixed with the prefix + ``pyramid.``. For example: ``debug_all`` -> ``pyramid.debug_all``. The + old non-prefixed settings will continue to work indefinitely but supplying + them may print a deprecation warning. All scaffolds and tutorials have + been changed to use prefixed settings. + Backwards Incompatibilities --------------------------- -- cgit v1.2.3 From 95a3791409f4a936c47e7018e75f14fc3b701380 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 31 Jul 2011 03:57:06 -0400 Subject: - A new attribute is available on request objects: ``exc_info``. Its value will be ``None`` until an exception is caught by the Pyramid router, after which it will be the result of ``sys.exc_info()``. --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 1f6da0d8b..c94ecb800 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -76,6 +76,10 @@ Features normal logging channels. The logger name of the debug logger will be the package name of the *caller* of the Configurator's constructor. +- A new attribute is available on request objects: ``exc_info``. Its value + will be ``None`` until an exception is caught by the Pyramid router, after + which it will be the result of ``sys.exc_info()``. + Deprecations ------------ -- cgit v1.2.3 From 6b2a6210dcda54d81e6e827aed74379f579a2810 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 6 Aug 2011 19:41:40 -0400 Subject: improve changes docs --- CHANGES.txt | 86 +++++++++++++++++++++---------------------------------------- 1 file changed, 29 insertions(+), 57 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index c94ecb800..b6f33715e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -12,63 +12,19 @@ Features ``rendering_val``. This can be used to introspect the value returned by a view in a BeforeRender subscriber. -- New configurator directive: - ``pyramid.config.Configurator.add_request_handler``. This directive adds - a request handler factory. - - A request handler factory is used to wrap the Pyramid router's primary - request handling function. This is a feature may be used by framework - extensions, to provide, for example, view timing support and as a - convenient place to hang bookkeeping code that examines exceptions before - they are returned to the server. - - A request handler factory (passed as ``handler_factory``) must be a - callable which accepts two arguments: ``handler`` and ``registry``. - ``handler`` will be the request handler being wrapped. ``registry`` will - be the Pyramid application registry represented by this Configurator. A - request handler factory must return a request handler when it is called. - - A request handler accepts a request object and returns a response object. - - Here's an example of creating both a handler factory and a handler, and - registering the handler factory: - - .. code-block:: python - - import time - - def timing_handler_factory(handler, registry): - if registry.settings['do_timing']: - # if timing support is enabled, return a wrapper - def timing_handler(request): - start = time.time() - try: - response = handler(request) - finally: - end = time.time() - print: 'The request took %s seconds' % (end - start) - return response - return timing_handler - # if timing support is not enabled, return the original handler - return handler - - config.add_request_handler(timing_handler_factory, 'timing') - - The ``request`` argument to the handler will be the request created by - Pyramid's router when it receives a WSGI request. - - If more than one request handler factory is registered into a single - configuration, the request handlers will be chained together. The first - request handler factory added (in code execution order) will be called with - the default Pyramid request handler, the second handler factory added will - be called with the result of the first handler factory, ad infinitum. The - Pyramid router will use the outermost wrapper in this chain (which is a bit - like a WSGI middleware "pipeline") as its handler function. - - The ``name`` argument to this function is required. The name is used as a - key for conflict detection. No two request handler factories may share the - same name in the same configuration (unless automatic_conflict_resolution - is able to resolve the conflict or this is an autocommitting configurator). +- New configurator directive: ``pyramid.config.Configurator.add_tween``. + This directive adds a "tween". A "tween" is used to wrap the Pyramid + router's primary request handling function. This is a feature may be used + by Pyramid framework extensions, to provide, for example, view timing + support and as a convenient place to hang bookkeeping code. + + Tweens are further described in the narrative docs section in the Hooks + chapter, named "Registering Tweens". + +- New paster command ``paster ptweens``, which prints the current "tween" + configuration for an application. See the section entitled "Displaying + Tweens" in the Command-Line Pyramid chapter of the narrative documentation + for more info. - The Pyramid debug logger now uses the standard logging configuration (usually set up by Paste as part of startup). This means that output from @@ -80,6 +36,12 @@ Features will be ``None`` until an exception is caught by the Pyramid router, after which it will be the result of ``sys.exc_info()``. +Internal +-------- + +- The Pyramid "exception view" machinery is now implemented as a "tween" + (``pyramid.tweens.excview_tween_factory``). + Deprecations ------------ @@ -97,6 +59,16 @@ Backwards Incompatibilities that string is considered to be the name of a global Python logger rather than a dotted name to an instance of a logger. +Documentation +------------- + +- Added a new module to the API docs: ``pyramid.tweens``. + +- Added a "Registering Tweens" section to the "Hooks" narrative chapter. + +- Added a "Displaying Tweens" section to the "Command-Line Pyramid" narrative + chapter. + 1.1 (2011-07-22) ================ -- cgit v1.2.3 From 1e88dbb96c895f2978fb440221bec367d7ecdb0a Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 10 Aug 2011 00:34:13 -0400 Subject: add note about NO_PERMISSION_REQUIRED --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index b6f33715e..87b8ca53f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,12 @@ Next release Features -------- +- Added a ``pyramid.security.NO_PERMISSION_REQUIRED`` constant for use in + ``permission=`` statements to view configuration. This constant has a + value of the string ``__no_permission_required__``. This string value was + previously referred to in documentation; now the documentation uses the + constant. + - Added a decorator-based way to configure a response adapter: ``pyramid.response.response_adapter``. This decorator has the same use as ``pyramid.config.Configurator.add_response_adapter`` but it's declarative. -- cgit v1.2.3 From 1939d00839e805f44680512b7952f4c1aff32a7c Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 10 Aug 2011 14:30:00 -0400 Subject: - Fixed an issue with the default renderer not working at certain times. See https://github.com/Pylons/pyramid/issues/249 Closes #249. --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 87b8ca53f..208662150 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -75,6 +75,12 @@ Documentation - Added a "Displaying Tweens" section to the "Command-Line Pyramid" narrative chapter. +Bug Fixes +--------- + +- Fixed an issue with the default renderer not working at certain times. See + https://github.com/Pylons/pyramid/issues/249 + 1.1 (2011-07-22) ================ -- cgit v1.2.3 From 83bf91aed8495cc42023e276a0e811445f98407d Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 10 Aug 2011 21:24:14 -0400 Subject: - Added a ``route_prefix`` argument to the ``pyramid.config.Configurator.include`` method. This argument allows you to compose URL dispatch applications together. See the section entitled "Using a Route Prefix to Compose Applications" in the "URL Dispatch" narrative documentation chapter. - Added a section entitled "Using a Route Prefix to Compose Applications" to the "URL Dispatch" narrative documentation chapter. --- CHANGES.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 208662150..c64582e02 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,12 @@ Next release Features -------- +- Added a ``route_prefix`` argument to the + ``pyramid.config.Configurator.include`` method. This argument allows you + to compose URL dispatch applications together. See the section entitled + "Using a Route Prefix to Compose Applications" in the "URL Dispatch" + narrative documentation chapter. + - Added a ``pyramid.security.NO_PERMISSION_REQUIRED`` constant for use in ``permission=`` statements to view configuration. This constant has a value of the string ``__no_permission_required__``. This string value was @@ -65,9 +71,18 @@ Backwards Incompatibilities that string is considered to be the name of a global Python logger rather than a dotted name to an instance of a logger. +- The ``pyramid.config.Configurator.include`` method now accepts only a + single ``callable`` argument (a sequence of callables used to be + permitted). If you are passing more than one ``callable`` to + ``pyramid.config.Configurator.include``, it will break. You now must now + instead make a separate call to the method for each callable. + Documentation ------------- +- Added a section entitled "Using a Route Prefix to Compose Applications" to + the "URL Dispatch" narrative documentation chapter. + - Added a new module to the API docs: ``pyramid.tweens``. - Added a "Registering Tweens" section to the "Hooks" narrative chapter. -- cgit v1.2.3 From 47369747d8050faddd8b98f4cad9f5d0bb263130 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 12 Aug 2011 00:17:52 -0400 Subject: garden changes; fix docs rendering --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index c64582e02..65dcf11fa 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,10 @@ Next release Features -------- +- A new configuration setting named ``pyramid.includes`` is now available. + It is described in the "Environment Variables and ``.ini`` Files Settings" + narrative documentation chapter. + - Added a ``route_prefix`` argument to the ``pyramid.config.Configurator.include`` method. This argument allows you to compose URL dispatch applications together. See the section entitled @@ -90,6 +94,10 @@ Documentation - Added a "Displaying Tweens" section to the "Command-Line Pyramid" narrative chapter. +- Added documentation for the ``pyramid.tweens`` and ``pyramid.includes`` + configuration settings to the "Environment Variables and ``.ini`` Files + Settings" chapter. + Bug Fixes --------- -- cgit v1.2.3 From eef9724c7edcd68114c420bd8b274fecc11ffe1e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 12 Aug 2011 16:51:49 -0400 Subject: - Pyramid now relies on PasteScript >= 1.7.4. This version contains a feature important for allowing flexible logging configuration. --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 65dcf11fa..9f55bff35 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -98,6 +98,12 @@ Documentation configuration settings to the "Environment Variables and ``.ini`` Files Settings" chapter. +Dependency Changes +------------------ + +- Pyramid now relies on PasteScript >= 1.7.4. This version contains a + feature important for allowing flexible logging configuration. + Bug Fixes --------- -- cgit v1.2.3 From 391402e63c1257ede0069f220ed5a1cca1b94a9b Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 13 Aug 2011 01:00:39 -0400 Subject: - Projects created via a scaffold no longer depend on the ``WebError`` package at all; configuration in the ``production.ini`` file which used to require its ``error_catcher`` middleware has been removed. Configuring error catching / email sending is now the domain of the ``pyramid_exclog`` package (see https://docs.pylonsproject.org/projects/pyramid_exclog/dev/). --- CHANGES.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 9f55bff35..ec4c9767a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -104,6 +104,21 @@ Dependency Changes - Pyramid now relies on PasteScript >= 1.7.4. This version contains a feature important for allowing flexible logging configuration. +Scaffolds +---------- + +- All scaffolds now use the ``pyramid_tm`` package rather than the + ``repoze.tm2`` middleware to manage transaction management. + +- All scaffolds now use the ``pyramid_debugtoolbar`` package rather than the + ``WebError`` package to provide interactive debugging features. + +- Projects created via a scaffold no longer depend on the ``WebError`` + package at all; configuration in the ``production.ini`` file which used to + require its ``error_catcher`` middleware has been removed. Configuring + error catching / email sending is now the domain of the ``pyramid_exclog`` + package (see https://docs.pylonsproject.org/projects/pyramid_exclog/dev/). + Bug Fixes --------- -- cgit v1.2.3 From 1ae7af86d5d4898788ff64b46e887a06c47e69ea Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 13 Aug 2011 01:43:21 -0400 Subject: - Added a Logging chapter to the narrative docs (based on the Pylons logging docs, thanks Phil). --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index ec4c9767a..995e64e0c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -98,6 +98,9 @@ Documentation configuration settings to the "Environment Variables and ``.ini`` Files Settings" chapter. +- Added a Logging chapter to the narrative docs (based on the Pylons logging + docs, thanks Phil). + Dependency Changes ------------------ -- cgit v1.2.3 From 85093dba5ad0b606d8998e3708e4581901cf6dcc Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 13 Aug 2011 14:58:52 -0400 Subject: - WSGIHTTPException (HTTPFound, HTTPNotFound, etc) now has a new API named "prepare" which renders the body and content type when it is provided with a WSGI environ. Required for debug toolbar. - Once ``__call__`` or ``prepare`` is called on a WSGIHTTPException, the body will be set, and subsequent calls to ``__call__`` will always return the same body. Delete the body attribute to rerender the exception body. --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 995e64e0c..8a14a82de 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -58,6 +58,14 @@ Internal - The Pyramid "exception view" machinery is now implemented as a "tween" (``pyramid.tweens.excview_tween_factory``). +- WSGIHTTPException (HTTPFound, HTTPNotFound, etc) now has a new API named + "prepare" which renders the body and content type when it is provided with + a WSGI environ. Required for debug toolbar. + +- Once ``__call__`` or ``prepare`` is called on a WSGIHTTPException, the body + will be set, and subsequent calls to ``__call__`` will always return the + same body. Delete the body attribute to rerender the exception body. + Deprecations ------------ -- cgit v1.2.3 From 5c52daef7004a1e43a7c2fc25613e3d92c4b6b8e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 14 Aug 2011 00:53:53 -0400 Subject: - Added the ``pyramid.interfaces.IDict`` interface representing the methods of a dictionary, for documentation purposes only (IMultiDict and IBeforeRender inherit from it). - Previously the ``pyramid.events.BeforeRender`` event *wrapped* a dictionary (it addressed it as its ``_system`` attribute). Now it *is* a dictionary (it inherits from ``dict``), and it's the value that is passed to templates as a top-level dictionary. --- CHANGES.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 8a14a82de..19d586ac9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -66,6 +66,11 @@ Internal will be set, and subsequent calls to ``__call__`` will always return the same body. Delete the body attribute to rerender the exception body. +- Previously the ``pyramid.events.BeforeRender`` event *wrapped* a dictionary + (it addressed it as its ``_system`` attribute). Now it *is* a dictionary + (it inherits from ``dict``), and it's the value that is passed to templates + as a top-level dictionary. + Deprecations ------------ @@ -109,6 +114,10 @@ Documentation - Added a Logging chapter to the narrative docs (based on the Pylons logging docs, thanks Phil). +- Added the ``pyramid.interfaces.IDict`` interface representing the methods + of a dictionary, for documentation purposes only (IMultiDict and + IBeforeRender inherit from it). + Dependency Changes ------------------ -- cgit v1.2.3 From b5ffe38cec2ac4bf8aa222204f32be9cca881dec Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 14 Aug 2011 01:19:40 -0400 Subject: - The ``settings`` dictionary now raises a deprecation warning when you attempt to access its values via ``__getattr__`` instead of via ``__getitem__``. --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 19d586ac9..3432f3954 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -81,6 +81,10 @@ Deprecations them may print a deprecation warning. All scaffolds and tutorials have been changed to use prefixed settings. +- The ``settings`` dictionary now raises a deprecation warning when you + attempt to access its values via ``__getattr__`` instead of + via ``__getitem__``. + Backwards Incompatibilities --------------------------- -- cgit v1.2.3 From fb90f0166728af40142ed9a31039d26ca3f97c73 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 14 Aug 2011 04:58:34 -0400 Subject: - The ``route_url``, ``route_path``, ``resource_url``, ``static_url``, and ``current_route_url`` functions in the ``pyramid.url`` package now delegate to a method on the request they've been passed, instead of the other way around. The pyramid.request.Request object now inherits from a mixin named pyramid.url.URLMethodsMixin to make this possible, and all url/path generation logic is embedded in this mixin. - Narrative and API documentation which used the ``route_url``, ``route_path``, ``resource_url``, ``static_url``, and ``current_route_url`` functions in the ``pyramid.url`` package have now been changed to use eponymous methods of the request instead. --- CHANGES.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 3432f3954..f420b5299 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -71,6 +71,13 @@ Internal (it inherits from ``dict``), and it's the value that is passed to templates as a top-level dictionary. +- The ``route_url``, ``route_path``, ``resource_url``, ``static_url``, and + ``current_route_url`` functions in the ``pyramid.url`` package now delegate + to a method on the request they've been passed, instead of the other way + around. The pyramid.request.Request object now inherits from a mixin named + pyramid.url.URLMethodsMixin to make this possible, and all url/path + generation logic is embedded in this mixin. + Deprecations ------------ @@ -101,6 +108,11 @@ Backwards Incompatibilities Documentation ------------- +- Narrative and API documentation which used the ``route_url``, + ``route_path``, ``resource_url``, ``static_url``, and ``current_route_url`` + functions in the ``pyramid.url`` package have now been changed to use + eponymous methods of the request instead. + - Added a section entitled "Using a Route Prefix to Compose Applications" to the "URL Dispatch" narrative documentation chapter. -- cgit v1.2.3 From 42d31c1c6355a7d6c72393ca668d7d200a994da3 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 14 Aug 2011 14:26:10 -0400 Subject: - All tutorials now use - The ``route_url``, ``route_path``, ``resource_url``, ``static_url``, and ``current_route_url`` methods of the request rather than the function variants imported from ``pyramid.url``. --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index f420b5299..60dac0d2a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -134,6 +134,10 @@ Documentation of a dictionary, for documentation purposes only (IMultiDict and IBeforeRender inherit from it). +- All tutorials now use - The ``route_url``, ``route_path``, + ``resource_url``, ``static_url``, and ``current_route_url`` methods of the + request rather than the function variants imported from ``pyramid.url``. + Dependency Changes ------------------ -- cgit v1.2.3 From 27443561a9b837684af726b1aec2b5a98b22d494 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 14 Aug 2011 21:12:23 -0400 Subject: - ``pyramid.testing.DummyRequest`` now implements the ``add_finished_callback`` and ``add_response_callback`` methods. --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 60dac0d2a..c5cf8b248 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -52,6 +52,9 @@ Features will be ``None`` until an exception is caught by the Pyramid router, after which it will be the result of ``sys.exc_info()``. +- ``pyramid.testing.DummyRequest`` now implements the + ``add_finished_callback`` and ``add_response_callback`` methods. + Internal -------- -- cgit v1.2.3 From b2533554bb8816d412615595f4d7947f7779bf47 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 14 Aug 2011 22:44:22 -0400 Subject: - The ZODB wiki tutorial now uses the ``pyramid_zodbconn`` package rather than the ``repoze.zodbconn`` package to provide ZODB integration. - The ZODB scaffold now uses the ``pyramid_zodbconn`` package rather than the ``repoze.zodbconn`` package to provide ZODB integration. --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index c5cf8b248..1e7abc153 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -141,6 +141,9 @@ Documentation ``resource_url``, ``static_url``, and ``current_route_url`` methods of the request rather than the function variants imported from ``pyramid.url``. +- The ZODB wiki tutorial now uses the ``pyramid_zodbconn`` package rather + than the ``repoze.zodbconn`` package to provide ZODB integration. + Dependency Changes ------------------ @@ -153,6 +156,9 @@ Scaffolds - All scaffolds now use the ``pyramid_tm`` package rather than the ``repoze.tm2`` middleware to manage transaction management. +- The ZODB scaffold now uses the ``pyramid_zodbconn`` package rather than the + ``repoze.zodbconn`` package to provide ZODB integration. + - All scaffolds now use the ``pyramid_debugtoolbar`` package rather than the ``WebError`` package to provide interactive debugging features. -- cgit v1.2.3 From 1a42bd45ad6dd066078d6d4997d33208b1bd0c63 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 15 Aug 2011 03:01:51 -0400 Subject: - New methods of the ``pyramid.config.Configurator`` class: ``set_authentication_policy`` and ``set_authorization_policy``. These are meant to be consumed mostly by add-on authors. --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 1e7abc153..54a39b614 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -55,6 +55,10 @@ Features - ``pyramid.testing.DummyRequest`` now implements the ``add_finished_callback`` and ``add_response_callback`` methods. +- New methods of the ``pyramid.config.Configurator`` class: + ``set_authentication_policy`` and ``set_authorization_policy``. These are + meant to be consumed mostly by add-on authors. + Internal -------- -- cgit v1.2.3 From 5bf23fad3e0c9a949e8b01ab68991633af2d6df7 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 15 Aug 2011 06:05:39 -0400 Subject: - Refactor ``pyramid.config`` into a package. --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 54a39b614..a66637c28 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -85,6 +85,8 @@ Internal pyramid.url.URLMethodsMixin to make this possible, and all url/path generation logic is embedded in this mixin. +- Refactor ``pyramid.config`` into a package. + Deprecations ------------ -- cgit v1.2.3 From 5ec3308588f7a1a632752027bdeb2a1c06b3a783 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 16 Aug 2011 05:45:19 -0400 Subject: Garden. --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index a66637c28..bff399598 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,11 @@ Next release Features -------- +- The ``[pshell]`` section in an ini configuration file now treats a + ``setup`` key as a dotted name that points to a callable that is passed the + bootstrap environment. It can mutate the environment as necessary for + great justice. + - A new configuration setting named ``pyramid.includes`` is now available. It is described in the "Environment Variables and ``.ini`` Files Settings" narrative documentation chapter. -- cgit v1.2.3 From ea824f6f1ceaae4b922b6cff5320bb1c19cbacd5 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 18 Aug 2011 22:15:11 -0400 Subject: - Pyramid no longer eagerly commits some default configuration statements at Configurator construction time, which permits values passed in as constructor arguments (e.g. ``authentication_policy`` and ``authorization_policy``) to override the same settings obtained via an "include". --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index bff399598..dede9cf53 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -64,6 +64,14 @@ Features ``set_authentication_policy`` and ``set_authorization_policy``. These are meant to be consumed mostly by add-on authors. +- New Configurator method: ``set_root_factory``. + +- Pyramid no longer eagerly commits some default configuration statements at + Configurator construction time, which permits values passed in as + constructor arguments (e.g. ``authentication_policy`` and + ``authorization_policy``) to override the same settings obtained via an + "include". + Internal -------- -- cgit v1.2.3 From 66da9b2f683ace2c0fa3ce24a607d4239c760434 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 18 Aug 2011 22:50:04 -0400 Subject: coverage --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index dede9cf53..fb45ede81 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -100,6 +100,8 @@ Internal - Refactor ``pyramid.config`` into a package. +- Removed the ``_set_security_policies`` method of the Configurator. + Deprecations ------------ -- cgit v1.2.3 From 9f7f4f5219335e8bca108018c699ffdda8f40425 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 19 Aug 2011 01:34:45 -0400 Subject: - Better Mako rendering exceptions via ``pyramid.mako_templating.MakoRenderingException`` --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index fb45ede81..afcacd90b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -72,6 +72,9 @@ Features ``authorization_policy``) to override the same settings obtained via an "include". +- Better Mako rendering exceptions via + ``pyramid.mako_templating.MakoRenderingException`` + Internal -------- -- cgit v1.2.3 From 12cef0ee3526d7a024b9c328fd75e64565f02519 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 20 Aug 2011 11:34:16 -0400 Subject: - New request methods: ``current_route_url``, ``current_route_path``. - New function in ``pyramid.url``: ``current_route_path``. --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index afcacd90b..90945105f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -75,6 +75,10 @@ Features - Better Mako rendering exceptions via ``pyramid.mako_templating.MakoRenderingException`` +- New request methods: ``current_route_url``, ``current_route_path``. + +- New function in ``pyramid.url``: ``current_route_path``. + Internal -------- -- cgit v1.2.3 From 5c6963152fcc756a06d2aea80a4e85f1c9bef7ee Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 20 Aug 2011 12:06:19 -0400 Subject: add static_path function to url and static_path method to request --- CHANGES.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 90945105f..9b81ad526 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -75,9 +75,11 @@ Features - Better Mako rendering exceptions via ``pyramid.mako_templating.MakoRenderingException`` -- New request methods: ``current_route_url``, ``current_route_path``. +- New request methods: ``current_route_url``, ``current_route_path``, and + ``static_path``. -- New function in ``pyramid.url``: ``current_route_path``. +- New functions in ``pyramid.url``: ``current_route_path`` and + ``static_path``. Internal -------- -- cgit v1.2.3 From b8c79771a186f1032635fc640b3cecc2c9e281ad Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 20 Aug 2011 13:05:13 -0400 Subject: - The ``pyramid.request.Request.static_url`` API (and its brethren ``pyramid.request.Request.static_path``, ``pyramid.url.static_url``, and ``pyramid.url.static_path``) now accept an asbolute filename as a "path" argument. This will generate a URL to an asset as long as the filename is in a directory which was previously registered as a static view. Previously, trying to generate a URL to an asset using an absolute file path would raise a ValueError. --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 9b81ad526..2940a8228 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -81,6 +81,14 @@ Features - New functions in ``pyramid.url``: ``current_route_path`` and ``static_path``. +- The ``pyramid.request.Request.static_url`` API (and its brethren + ``pyramid.request.Request.static_path``, ``pyramid.url.static_url``, and + ``pyramid.url.static_path``) now accept an asbolute filename as a "path" + argument. This will generate a URL to an asset as long as the filename is + in a directory which was previously registered as a static view. + Previously, trying to generate a URL to an asset using an absolute file + path would raise a ValueError. + Internal -------- -- cgit v1.2.3 From 449287942782a24dbe31a60ca791d677fd0ba003 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 20 Aug 2011 16:45:03 -0400 Subject: - The ``RemoteUserAuthenticationPolicy ``, ``AuthTktAuthenticationPolicy``, and ``SessionAuthenticationPolicy`` constructors now accept an additional keyword argument named ``debug``. By default, this keyword argument is ``False``. When it is ``True``, debug information will be sent to the Pyramid debug logger (usually on stderr) when the ``authenticated_userid`` or ``effective_principals`` method is called on any of these policies. The output produced can be useful when trying to diagnose authentication-related problems. --- CHANGES.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 2940a8228..47f3dcde3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -89,6 +89,15 @@ Features Previously, trying to generate a URL to an asset using an absolute file path would raise a ValueError. +- The ``RemoteUserAuthenticationPolicy ``, ``AuthTktAuthenticationPolicy``, + and ``SessionAuthenticationPolicy`` constructors now accept an additional + keyword argument named ``debug``. By default, this keyword argument is + ``False``. When it is ``True``, debug information will be sent to the + Pyramid debug logger (usually on stderr) when the ``authenticated_userid`` + or ``effective_principals`` method is called on any of these policies. The + output produced can be useful when trying to diagnose + authentication-related problems. + Internal -------- -- cgit v1.2.3 From bd9947340e227e3d49b96354f9aef7fd82c5062d Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 22 Aug 2011 02:42:32 -0400 Subject: move 1.1 stuff to HISTORY --- CHANGES.txt | 831 ------------------------------------------------------------ 1 file changed, 831 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 47f3dcde3..655fb4956 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -221,834 +221,3 @@ Bug Fixes - Fixed an issue with the default renderer not working at certain times. See https://github.com/Pylons/pyramid/issues/249 -1.1 (2011-07-22) -================ - -Features --------- - -- Added the ``pyramid.renderers.null_renderer`` object as an API. The null - renderer is an object that can be used in advanced integration cases as - input to the view configuration ``renderer=`` argument. When the null - renderer is used as a view renderer argument, Pyramid avoids converting the - view callable result into a Response object. This is useful if you want to - reuse the view configuration and lookup machinery outside the context of - its use by the Pyramid router. This feature was added for consumption by - the ``pyramid_rpc`` package, which uses view configuration and lookup - outside the context of a router in exactly this way. ``pyramid_rpc`` has - been broken under 1.1 since 1.1b1; adding it allows us to make it work - again. - -- Change all scaffolding templates that point to docs.pylonsproject.org to - use ``/projects/pyramid/current`` rather than ``/projects/pyramid/dev``. - -Internals ---------- - -- Remove ``compat`` code that served only the purpose of providing backwards - compatibility with Python 2.4. - -- Add a deprecation warning for non-API function - ``pyramid.renderers.renderer_from_name`` which has seen use in the wild. - -- Add a ``clone`` method to ``pyramid.renderers.RendererHelper`` for use by - the ``pyramid.view.view_config`` decorator. - -Documentation -------------- - -- Fixed two typos in wiki2 (SQLA + URL Dispatch) tutorial. - -- Reordered chapters in narrative section for better new user friendliness. - -- Added more indexing markers to sections in documentation. - -1.1b4 (2011-07-18) -================== - -Documentation -------------- - -- Added a section entitled "Writing a Script" to the "Command-Line Pyramid" - chapter. - -Backwards Incompatibilities ---------------------------- - -- We added the ``pyramid.scripting.make_request`` API too hastily in 1.1b3. - It has been removed. Sorry for any inconvenience. Use the - ``pyramid.request.Request.blank`` API instead. - -Features --------- - -- The ``paster pshell``, ``paster pviews``, and ``paster proutes`` commands - each now under the hood uses ``pyramid.paster.bootstrap``, which makes it - possible to supply an ``.ini`` file without naming the "right" section in - the file that points at the actual Pyramid application. Instead, you can - generally just run ``paster {pshell|proutes|pviews} development.ini`` and - it will do mostly the right thing. - -Bug Fixes ---------- - -- Omit custom environ variables when rendering a custom exception template in - ``pyramid.httpexceptions.WSGIHTTPException._set_default_attrs``; - stringifying thse may trigger code that should not be executed; see - https://github.com/Pylons/pyramid/issues/239 - -1.1b3 (2011-07-15) -================== - -Features --------- - -- Fix corner case to ease semifunctional testing of views: create a new - rendererinfo to clear out old registry on a rescan. See - https://github.com/Pylons/pyramid/pull/234. - -- New API class: ``pyramid.static.static_view``. This supersedes the - deprecated ``pyramid.view.static`` class. ``pyramid.static.static_view`` - by default serves up documents as the result of the request's - ``path_info``, attribute rather than it's ``subpath`` attribute (the - inverse was true of ``pyramid.view.static``, and still is). - ``pyramid.static.static_view`` exposes a ``use_subpath`` flag for use when - you want the static view to behave like the older deprecated version. - -- A new API function ``pyramid.paster.bootstrap`` has been added to make - writing scripts that bootstrap a Pyramid environment easier, e.g.:: - - from pyramid.paster import bootstrap - info = bootstrap('/path/to/my/development.ini') - request = info['request'] - print request.route_url('myroute') - -- A new API function ``pyramid.scripting.prepare`` has been added. It is a - lower-level analogue of ``pyramid.paster.boostrap`` that accepts a request - and a registry instead of a config file argument, and is used for the same - purpose:: - - from pyramid.scripting import prepare - info = prepare(registry=myregistry) - request = info['request'] - print request.route_url('myroute') - -- A new API function ``pyramid.scripting.make_request`` has been added. The - resulting request will have a ``registry`` attribute. It is meant to be - used in conjunction with ``pyramid.scripting.prepare`` and/or - ``pyramid.paster.bootstrap`` (both of which accept a request as an - argument):: - - from pyramid.scripting import make_request - request = make_request('/') - -- New API attribute ``pyramid.config.global_registries`` is an iterable - object that contains references to every Pyramid registry loaded into the - current process via ``pyramid.config.Configurator.make_app``. It also has - a ``last`` attribute containing the last registry loaded. This is used by - the scripting machinery, and is available for introspection. - -Deprecations ------------- - -- The ``pyramid.view.static`` class has been deprecated in favor of the newer - ``pyramid.static.static_view`` class. A deprecation warning is raised when - it is used. You should replace it with a reference to - ``pyramid.static.static_view`` with the ``use_subpath=True`` argument. - -Bug Fixes ---------- - -- Without a mo-file loaded for the combination of domain/locale, - ``pyramid.i18n.Localizer.pluralize`` run using that domain/locale - combination raised an inscrutable "translations object has no attr - 'plural'" error. Now, instead it "works" (it uses a germanic pluralization - by default). It's nonsensical to try to pluralize something without - translations for that locale/domain available, but this behavior matches - the behavior of ``pyramid.i18n.Localizer.translate`` so it's at least - consistent; see https://github.com/Pylons/pyramid/issues/235. - -1.1b2 (2011-07-13) -================== - -Features --------- - -- New environment setting ``PYRAMID_PREVENT_HTTP_CACHE`` and new - configuration file value ``prevent_http_cache``. These are synomymous and - allow you to prevent HTTP cache headers from being set by Pyramid's - ``http_cache`` machinery globally in a process. see the "Influencing HTTP - Caching" section of the "View Configuration" narrative chapter and the - detailed documentation for this setting in the "Environment Variables and - Configuration Settings" narrative chapter. - -Behavior Changes ----------------- - -- Previously, If a ``BeforeRender`` event subscriber added a value via the - ``__setitem__`` or ``update`` methods of the event object with a key that - already existed in the renderer globals dictionary, a ``KeyError`` was - raised. With the deprecation of the "add_renderer_globals" feature of the - configurator, there was no way to override an existing value in the - renderer globals dictionary that already existed. Now, the event object - will overwrite an older value that is already in the globals dictionary - when its ``__setitem__`` or ``update`` is called (as well as the new - ``setdefault`` method), just like a plain old dictionary. As a result, for - maximum interoperability with other third-party subscribers, if you write - an event subscriber meant to be used as a BeforeRender subscriber, your - subscriber code will now need to (using ``.get`` or ``__contains__`` of the - event object) ensure no value already exists in the renderer globals - dictionary before setting an overriding value. - -Bug Fixes ---------- - -- The ``Configurator.add_route`` method allowed two routes with the same - route to be added without an intermediate ``config.commit()``. If you now - receive a ``ConfigurationError`` at startup time that appears to be - ``add_route`` related, you'll need to either a) ensure that all of your - route names are unique or b) call ``config.commit()`` before adding a - second route with the name of a previously added name or c) use a - Configurator that works in ``autocommit`` mode. - -- The ``pyramid_routesalchemy`` and ``pyramid_alchemy`` scaffolds - inappropriately used ``DBSession.rollback()`` instead of - ``transaction.abort()`` in one place. - -- We now clear ``request.response`` before we invoke an exception view; an - exception view will be working with a request.response that has not been - touched by any code prior to the exception. - -- Views associated with routes with spaces in the route name may not have - been looked up correctly when using Pyramid with ``zope.interface`` 3.6.4 - and better. See https://github.com/Pylons/pyramid/issues/232. - -Documentation -------------- - -- Wiki2 (SQLAlchemy + URL Dispatch) tutorial ``models.initialize_sql`` didn't - match the ``pyramid_routesalchemy`` scaffold function of the same name; it - didn't get synchronized when it was changed in the scaffold. - -- New documentation section in View Configuration narrative chapter: - "Influencing HTTP Caching". - -1.1b1 (2011-07-10) -================== - -Features --------- - -- It is now possible to invoke ``paster pshell`` even if the paste ini file - section name pointed to in its argument is not actually a Pyramid WSGI - application. The shell will work in a degraded mode, and will warn the - user. See "The Interactive Shell" in the "Creating a Pyramid Project" - narrative documentation section. - -- ``paster pshell`` now offers more built-in global variables by default - (including ``app`` and ``settings``). See "The Interactive Shell" in the - "Creating a Pyramid Project" narrative documentation section. - -- It is now possible to add a ``[pshell]`` section to your application's .ini - configuration file, which influences the global names available to a pshell - session. See "Extending the Shell" in the "Creating a Pyramid Project" - narrative documentation chapter. - -- The ``config.scan`` method has grown a ``**kw`` argument. ``kw`` argument - represents a set of keyword arguments to pass to the Venusian ``Scanner`` - object created by Pyramid. (See the Venusian documentation for more - information about ``Scanner``). - -- New request property: ``json_body``. This property will return the - JSON-decoded variant of the request body. If the request body is not - well-formed JSON, this property will raise an exception. - -- A new value ``http_cache`` can be used as a view configuration - parameter. - - When you supply an ``http_cache`` value to a view configuration, the - ``Expires`` and ``Cache-Control`` headers of a response generated by the - associated view callable are modified. The value for ``http_cache`` may be - one of the following: - - - A nonzero integer. If it's a nonzero integer, it's treated as a number - of seconds. This number of seconds will be used to compute the - ``Expires`` header and the ``Cache-Control: max-age`` parameter of - responses to requests which call this view. For example: - ``http_cache=3600`` instructs the requesting browser to 'cache this - response for an hour, please'. - - - A ``datetime.timedelta`` instance. If it's a ``datetime.timedelta`` - instance, it will be converted into a number of seconds, and that number - of seconds will be used to compute the ``Expires`` header and the - ``Cache-Control: max-age`` parameter of responses to requests which call - this view. For example: ``http_cache=datetime.timedelta(days=1)`` - instructs the requesting browser to 'cache this response for a day, - please'. - - - Zero (``0``). If the value is zero, the ``Cache-Control`` and - ``Expires`` headers present in all responses from this view will be - composed such that client browser cache (and any intermediate caches) are - instructed to never cache the response. - - - A two-tuple. If it's a two tuple (e.g. ``http_cache=(1, - {'public':True})``), the first value in the tuple may be a nonzero - integer or a ``datetime.timedelta`` instance; in either case this value - will be used as the number of seconds to cache the response. The second - value in the tuple must be a dictionary. The values present in the - dictionary will be used as input to the ``Cache-Control`` response - header. For example: ``http_cache=(3600, {'public':True})`` means 'cache - for an hour, and add ``public`` to the Cache-Control header of the - response'. All keys and values supported by the - ``webob.cachecontrol.CacheControl`` interface may be added to the - dictionary. Supplying ``{'public':True}`` is equivalent to calling - ``response.cache_control.public = True``. - - Providing a non-tuple value as ``http_cache`` is equivalent to calling - ``response.cache_expires(value)`` within your view's body. - - Providing a two-tuple value as ``http_cache`` is equivalent to calling - ``response.cache_expires(value[0], **value[1])`` within your view's body. - - If you wish to avoid influencing, the ``Expires`` header, and instead wish - to only influence ``Cache-Control`` headers, pass a tuple as ``http_cache`` - with the first element of ``None``, e.g.: ``(None, {'public':True})``. - -Bug Fixes ---------- - -- Framework wrappers of the original view (such as http_cached and so on) - relied on being able to trust that the response they were receiving was an - IResponse. It wasn't always, because the response was resolved by the - router instead of early in the view wrapping process. This has been fixed. - -Documentation -------------- - -- Added a section in the "Webob" chapter named "Dealing With A JSON-Encoded - Request Body" (usage of ``request.json_body``). - -Behavior Changes ----------------- - -- The ``paster pshell``, ``paster proutes``, and ``paster pviews`` commands - now take a single argument in the form ``/path/to/config.ini#sectionname`` - rather than the previous 2-argument spelling ``/path/to/config.ini - sectionname``. ``#sectionname`` may be omitted, in which case ``#main`` is - assumed. - -1.1a4 (2011-07-01) -================== - -Bug Fixes ---------- - -- ``pyramid.testing.DummyRequest`` now raises deprecation warnings when - attributes deprecated for ``pyramid.request.Request`` are accessed (like - ``response_content_type``). This is for the benefit of folks running unit - tests which use DummyRequest instead of a "real" request, so they know - things are deprecated without necessarily needing a functional test suite. - -- The ``pyramid.events.subscriber`` directive behaved contrary to the - documentation when passed more than one interface object to its - constructor. For example, when the following listener was registered:: - - @subscriber(IFoo, IBar) - def expects_ifoo_events_and_ibar_events(event): - print event - - The Events chapter docs claimed that the listener would be registered and - listening for both ``IFoo`` and ``IBar`` events. Instead, it registered an - "object event" subscriber which would only be called if an IObjectEvent was - emitted where the object interface was ``IFoo`` and the event interface was - ``IBar``. - - The behavior now matches the documentation. If you were relying on the - buggy behavior of the 1.0 ``subscriber`` directive in order to register an - object event subscriber, you must now pass a sequence to indicate you'd - like to register a subscriber for an object event. e.g.:: - - @subscriber([IFoo, IBar]) - def expects_object_event(object, event): - print object, event - -Features --------- - -- Add JSONP renderer (see "JSONP renderer" in the Renderers chapter of the - documentation). - -Deprecations ------------- - -- Deprecated the ``set_renderer_globals_factory`` method of the Configurator - and the ``renderer_globals`` Configurator constructor parameter. - -Documentation -------------- - -- The Wiki and Wiki2 tutorial "Tests" chapters each had two bugs: neither did - told the user to depend on WebTest, and 2 tests failed in each as the - result of changes to Pyramid itself. These issues have been fixed. - -- Move 1.0.X CHANGES.txt entries to HISTORY.txt. - -1.1a3 (2011-06-26) -================== - -Features --------- - -- Added ``mako.preprocessor`` config file parameter; allows for a Mako - preprocessor to be specified as a Python callable or Python dotted name. - See https://github.com/Pylons/pyramid/pull/183 for rationale. - -Bug fixes ---------- - -- Pyramid would raise an AttributeError in the Configurator when attempting - to set a ``__text__`` attribute on a custom predicate that was actually a - classmethod. See https://github.com/Pylons/pyramid/pull/217 . - -- Accessing or setting deprecated response_* attrs on request - (e.g. ``response_content_type``) now issues a deprecation warning at access - time rather than at rendering time. - -1.1a2 (2011-06-22) -================== - -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']``. - -1.1a1 (2011-06-20) -================== - -Documentation -------------- - -- The term "template" used to refer to both "paster templates" and "rendered - templates" (templates created by a rendering engine. i.e. Mako, Chameleon, - Jinja, etc.). "Paster templates" will now be refered to as "scaffolds", - whereas the name for "rendered templates" will remain as "templates." - -- The ``wiki`` (ZODB+Traversal) tutorial was updated slightly. - -- The ``wiki2`` (SQLA+URL Dispatch) tutorial was updated slightly. - -- Make ``pyramid.interfaces.IAuthenticationPolicy`` and - ``pyramid.interfaces.IAuthorizationPolicy`` public interfaces, and refer to - them within the ``pyramid.authentication`` and ``pyramid.authorization`` - API docs. - -- Render the function definitions for each exposed interface in - ``pyramid.interfaces``. - -- Add missing docs reference to - ``pyramid.config.Configurator.set_view_mapper`` and refer to it within - Hooks chapter section named "Using a View Mapper". - -- Added section to the "Environment Variables and ``.ini`` File Settings" - chapter in the narrative documentation section entitled "Adding a Custom - Setting". - -- Added documentation for a "multidict" (e.g. the API of ``request.POST``) as - interface API documentation. - -- Added a section to the "URL Dispatch" narrative chapter regarding the new - "static" route feature. - -- Added "What's New in Pyramid 1.1" to HTML rendering of documentation. - -- Added API docs for ``pyramid.authentication.SessionAuthenticationPolicy``. - -- Added API docs for ``pyramid.httpexceptions.exception_response``. - -- Added "HTTP Exceptions" section to Views narrative chapter including a - description of ``pyramid.httpexceptions.exception_response``. - -Features --------- - -- Add support for language fallbacks: when trying to translate for a - specific territory (such as ``en_GB``) fall back to translations - for the language (ie ``en``). This brings the translation behaviour in line - with GNU gettext and fixes partially translated texts when using C - extensions. - -- New authentication policy: - ``pyramid.authentication.SessionAuthenticationPolicy``, which uses a session - to store credentials. - -- Accessing the ``response`` attribute of a ``pyramid.request.Request`` - object (e.g. ``request.response`` within a view) now produces a new - ``pyramid.response.Response`` object. This feature is meant to be used - mainly when a view configured with a renderer needs to set response - attributes: all renderers will use the Response object implied by - ``request.response`` as the response object returned to the router. - - ``request.response`` can also be used by code in a view that does not use a - renderer, however the response object that is produced by - ``request.response`` must be returned when a renderer is not in play (it is - not a "global" response). - -- Integers and longs passed as ``elements`` to ``pyramid.url.resource_url`` - or ``pyramid.request.Request.resource_url`` e.g. ``resource_url(context, - request, 1, 2)`` (``1`` and ``2`` are the ``elements``) will now be - converted implicitly to strings in the result. Previously passing integers - or longs as elements would cause a TypeError. - -- ``pyramid_alchemy`` paster template now uses ``query.get`` rather than - ``query.filter_by`` to take better advantage of identity map caching. - -- ``pyramid_alchemy`` paster template now has unit tests. - -- Added ``pyramid.i18n.make_localizer`` API (broken out from - ``get_localizer`` guts). - -- An exception raised by a NewRequest event subscriber can now be caught by - an exception view. - -- It is now possible to get information about why Pyramid raised a Forbidden - exception from within an exception view. The ``ACLDenied`` object returned - by the ``permits`` method of each stock authorization policy - (``pyramid.interfaces.IAuthorizationPolicy.permits``) is now attached to - the Forbidden exception as its ``result`` attribute. Therefore, if you've - created a Forbidden exception view, you can see the ACE, ACL, permission, - and principals involved in the request as - eg. ``context.result.permission``, ``context.result.acl``, etc within the - logic of the Forbidden exception view. - -- Don't explicitly prevent the ``timeout`` from being lower than the - ``reissue_time`` when setting up an ``AuthTktAuthenticationPolicy`` - (previously such a configuration would raise a ``ValueError``, now it's - allowed, although typically nonsensical). Allowing the nonsensical - configuration made the code more understandable and required fewer tests. - -- A new paster command named ``paster pviews`` was added. This command - prints a summary of potentially matching views for a given path. See the - section entitled "Displaying Matching Views for a Given URL" in the "View - Configuration" chapter of the narrative documentation for more information. - -- The ``add_route`` method of the Configurator now accepts a ``static`` - argument. If this argument is ``True``, the added route will never be - considered for matching when a request is handled. Instead, it will only - be useful for URL generation via ``route_url`` and ``route_path``. See the - section entitled "Static Routes" in the URL Dispatch narrative chapter for - more information. - -- A default exception view for the context - ``pyramid.interfaces.IExceptionResponse`` is now registered by default. - This means that an instance of any exception response class imported from - ``pyramid.httpexceptions`` (such as ``HTTPFound``) can now be raised from - within view code; when raised, this exception view will render the - exception to a response. - -- A function named ``pyramid.httpexceptions.exception_response`` is a - shortcut that can be used to create HTTP exception response objects using - an HTTP integer status code. - -- The Configurator now accepts an additional keyword argument named - ``exceptionresponse_view``. By default, this argument is populated with a - default exception view function that will be used when a response is raised - as an exception. When ``None`` is passed for this value, an exception view - for responses will not be registered. Passing ``None`` returns the - behavior of raising an HTTP exception to that of Pyramid 1.0 (the exception - will propagate to middleware and to the WSGI server). - -- The ``pyramid.request.Request`` class now has a ``ResponseClass`` interface - which points at ``pyramid.response.Response``. - -- The ``pyramid.response.Response`` class now has a ``RequestClass`` - interface which points at ``pyramid.request.Request``. - -- It is now possible to return an arbitrary object from a Pyramid view - callable even if a renderer is not used, as long as a suitable adapter to - ``pyramid.interfaces.IResponse`` is registered for the type of the returned - object by using the new - ``pyramid.config.Configurator.add_response_adapter`` API. See the section - in the Hooks chapter of the documentation entitled "Changing How Pyramid - Treats View Responses". - -- The Pyramid router will now, by default, call the ``__call__`` method of - WebOb response objects when returning a WSGI response. This means that, - among other things, the ``conditional_response`` feature of WebOb response - objects will now behave properly. - -- New method named ``pyramid.request.Request.is_response``. This method - should be used instead of the ``pyramid.view.is_response`` function, which - has been deprecated. - -Bug Fixes ---------- - -- URL pattern markers used in URL dispatch are permitted to specify a custom - regex. For example, the pattern ``/{foo:\d+}`` means to match ``/12345`` - (foo==12345 in the match dictionary) but not ``/abc``. However, custom - regexes in a pattern marker which used squiggly brackets did not work. For - example, ``/{foo:\d{4}}`` would fail to match ``/1234`` and - ``/{foo:\d{1,2}}`` would fail to match ``/1`` or ``/11``. One level of - inner squiggly brackets is now recognized so that the prior two patterns - given as examples now work. See also - https://github.com/Pylons/pyramid/issues/#issue/123. - -- Don't send port numbers along with domain information in cookies set by - AuthTktCookieHelper (see https://github.com/Pylons/pyramid/issues/131). - -- ``pyramid.url.route_path`` (and the shortcut - ``pyramid.request.Request.route_url`` method) now include the WSGI - SCRIPT_NAME at the front of the path if it is not empty (see - https://github.com/Pylons/pyramid/issues/135). - -- ``pyramid.testing.DummyRequest`` now has a ``script_name`` attribute (the - empty string). - -- Don't quote ``:@&+$,`` symbols in ``*elements`` passed to - ``pyramid.url.route_url`` or ``pyramid.url.resource_url`` (see - https://github.com/Pylons/pyramid/issues#issue/141). - -- Include SCRIPT_NAME in redirects issued by - ``pyramid.view.append_slash_notfound_view`` (see - https://github.com/Pylons/pyramid/issues#issue/149). - -- Static views registered with ``config.add_static_view`` which also included - a ``permission`` keyword argument would not work as expected, because - ``add_static_view`` also registered a route factory internally. Because a - route factory was registered internally, the context checked by the Pyramid - permission machinery never had an ACL. ``add_static_view`` no longer - registers a route with a factory, so the default root factory will be used. - -- ``config.add_static_view`` now passes extra keyword arguments it receives - to ``config.add_route`` (calling add_static_view is mostly logically - equivalent to adding a view of the type ``pyramid.static.static_view`` - hooked up to a route with a subpath). This makes it possible to pass e.g., - ``factory=`` to ``add_static_view`` to protect a particular static view - with a custom ACL. - -- ``testing.DummyRequest`` used the wrong registry (the global registry) as - ``self.registry`` if a dummy request was created *before* ``testing.setUp`` - was executed (``testing.setUp`` pushes a local registry onto the - threadlocal stack). Fixed by implementing ``registry`` as a property for - DummyRequest instead of eagerly assigning an attribute. - See also https://github.com/Pylons/pyramid/issues/165 - -- When visiting a URL that represented a static view which resolved to a - subdirectory, the ``index.html`` of that subdirectory would not be served - properly. Instead, a redirect to ``/subdir`` would be issued. This has - been fixed, and now visiting a subdirectory that contains an ``index.html`` - within a static view returns the index.html properly. See also - https://github.com/Pylons/pyramid/issues/67. - -- Redirects issued by a static view did not take into account any existing - ``SCRIPT_NAME`` (such as one set by a url mapping composite). Now they do. - -- The ``pyramid.wsgi.wsgiapp2`` decorator did not take into account the - ``SCRIPT_NAME`` in the origin request. - -- The ``pyramid.wsgi.wsgiapp2`` decorator effectively only worked when it - decorated a view found via traversal; it ignored the ``PATH_INFO`` that was - part of a url-dispatch-matched view. - -Deprecations ------------- - -- Deprecated all assignments to ``request.response_*`` attributes (for - example ``request.response_content_type = 'foo'`` is now deprecated). - Assignments and mutations of assignable request attributes that were - considered by the framework for response influence are now deprecated: - ``response_content_type``, ``response_headerlist``, ``response_status``, - ``response_charset``, and ``response_cache_for``. Instead of assigning - these to the request object for later detection by the rendering machinery, - users should use the appropriate API of the Response object created by - accessing ``request.response`` (e.g. code which does - ``request.response_content_type = 'abc'`` should be changed to - ``request.response.content_type = 'abc'``). - -- Passing view-related parameters to - ``pyramid.config.Configurator.add_route`` is now deprecated. Previously, a - view was permitted to be connected to a route using a set of ``view*`` - parameters passed to the ``add_route`` method of the Configurator. This - was a shorthand which replaced the need to perform a subsequent call to - ``add_view``. For example, it was valid (and often recommended) to do:: - - config.add_route('home', '/', view='mypackage.views.myview', - view_renderer='some/renderer.pt') - - Passing ``view*`` arguments to ``add_route`` is now deprecated in favor of - connecting a view to a predefined route via ``Configurator.add_view`` using - the route's ``route_name`` parameter. As a result, the above example - should now be spelled:: - - config.add_route('home', '/') - config.add_view('mypackage.views.myview', route_name='home') - renderer='some/renderer.pt') - - This deprecation was done to reduce confusion observed in IRC, as well as - to (eventually) reduce documentation burden (see also - https://github.com/Pylons/pyramid/issues/164). A deprecation warning is - now issued when any view-related parameter is passed to - ``Configurator.add_route``. - -- Passing an ``environ`` dictionary to the ``__call__`` method of a - "traverser" (e.g. an object that implements - ``pyramid.interfaces.ITraverser`` such as an instance of - ``pyramid.traversal.ResourceTreeTraverser``) as its ``request`` argument - now causes a deprecation warning to be emitted. Consumer code should pass a - ``request`` object instead. The fact that passing an environ dict is - permitted has been documentation-deprecated since ``repoze.bfg`` 1.1, and - this capability will be removed entirely in a future version. - -- The following (undocumented, dictionary-like) methods of the - ``pyramid.request.Request`` object have been deprecated: ``__contains__``, - ``__delitem__``, ``__getitem__``, ``__iter__``, ``__setitem__``, ``get``, - ``has_key``, ``items``, ``iteritems``, ``itervalues``, ``keys``, ``pop``, - ``popitem``, ``setdefault``, ``update``, and ``values``. Usage of any of - these methods will cause a deprecation warning to be emitted. These - methods were added for internal compatibility in ``repoze.bfg`` 1.1 (code - that currently expects a request object expected an environ object in BFG - 1.0 and before). In a future version, these methods will be removed - entirely. - -- Deprecated ``pyramid.view.is_response`` function in favor of (newly-added) - ``pyramid.request.Request.is_response`` method. Determining if an object - is truly a valid response object now requires access to the registry, which - is only easily available as a request attribute. The - ``pyramid.view.is_response`` function will still work until it is removed, - but now may return an incorrect answer under some (very uncommon) - circumstances. - -Behavior Changes ----------------- - -- The default Mako renderer is now configured to escape all HTML in - expression tags. This is intended to help prevent XSS attacks caused by - rendering unsanitized input from users. To revert this behavior in user's - templates, they need to filter the expression through the 'n' filter. - For example, ${ myhtml | n }. - See https://github.com/Pylons/pyramid/issues/193. - -- A custom request factory is now required to return a request object that - has a ``response`` attribute (or "reified"/lazy property) if they the - request is meant to be used in a view that uses a renderer. This - ``response`` attribute should be an instance of the class - ``pyramid.response.Response``. - -- The JSON and string renderer factories now assign to - ``request.response.content_type`` rather than - ``request.response_content_type``. - -- Each built-in renderer factory now determines whether it should change the - content type of the response by comparing the response's content type - against the response's default content type; if the content type is the - default content type (usually ``text/html``), the renderer changes the - content type (to ``application/json`` or ``text/plain`` for JSON and string - renderers respectively). - -- The ``pyramid.wsgi.wsgiapp2`` now uses a slightly different method of - figuring out how to "fix" ``SCRIPT_NAME`` and ``PATH_INFO`` for the - downstream application. As a result, those values may differ slightly from - the perspective of the downstream application (for example, ``SCRIPT_NAME`` - will now never possess a trailing slash). - -- Previously, ``pyramid.request.Request`` inherited from - ``webob.request.Request`` and implemented ``__getattr__``, ``__setattr__`` - and ``__delattr__`` itself in order to overidde "adhoc attr" WebOb behavior - where attributes of the request are stored in the environ. Now, - ``pyramid.request.Request`` object inherits from (the more recent) - ``webob.request.BaseRequest`` instead of ``webob.request.Request``, which - provides the same behavior. ``pyramid.request.Request`` no longer - implements its own ``__getattr__``, ``__setattr__`` or ``__delattr__`` as a - result. - -- ``pyramid.response.Response`` is now a *subclass* of - ``webob.response.Response`` (in order to directly implement the - ``pyramid.interfaces.IResponse`` interface). - -- The "exception response" objects importable from ``pyramid.httpexceptions`` - (e.g. ``HTTPNotFound``) are no longer just import aliases for classes that - actually live in ``webob.exc``. Instead, we've defined our own exception - classes within the module that mirror and emulate the ``webob.exc`` - exception response objects almost entirely. See the "Design Defense" doc - section named "Pyramid Uses its Own HTTP Exception Classes" for more - information. - -Backwards Incompatibilities ---------------------------- - -- Pyramid no longer supports Python 2.4. Python 2.5 or better is required to - run Pyramid 1.1+. - -- The Pyramid router now, by default, expects response objects returned from - view callables to implement the ``pyramid.interfaces.IResponse`` interface. - Unlike the Pyramid 1.0 version of this interface, objects which implement - IResponse now must define a ``__call__`` method that accepts ``environ`` - and ``start_response``, and which returns an ``app_iter`` iterable, among - other things. Previously, it was possible to return any object which had - the three WebOb ``app_iter``, ``headerlist``, and ``status`` attributes as - a response, so this is a backwards incompatibility. It is possible to get - backwards compatibility back by registering an adapter to IResponse from - the type of object you're now returning from view callables. See the - section in the Hooks chapter of the documentation entitled "Changing How - Pyramid Treats View Responses". - -- The ``pyramid.interfaces.IResponse`` interface is now much more extensive. - Previously it defined only ``app_iter``, ``status`` and ``headerlist``; now - it is basically intended to directly mirror the ``webob.Response`` API, - which has many methods and attributes. - -- The ``pyramid.httpexceptions`` classes named ``HTTPFound``, - ``HTTPMultipleChoices``, ``HTTPMovedPermanently``, ``HTTPSeeOther``, - ``HTTPUseProxy``, and ``HTTPTemporaryRedirect`` now accept ``location`` as - their first positional argument rather than ``detail``. This means that - you can do, e.g. ``return pyramid.httpexceptions.HTTPFound('http://foo')`` - rather than ``return - pyramid.httpexceptions.HTTPFound(location='http//foo')`` (the latter will - of course continue to work). - -Dependencies ------------- - -- Pyramid now depends on WebOb >= 1.0.2 as tests depend on the bugfix in that - release: "Fix handling of WSGI environs with missing ``SCRIPT_NAME``". - (Note that in reality, everyone should probably be using 1.0.4 or better - though, as WebOb 1.0.2 and 1.0.3 were effectively brownbag releases.) - -- cgit v1.2.3 From 53d9d4036cee3fa3ecacc44fbd9c7b67ed9d3f13 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 22 Aug 2011 03:28:53 -0400 Subject: - Moved the ``StaticURLInfo`` class from ``pyramid.static`` to ``pyramid.config.views``. --- CHANGES.txt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 655fb4956..0a015aa0a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -128,6 +128,9 @@ Internal - Removed the ``_set_security_policies`` method of the Configurator. +- Moved the ``StaticURLInfo`` class from ``pyramid.static`` to + ``pyramid.config.views``. + Deprecations ------------ @@ -135,8 +138,8 @@ Deprecations ``debug_notfound``) are now meant to be prefixed with the prefix ``pyramid.``. For example: ``debug_all`` -> ``pyramid.debug_all``. The old non-prefixed settings will continue to work indefinitely but supplying - them may print a deprecation warning. All scaffolds and tutorials have - been changed to use prefixed settings. + them may eventually print a deprecation warning. All scaffolds and + tutorials have been changed to use prefixed settings. - The ``settings`` dictionary now raises a deprecation warning when you attempt to access its values via ``__getattr__`` instead of @@ -153,7 +156,8 @@ Backwards Incompatibilities single ``callable`` argument (a sequence of callables used to be permitted). If you are passing more than one ``callable`` to ``pyramid.config.Configurator.include``, it will break. You now must now - instead make a separate call to the method for each callable. + instead make a separate call to the method for each callable. This change + was introduced to support the ``route_prefix`` feature of include. Documentation ------------- @@ -180,6 +184,9 @@ Documentation - Added a Logging chapter to the narrative docs (based on the Pylons logging docs, thanks Phil). +- Added a Paste chapter to the narrative docs (moved content from the Project + chapter). + - Added the ``pyramid.interfaces.IDict`` interface representing the methods of a dictionary, for documentation purposes only (IMultiDict and IBeforeRender inherit from it). -- cgit v1.2.3 From 5f5a7e164f29fa9eb874a153dfbd8c19f4d9117a Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 22 Aug 2011 03:35:58 -0400 Subject: - Move the ``Settings`` class from ``pyramid.settings`` to ``pyramid.config.settings``. --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 0a015aa0a..f623ccbc3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -131,6 +131,9 @@ Internal - Moved the ``StaticURLInfo`` class from ``pyramid.static`` to ``pyramid.config.views``. +- Move the ``Settings`` class from ``pyramid.settings`` to + ``pyramid.config.settings``. + Deprecations ------------ -- cgit v1.2.3 From 6da01782b8ae6e3367b400cf8a075785f01b9bcc Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 22 Aug 2011 03:51:52 -0400 Subject: - Move the ``OverrideProvider``, ``PackageOverrides``, ``DirectoryOverride``, and ``FileOverride`` classes from ``pyramid.asset`` to ``pyramid.config.assets``. --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index f623ccbc3..994d8c301 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -134,6 +134,10 @@ Internal - Move the ``Settings`` class from ``pyramid.settings`` to ``pyramid.config.settings``. +- Move the ``OverrideProvider``, ``PackageOverrides``, ``DirectoryOverride``, + and ``FileOverride`` classes from ``pyramid.asset`` to + ``pyramid.config.assets``. + Deprecations ------------ -- cgit v1.2.3 From 141f90581ce667ff12db8ef9ccd8a6e59d07ef73 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 23 Aug 2011 03:35:13 -0400 Subject: add changes --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 994d8c301..c752f8005 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -98,6 +98,11 @@ Features output produced can be useful when trying to diagnose authentication-related problems. +- New view predicate: ``match_param``. Example: a view added via + ``config.add_view(aview, match_param='action=edit')`` will be called only + when the ``request.matchdict`` has a value inside it named ``action`` with + a value of ``edit``. + Internal -------- -- cgit v1.2.3 From 04b7eae0bf933d6144f7cf9f339b9ed6153b9a0f Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 23 Aug 2011 22:55:54 -0400 Subject: add explanations --- CHANGES.txt | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index c752f8005..86ae8c49d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -171,6 +171,33 @@ Backwards Incompatibilities instead make a separate call to the method for each callable. This change was introduced to support the ``route_prefix`` feature of include. +- It may be necessary to more strictly order configuration route and view + statements when using an "autocommitting" Configurator. In the past, it + was possible to add a view which named a route name before adding a route + with that name when you used an autocommitting configurator. For example:: + + config = Configurator(autocommit=True) + config.add_view('my.pkg.someview', route_name='foo') + config.add_route('foo', '/foo') + + The above will raise an exception when the view attempts to add itself. + Now you must add the route before adding the view:: + + config = Configurator(autocommit=True) + config.add_route('foo', '/foo') + config.add_view('my.pkg.someview', route_name='foo') + + This won't effect "normal" users, only people who have legacy BFG codebases + that used an autommitting configurator and possibly tests that use the + configurator API (the configurator returned by ``pyramid.testing.setUp`` is + an autocommitting configurator). The right way to get around this is to + use a non-autocommitting configurator (the default), which does not have + these directive ordering requirements. + +- The ``pyramid.config.Configurator.add_route`` directive no longer returns a + route object. This change was required to make route vs. view + configuration processing work properly. + Documentation ------------- -- cgit v1.2.3 From c1a179fbc713a8c8c5be19f8d327b8ced567d957 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 24 Aug 2011 00:29:42 -0400 Subject: prep for 1.2a1 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 86ae8c49d..5e4c63df1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.2a1 (2011-08-24) +================== Features -------- -- cgit v1.2.3 From b93af955803b3ae9dec72d6e3b0d3d3014e58b3f Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 24 Aug 2011 10:56:13 -0400 Subject: - When a ``renderers=`` argument is not specified to the Configurator constructor, eagerly register and commit the default renderer set. This permits the overriding of the default renderers, which was broken in 1.2a1 without a commit directly after Configurator construction. --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 5e4c63df1..e5340de4c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,11 @@ +Next release +============ + +- When a ``renderers=`` argument is not specified to the Configurator + constructor, eagerly register and commit the default renderer set. This + permits the overriding of the default renderers, which was broken in 1.2a1 + without a commit directly after Configurator construction. + 1.2a1 (2011-08-24) ================== -- cgit v1.2.3 From 8b62d750e1fb808ae2a22afa681972cda1d19c6d Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 25 Aug 2011 05:52:01 -0400 Subject: note change --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index e5340de4c..71b4fbecc 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,8 @@ Next release permits the overriding of the default renderers, which was broken in 1.2a1 without a commit directly after Configurator construction. +- Mako rendering exceptions had the wrong value for an error message. + 1.2a1 (2011-08-24) ================== -- cgit v1.2.3 From 2a818aa445a5ed844c30d9a5df1f89adfab728d4 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 26 Aug 2011 01:45:12 -0400 Subject: - An include could not set a root factory successfully because the Configurator constructor unconditionally registered one that would be treated as if it were "the word of the user". --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 71b4fbecc..b1aa43539 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,10 @@ Next release - Mako rendering exceptions had the wrong value for an error message. +- An include could not set a root factory successfully because the + Configurator constructor unconditionally registered one that would be + treated as if it were "the word of the user". + 1.2a1 (2011-08-24) ================== -- cgit v1.2.3 From 637bda4c885b01e2ecdb931344bc71f12101eb4e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 26 Aug 2011 02:03:52 -0400 Subject: - A session factory can now be passed in using the dotted name syntax. --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index b1aa43539..cf1f0ee96 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -12,6 +12,8 @@ Next release Configurator constructor unconditionally registered one that would be treated as if it were "the word of the user". +- A session factory can now be passed in using the dotted name syntax. + 1.2a1 (2011-08-24) ================== -- cgit v1.2.3 From 5bee607f61614cd8d57e64eacd83c26cbb25a385 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 27 Aug 2011 04:23:45 -0400 Subject: prep for 1.2a2 --- CHANGES.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index cf1f0ee96..d177b619a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,8 @@ -Next release -============ +1.2a2 (2011-08-27) +================== + +Bug Fixes +--------- - When a ``renderers=`` argument is not specified to the Configurator constructor, eagerly register and commit the default renderer set. This @@ -12,6 +15,9 @@ Next release Configurator constructor unconditionally registered one that would be treated as if it were "the word of the user". +Features +-------- + - A session factory can now be passed in using the dotted name syntax. 1.2a1 (2011-08-24) -- cgit v1.2.3 From b2c4e06e19dcac04adb0aa016e02ec1953cc8a57 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 28 Aug 2011 06:55:36 -0400 Subject: - Use ``config.with_package`` in view_config decorator rather than manufacturing a new renderer helper (cleanup). --- CHANGES.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index d177b619a..7fed402b1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,12 @@ +Next release +============ + +Internal +-------- + +- Use ``config.with_package`` in view_config decorator rather than + manufacturing a new renderer helper (cleanup). + 1.2a2 (2011-08-27) ================== -- cgit v1.2.3 From b5c0cb969c5b717e2cc95aa8738aa904f8dc2ccd Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 29 Aug 2011 09:53:40 -0400 Subject: - Pyramid did not properly generate static URLs using ``pyramid.url.static_url`` when passed a caller-package relative path due to a refactoring. Closes #258. --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 7fed402b1..48ef24417 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,13 @@ Next release ============ +Bug Fixes +--------- + +- Pyramid did not properly generate static URLs using + ``pyramid.url.static_url`` when passed a caller-package relative path due + to a refactoring. + Internal -------- -- cgit v1.2.3 From 0ff9d4fb7c23a505d11666dfd4410fb5d7a8d473 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 29 Aug 2011 10:22:15 -0400 Subject: - The ``settings`` object emitted a deprecation warning any time ``__getattr__`` was called upon it. However, there are legitimate situations in which ``__getattr__`` is called on arbitrary objects (e.g. ``hasattr``). Now, the ``settings`` object only emits the warning upon successful lookup. --- CHANGES.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 48ef24417..ce42e2136 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,7 +6,13 @@ Bug Fixes - Pyramid did not properly generate static URLs using ``pyramid.url.static_url`` when passed a caller-package relative path due - to a refactoring. + to a refactoring done in 1.2a1. + +- The ``settings`` object emitted a deprecation warning any time + ``__getattr__`` was called upon it. However, there are legitimate + situations in which ``__getattr__`` is called on arbitrary objects + (e.g. ``hasattr``). Now, the ``settings`` object only emits the warning + upon successful lookup. Internal -------- -- cgit v1.2.3 From 21a4c9b232b2d5c9660f27904b92645b109eda15 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 29 Aug 2011 11:46:41 -0400 Subject: prep for 1.2a3 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index ce42e2136..9cf1df931 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.2a3 (2011-08-29) +================== Bug Fixes --------- -- cgit v1.2.3 From 1aeae3565e07b99e737e6572ac5ba1b1bbf42abb Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 31 Aug 2011 01:53:17 -0400 Subject: - Support an ``onerror`` keyword argument to ``pyramid.config.Configurator.scan()``. This onerror keyword argument is passed to ``venusian.Scanner.scan()`` to influence error behavior when an exception is raised during scanning. - Pyramid now requires Venusian 1.0a1 or better to support the ``onerror`` keyword argument to ``pyramid.config.Configurator.scan``. - Move test fixtures around so test_config tests are not looking "up" for fixtures. --- CHANGES.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 9cf1df931..dd15e313e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,20 @@ +Next release +============ + +Features +-------- + +- Support an ``onerror`` keyword argument to + ``pyramid.config.Configurator.scan()``. This onerror keyword argument is + passed to ``venusian.Scanner.scan()`` to influence error behavior when + an exception is raised during scanning. + +Dependencies +------------ + +- Pyramid now requires Venusian 1.0a1 or better to support the ``onerror`` + keyword argument to ``pyramid.config.Configurator.scan``. + 1.2a3 (2011-08-29) ================== -- cgit v1.2.3 From 49f0829352e52ee3ef7643905e534207210204f6 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 31 Aug 2011 03:48:02 -0400 Subject: - The ``request_method`` predicate argument to ``pyramid.config.Configurator.add_view`` and ``pyramid.config.Configurator.add_route`` is now permitted to be a tuple of HTTP method names. Previously it was restricted to being a string representing a single HTTP method name. - Move add_view tests and tween tests to more reasonable places. --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index dd15e313e..7f2834542 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,12 @@ Features passed to ``venusian.Scanner.scan()`` to influence error behavior when an exception is raised during scanning. +- The ``request_method`` predicate argument to + ``pyramid.config.Configurator.add_view`` and + ``pyramid.config.Configurator.add_route`` is now permitted to be a tuple of + HTTP method names. Previously it was restricted to being a string + representing a single HTTP method name. + Dependencies ------------ -- cgit v1.2.3 From 33516a01875676a4bc80ac939c1130442d07dba2 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 31 Aug 2011 04:37:58 -0400 Subject: - Undeprecated ``pyramid.traversal.find_model``, ``pyramid.traversal.model_path``, ``pyramid.traversal.model_path_tuple``, and ``pyramid.url.model_url``, which were all deprecated in Pyramid 1.0. There's just not much cost to keeping them around forever as aliases to their renamed ``resource_*`` prefixed functions. - Undeprecated ``pyramid.view.bfg_view``, which was deprecated in Pyramid 1.0. This is a low-cost alias to ``pyramid.view.view_config`` which we'll just keep around forever. --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 7f2834542..873c445e9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -15,6 +15,16 @@ Features HTTP method names. Previously it was restricted to being a string representing a single HTTP method name. +- Undeprecated ``pyramid.traversal.find_model``, + ``pyramid.traversal.model_path``, ``pyramid.traversal.model_path_tuple``, + and ``pyramid.url.model_url``, which were all deprecated in Pyramid 1.0. + There's just not much cost to keeping them around forever as aliases to + their renamed ``resource_*`` prefixed functions. + +- Undeprecated ``pyramid.view.bfg_view``, which was deprecated in Pyramid + 1.0. This is a low-cost alias to ``pyramid.view.view_config`` which we'll + just keep around forever. + Dependencies ------------ -- cgit v1.2.3 From 09387f5cb04eb08b18c24a41248af0a13648286e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 1 Sep 2011 22:15:08 -0400 Subject: - Added a "Fixing HTTP vs. HTTP When Deploying Behind a Proxy" section to the "Virtual Hosting" chapter. --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 873c445e9..42ef1ae90 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -31,6 +31,12 @@ Dependencies - Pyramid now requires Venusian 1.0a1 or better to support the ``onerror`` keyword argument to ``pyramid.config.Configurator.scan``. +Documentation +------------- + +- Added a "Fixing HTTP vs. HTTP When Deploying Behind a Proxy" section to the + "Virtual Hosting" chapter. + 1.2a3 (2011-08-29) ================== -- cgit v1.2.3 From 7c1549608daf2e3a6965320b1ef8362d8b4dd618 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 2 Sep 2011 00:23:23 -0400 Subject: remove; too complex to document here --- CHANGES.txt | 6 ------ 1 file changed, 6 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 42ef1ae90..873c445e9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -31,12 +31,6 @@ Dependencies - Pyramid now requires Venusian 1.0a1 or better to support the ``onerror`` keyword argument to ``pyramid.config.Configurator.scan``. -Documentation -------------- - -- Added a "Fixing HTTP vs. HTTP When Deploying Behind a Proxy" section to the - "Virtual Hosting" chapter. - 1.2a3 (2011-08-29) ================== -- cgit v1.2.3 From f1c6e093706f54c301655d9894c163afbb48ae1e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 2 Sep 2011 12:52:53 -0400 Subject: prep for 1.2a4 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 873c445e9..b1165cb37 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.2a4 (2011-09-02) +================== Features -------- -- cgit v1.2.3 From 7a7c8c788bbc739f25eb1fb3754999270cd87fb6 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 3 Sep 2011 20:33:36 -0400 Subject: - The ``route_prefix`` of a configurator was not properly taken into account when registering routes in certain circumstances. See https://github.com/Pylons/pyramid/issues/260 Closes #260. --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index b1165cb37..9f2dc67ef 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,13 @@ +Next release +============ + +Bug Fixes +--------- + +- The ``route_prefix`` of a configurator was not properly taken into account + when registering routes in certain circumstances. See + https://github.com/Pylons/pyramid/issues/260 + 1.2a4 (2011-09-02) ================== -- cgit v1.2.3 From 061154d55814c29598b80510a932396305a425a9 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 3 Sep 2011 23:08:42 -0400 Subject: add a changelog entry for work done on this branch --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 9f2dc67ef..b06a972ef 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,11 @@ Bug Fixes when registering routes in certain circumstances. See https://github.com/Pylons/pyramid/issues/260 +Dependencies +------------ + +- The ``zope.configuration`` package is no longer a dependency. + 1.2a4 (2011-09-02) ================== -- cgit v1.2.3 From 7961af6994ec744298debc5c4b62bce9b2d395ba Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 4 Sep 2011 01:40:44 -0400 Subject: prep for 1.2a5 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index b06a972ef..443f9ca4c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.2a5 (2011-09-04) +================== Bug Fixes --------- -- cgit v1.2.3 From bd0c7a6cb3d0539283b27e068671ba074e63b4e4 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 5 Sep 2011 00:00:16 -0400 Subject: first cut at moving paste.auth stuff into core --- CHANGES.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 443f9ca4c..8bf4b9376 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,12 @@ +Next release +============ + +Internal +-------- + +- Internalize code previously depended upon as imports from the + ``paste.auth`` module (futureproof). + 1.2a5 (2011-09-04) ================== -- cgit v1.2.3 From 20646a7bca104d5a837fcf336a5d1403b3656aa3 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 5 Sep 2011 02:31:25 -0400 Subject: garden --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 8bf4b9376..ab02749d2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,9 @@ Internal - Internalize code previously depended upon as imports from the ``paste.auth`` module (futureproof). +- Fixed test suite; on some systems tests would fail due to indeterminate + test run ordering and a double-push-single-pop of a shared test variable. + 1.2a5 (2011-09-04) ================== -- cgit v1.2.3 From 315f755fd8c04e90d01c14a97afae8778cf45f05 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 6 Sep 2011 21:18:58 -0400 Subject: garden --- CHANGES.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index ab02749d2..a4f3a4a43 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,6 +10,20 @@ Internal - Fixed test suite; on some systems tests would fail due to indeterminate test run ordering and a double-push-single-pop of a shared test variable. +- Replaced use of ``paste.urlparser.StaticURLParser`` with a derivative of Chris Rossi's "happy" static file serving code. + +Behavior Differences +-------------------- + +- An ETag header is no longer set when serving a static file. A + Last-Modified header is set instead. + +- Static file serving no longer supports the ``wsgi.file_wrapper`` extension. + +- Instead of returning a ``403 Forbidden`` error when a static file is served + that cannot be accessed by the Pyramid process' user due to file + permissions, an IOError (or similar) will be raised. + 1.2a5 (2011-09-04) ================== -- cgit v1.2.3 From 342e5fcd79684cc2bfcb2cd0e0bbd027fd50ce24 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 6 Sep 2011 21:19:43 -0400 Subject: formatting --- CHANGES.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index a4f3a4a43..0d43b97da 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,7 +10,8 @@ Internal - Fixed test suite; on some systems tests would fail due to indeterminate test run ordering and a double-push-single-pop of a shared test variable. -- Replaced use of ``paste.urlparser.StaticURLParser`` with a derivative of Chris Rossi's "happy" static file serving code. +- Replaced use of ``paste.urlparser.StaticURLParser`` with a derivative of + Chris Rossi's "happy" static file serving code. Behavior Differences -------------------- -- cgit v1.2.3 From f46d5561e7a1e2ca3bf66e9ce05afa5a4e122fe7 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 6 Sep 2011 22:22:04 -0400 Subject: note raydeo's bug fix --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 0d43b97da..ba89e1989 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,12 @@ Next release ============ +Bug Fixes +--------- + +- AuthTktAuthenticationPolicy with a ``reissue_time`` interfered with logout. + See https://github.com/Pylons/pyramid/issues/262. + Internal -------- -- cgit v1.2.3 From d00fa00e0ee116cce61f157b24b3924d38a352a5 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 6 Sep 2011 23:14:18 -0400 Subject: prep for 1.2a6 --- CHANGES.txt | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index ba89e1989..fcf97b099 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.2a6 (2011-09-06) +================== Bug Fixes --------- @@ -13,12 +13,12 @@ Internal - Internalize code previously depended upon as imports from the ``paste.auth`` module (futureproof). +- Replaced use of ``paste.urlparser.StaticURLParser`` with a derivative of + Chris Rossi's "happy" static file serving code (futureproof). + - Fixed test suite; on some systems tests would fail due to indeterminate test run ordering and a double-push-single-pop of a shared test variable. -- Replaced use of ``paste.urlparser.StaticURLParser`` with a derivative of - Chris Rossi's "happy" static file serving code. - Behavior Differences -------------------- @@ -31,6 +31,12 @@ Behavior Differences that cannot be accessed by the Pyramid process' user due to file permissions, an IOError (or similar) will be raised. +Scaffolds +--------- + +- All scaffolds now send the ``cache_max_age`` parameter to the + ``add_static_view`` method. + 1.2a5 (2011-09-04) ================== -- cgit v1.2.3 From d8fc16f447c1a9ac91a24bb41f56a534706dfe41 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 7 Sep 2011 06:26:28 -0400 Subject: garden --- CHANGES.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index fcf97b099..3a3ff335b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,12 @@ +Next release +============ + +Documentation +------------- + +- Added a "What Makes Pyramid Unique" section to the Introduction narrative + chapter. + 1.2a6 (2011-09-06) ================== -- cgit v1.2.3 From 58ca44ed326326eba1d249801bc8faea8bc9cf4b Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 7 Sep 2011 19:58:07 -0400 Subject: - Sometimes falling back from territory translations (``de_DE``) to language translations (``de``) would not work properly when using a localizer. See https://github.com/Pylons/pyramid/issues/263 Closes #263. --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 3a3ff335b..d2af41876 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,13 @@ Next release ============ +Bug Fixes +--------- + +- Sometimes falling back from territory translations (``de_DE``) to language + translations (``de``) would not work properly when using a localizer. See + https://github.com/Pylons/pyramid/issues/263 + Documentation ------------- -- cgit v1.2.3 From d5dc5dd60e3bbff904a67dd02b4aff9226389942 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 8 Sep 2011 00:25:03 -0400 Subject: add tests for high-order chars in path elements and filenames --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index d2af41876..fda27592f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,12 @@ Bug Fixes translations (``de``) would not work properly when using a localizer. See https://github.com/Pylons/pyramid/issues/263 +- The static file serving machinery could not serve files that started with a + ``.`` (dot) character (hidden files). + +- The static file serving machinery inappropriately URL-quoted path segments + in filenames when asking for files from the filesystem. + Documentation ------------- -- cgit v1.2.3 From b447773f305c7c55126291e8b67f0b6b631a99c0 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 8 Sep 2011 00:29:16 -0400 Subject: garden --- CHANGES.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index fda27592f..4b4f36dc4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,10 +9,12 @@ Bug Fixes https://github.com/Pylons/pyramid/issues/263 - The static file serving machinery could not serve files that started with a - ``.`` (dot) character (hidden files). + ``.`` (dot) character. -- The static file serving machinery inappropriately URL-quoted path segments - in filenames when asking for files from the filesystem. +- Static files with high-order (extra-ASCII) characters in their names could + not be served by a static view. The static file serving machinery + inappropriately URL-quoted path segments in filenames when asking for files + from the filesystem. Documentation ------------- -- cgit v1.2.3 From b01e971f204184e2ede685183d62d390a9081c74 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 8 Sep 2011 03:09:49 -0400 Subject: garden --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 4b4f36dc4..a946805bc 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,7 +11,7 @@ Bug Fixes - The static file serving machinery could not serve files that started with a ``.`` (dot) character. -- Static files with high-order (extra-ASCII) characters in their names could +- Static files with high-order (super-ASCII) characters in their names could not be served by a static view. The static file serving machinery inappropriately URL-quoted path segments in filenames when asking for files from the filesystem. -- cgit v1.2.3 From 83faa0086d7bb816ea4b84148610a7cfe751e538 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 8 Sep 2011 03:36:52 -0400 Subject: - Within ``pyramid.traversal.traversal_path`` , canonicalize URL segments from UTF-8 to Unicode before checking whether a segment matches literally one of ``.``, the empty string, or ``..`` in case there's some sneaky way someone might tunnel those strings via UTF-8 that don't match the literals before decoded. --- CHANGES.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index a946805bc..0afc57404 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -16,6 +16,17 @@ Bug Fixes inappropriately URL-quoted path segments in filenames when asking for files from the filesystem. +- Within ``pyramid.traversal.traversal_path`` , canonicalize URL segments + from UTF-8 to Unicode before checking whether a segment matches literally + one of ``.``, the empty string, or ``..`` in case there's some sneaky way + someone might tunnel those strings via UTF-8 that don't match the literals + before decoded. + +Features +-------- + +- Belt-and-suspenders security measure: canonicalize encoded URL + Documentation ------------- -- cgit v1.2.3 From 870fd70f60943d46a343e6817de6d710f867e7f8 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 8 Sep 2011 03:40:03 -0400 Subject: remove stray text --- CHANGES.txt | 5 ----- 1 file changed, 5 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 0afc57404..4c927fa80 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -22,11 +22,6 @@ Bug Fixes someone might tunnel those strings via UTF-8 that don't match the literals before decoded. -Features --------- - -- Belt-and-suspenders security measure: canonicalize encoded URL - Documentation ------------- -- cgit v1.2.3 From 9de21ff234ac7995a77d74f7da63b78a29ca1a56 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 8 Sep 2011 04:00:12 -0400 Subject: prep for 1.2b1 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 4c927fa80..f7650f273 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.2b1 (2011-09-08) +================== Bug Fixes --------- -- cgit v1.2.3 From a66ae929a79a54f95a3786d9b95393a4fb8a8fc4 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 8 Sep 2011 17:45:20 -0400 Subject: Prep for 1.2b2; Closes #267 --- CHANGES.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index f7650f273..c62f0a34b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,21 @@ +1.2b2 (2011-09-08) +================== + +Bug Fixes +--------- + +- The 1.2b1 tarball was a brownbag (particularly for Windows users) because + it contained filenames with stray quotation marks in inappropriate places. + We depend on ``setuptools-git`` to produce release tarballs, and when it + was run to produce the 1.2b1 tarball, it didn't yet cope well with files + present in git repositories with high-order characters in their filenames. + +Documentation +------------- + +- Minor tweaks to the "Introduction" narrative chapter example app and + wording. + 1.2b1 (2011-09-08) ================== -- cgit v1.2.3 From cda7f6b367728352fb443d046752379e9f401230 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 9 Sep 2011 03:09:28 -0400 Subject: - The route prefix was not taken into account when a static view was added in an "include". See https://github.com/Pylons/pyramid/issues/266 . --- CHANGES.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index c62f0a34b..a82d3b336 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,12 @@ +Next release +============ + +Bug Fixes +--------- + +- The route prefix was not taken into account when a static view was added in + an "include". See https://github.com/Pylons/pyramid/issues/266 . + 1.2b2 (2011-09-08) ================== -- cgit v1.2.3 From 2cf1d0efe6d281bc2a0d8316af8480765200eeea Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 11 Sep 2011 01:30:37 -0400 Subject: prep for 1.2b3 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index a82d3b336..7488be4cb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.2b3 (2011-09-11) +================== Bug Fixes --------- -- cgit v1.2.3 From dceff57884836c6bbf9099c427108e5fa9e46e58 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 12 Sep 2011 12:50:34 -0400 Subject: - Route pattern replacement marker names can now begin with an underscore. See https://github.com/Pylons/pyramid/issues/276. Closes #276. --- CHANGES.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 7488be4cb..ac3b9aafc 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,12 @@ +Next release +============ + +Features +-------- + +- Route pattern replacement marker names can now begin with an underscore. + See https://github.com/Pylons/pyramid/issues/276. + 1.2b3 (2011-09-11) ================== -- cgit v1.2.3 From 63f65dbfcb5e7ef7864f8a954849597ba07a0299 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 12 Sep 2011 23:16:37 -0400 Subject: prep for 1.2 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index ac3b9aafc..21ea2bb4a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.2 (2011-09-12) +================ Features -------- -- cgit v1.2.3 From 0dde01d3f74053ce0c1f6383929f87c117098ced Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 22 Sep 2011 05:19:09 -0400 Subject: - Pyramid no longer depends on the zope.component package, except as a testing dependency. - Pyramid now depends on a ``zope.interface`` version greater than or equal to 3.8.0. --- CHANGES.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 21ea2bb4a..1997c69de 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,15 @@ +Next release +============ + +Dependencies +------------ + +- Pyramid no longer depends on the zope.component package, except as a + testing dependency. + +- Pyramid now depends on a ``zope.interface`` version greater than or equal + to 3.8.0. + 1.2 (2011-09-12) ================ -- cgit v1.2.3 From 9b90041e68193389261c3073efe2623cea925968 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 24 Sep 2011 17:34:33 -0400 Subject: garden --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 1997c69de..e90c5e127 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,12 @@ Next release ============ +Features +-------- + +- Lone instance methods can now be treated as view callables (see + https://github.com/Pylons/pyramid/pull/283). + Dependencies ------------ -- cgit v1.2.3 From b54b2c0e90cccbc3b41ab43c52f98e34458f620f Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 2 Oct 2011 20:04:03 -0400 Subject: close an issue --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 047db6472..75194d9f5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,6 +10,12 @@ Features - Lone instance methods can now be treated as view callables (see https://github.com/Pylons/pyramid/pull/283). +Bug Fixes +--------- + +- Make test suite pass on 32-bit systems; fixes #286. + See also https://github.com/Pylons/pyramid/issues/286 + Backwards Incompatibilities --------------------------- -- cgit v1.2.3 From a4b82c81f41ea8900b763951d6b4b0a18b33fdb2 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 2 Oct 2011 20:05:04 -0400 Subject: also closes another issue --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 75194d9f5..dc74ea7a8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -13,7 +13,7 @@ Features Bug Fixes --------- -- Make test suite pass on 32-bit systems; fixes #286. +- Make test suite pass on 32-bit systems; closes #286. closes #306. See also https://github.com/Pylons/pyramid/issues/286 Backwards Incompatibilities -- cgit v1.2.3 From 206a7f6eb776ff91043ce9cf4627dad20f68b937 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 3 Oct 2011 17:48:28 -0400 Subject: Closes #308 --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index dc74ea7a8..06eace14a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -16,6 +16,9 @@ Bug Fixes - Make test suite pass on 32-bit systems; closes #286. closes #306. See also https://github.com/Pylons/pyramid/issues/286 +- The ``pryamid.view.view_config`` decorator did not accept a ``match_params`` + predicate argument. See https://github.com/Pylons/pyramid/pull/308 + Backwards Incompatibilities --------------------------- -- cgit v1.2.3 From 75f05a60f8754c9c5c234b9731dbc08646ba89a9 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 6 Oct 2011 05:40:47 -0400 Subject: document glue changes --- CHANGES.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 047db6472..2e2b2291d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -16,6 +16,20 @@ Backwards Incompatibilities - Pyramid no longer runs on Python 2.5 (which includes the most recent release of Jython, and the current version of GAE). +- The ``paster`` command is no longer the documented way to create projects, + start the server, or run debugging commands. To create projects from + scaffolds, ``paster create`` is replaced by the ``pcreate`` console script. + To serve up a project, ``paster serve`` is replaced by the ``pserve`` + console script. New console scripts named ``pshell``, ``pviews``, + ``proutes``, and ``ptweens`` do what their ``paster `` + equivalents used to do. Rationale: the Paste and PasteScript packages do + not run under Python 3. + +- The default WSGI server run as the result of ``pserve`` from newly rendered + scaffolding is now the ``wsgiref`` WSGI server instead of the + ``paste.httpserver`` server. Rationale: Rationale: the Paste and + PasteScript packages do not run under Python 3. + Dependencies ------------ @@ -27,3 +41,6 @@ Dependencies Python 3 compatibility purposes). It also, as a testing dependency, depends on WebTest>=1.3.1 for the same reason. +- Pyramid no longer depends on the Paste or PasteScript packages. + + -- cgit v1.2.3 From 876fb62b301f321ff08c0f2e4e99372c9ce4a839 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 11 Oct 2011 07:45:13 -0400 Subject: garden --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 9859fbf14..79ce21e00 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -19,6 +19,10 @@ Bug Fixes - The ``pryamid.view.view_config`` decorator did not accept a ``match_params`` predicate argument. See https://github.com/Pylons/pyramid/pull/308 +- The AuthTktCookieHelper could potentially generate Unicode headers + inappropriately when the ``tokens`` argument to remember was used. See + https://github.com/Pylons/pyramid/pull/314. + Backwards Incompatibilities --------------------------- -- cgit v1.2.3 From accd085499ae596e11ee6286a76b0112d3288682 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 11 Oct 2011 07:45:47 -0400 Subject: garden --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 79ce21e00..79f2e23c7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -27,7 +27,7 @@ Backwards Incompatibilities --------------------------- - Pyramid no longer runs on Python 2.5 (which includes the most recent - release of Jython, and the current version of GAE). + release of Jython, and the current version of GAE as of this writing). - The ``paster`` command is no longer the documented way to create projects, start the server, or run debugging commands. To create projects from -- cgit v1.2.3 From a1bf6aebc57fd661d1f0f02b7d913db75fcb15c5 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 11 Oct 2011 07:46:40 -0400 Subject: garden --- CHANGES.txt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 79f2e23c7..b55ec5e0d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,11 +4,7 @@ Next release Features -------- -- Python 3.2 compatibility (except for Paste scaffolding and paster commands, - which do not work, because Paste has not been ported to Python 3 yet). - -- Lone instance methods can now be treated as view callables (see - https://github.com/Pylons/pyramid/pull/283). +- Python 3.2 compatibility. Bug Fixes --------- -- cgit v1.2.3 From 63fcedab6f82f1ef94932ca22d2aea1debebe032 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 16 Oct 2011 19:44:39 -0400 Subject: - A ``mako.directories`` setting is no longer required to use Mako templates Rationale: Mako template renderers can be specified using an absolute asset spec. An entire application can be written with such asset specs, requiring no ordered lookup path. --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index b55ec5e0d..631ae1246 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,11 @@ Features - Python 3.2 compatibility. +- A ``mako.directories`` setting is no longer required to use Mako templates + Rationale: Mako template renderers can be specified using an absolute asset + spec. An entire application can be written with such asset specs, + requiring no ordered lookup path. + Bug Fixes --------- -- cgit v1.2.3 From 6e4c2d0d50d41623ef3a6b9363d1b787c28eb32a Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 16 Oct 2011 19:58:48 -0400 Subject: garden --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 631ae1246..7440794ee 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -24,6 +24,9 @@ Bug Fixes inappropriately when the ``tokens`` argument to remember was used. See https://github.com/Pylons/pyramid/pull/314. +- The AuthTktAuthenticationPolicy did not use a timing-attack-aware string + comparator. See https://github.com/Pylons/pyramid/pull/320 for more info. + Backwards Incompatibilities --------------------------- -- cgit v1.2.3 From 9e7c1195b1e0fc1f82335877f9ad085fbb034e7b Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 2 Nov 2011 12:04:45 -0700 Subject: - The DummySession in ``pyramid.testing`` now generates a new CSRF token if one doesn't yet exist. --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 7440794ee..94ca8b0c1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -27,6 +27,9 @@ Bug Fixes - The AuthTktAuthenticationPolicy did not use a timing-attack-aware string comparator. See https://github.com/Pylons/pyramid/pull/320 for more info. +- The DummySession in ``pyramid.testing`` now generates a new CSRF token if + one doesn't yet exist. + Backwards Incompatibilities --------------------------- -- cgit v1.2.3 From 5cf9fc8ab86e6ec6b76dd9d80cd8dcab42384cc6 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 11 Nov 2011 13:38:32 -0500 Subject: - New ``pyramid.compat`` module and API documentation which provides Python 2/3 straddling support for Pyramid add-ons and development environments. --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 94ca8b0c1..110205055 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,9 @@ Features - Python 3.2 compatibility. +- New ``pyramid.compat`` module and API documentation which provides Python + 2/3 straddling support for Pyramid add-ons and development environments. + - A ``mako.directories`` setting is no longer required to use Mako templates Rationale: Mako template renderers can be specified using an absolute asset spec. An entire application can be written with such asset specs, -- cgit v1.2.3 From 818f8cab1dff781bbacf94cbabb4bec3825e081e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 12 Nov 2011 20:41:29 -0500 Subject: - The ``alchemy`` scaffold has been removed. - The ``routesalchemy`` scaffold has been renamed ``alchemy``. --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 110205055..42f07a275 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -67,3 +67,13 @@ Dependencies - Pyramid no longer depends on the Paste or PasteScript packages. +Scaffolds +--------- + +- Rendered scaffolds have now been changed to be more relocatable (fewer + mentions of the package name within files in the package). + +- The ``alchemy`` scaffold has been removed. + +- The ``routesalchemy`` scaffold has been renamed ``alchemy``. + -- cgit v1.2.3 From 1c39aeac52ab43afc57b11cfdb50513bdf87b762 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 18 Nov 2011 07:38:06 -0500 Subject: - ``request.static_url`` now generates URL-quoted URLs when fed a ``path`` argument which contains characters that are unsuitable for URLs. --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 42f07a275..6e664f077 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -33,6 +33,9 @@ Bug Fixes - The DummySession in ``pyramid.testing`` now generates a new CSRF token if one doesn't yet exist. +- ``request.static_url`` now generates URL-quoted URLs when fed a ``path`` + argument which contains characters that are unsuitable for URLs. + Backwards Incompatibilities --------------------------- -- cgit v1.2.3 From a5512e603365ce9e4a698095d6114e107c25d8d9 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 18 Nov 2011 07:38:58 -0500 Subject: reference github issue --- CHANGES.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 6e664f077..f40c32eec 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -34,7 +34,8 @@ Bug Fixes one doesn't yet exist. - ``request.static_url`` now generates URL-quoted URLs when fed a ``path`` - argument which contains characters that are unsuitable for URLs. + argument which contains characters that are unsuitable for URLs. See + https://github.com/Pylons/pyramid/issues/349 for more info. Backwards Incompatibilities --------------------------- -- cgit v1.2.3 From 9ffa36dde53afda0a5a15b096e2fcd9c54a88ea2 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 18 Nov 2011 07:43:44 -0500 Subject: garden --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index f40c32eec..33008cbea 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -41,7 +41,7 @@ Backwards Incompatibilities --------------------------- - Pyramid no longer runs on Python 2.5 (which includes the most recent - release of Jython, and the current version of GAE as of this writing). + release of Jython and the Python 2.5 version of GAE as of this writing). - The ``paster`` command is no longer the documented way to create projects, start the server, or run debugging commands. To create projects from -- cgit v1.2.3 From 8a5db43e9b7671f49e118cbb888019445df0ae14 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 21 Nov 2011 21:59:53 -0500 Subject: Garden (ref commit #2cf5d28). --- CHANGES.txt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 33008cbea..183c7406b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,6 +14,9 @@ Features spec. An entire application can be written with such asset specs, requiring no ordered lookup path. +- ``bpython`` interpreter compatibility in ``pshell``. See the "Command-Line + Pyramid" narrative docs chapter for more information. + Bug Fixes --------- @@ -57,6 +60,11 @@ Backwards Incompatibilities ``paste.httpserver`` server. Rationale: Rationale: the Paste and PasteScript packages do not run under Python 3. +- The ``pshell`` command (nee "paster pshell") no longer accepts a + ``--disable-ipython`` command-line argument. Instead, it accepts a ``-p`` + or ``--python-shell`` argument, which can be any of the values ``python``, + ``ipython`` or ``bpython``. + Dependencies ------------ @@ -77,7 +85,6 @@ Scaffolds - Rendered scaffolds have now been changed to be more relocatable (fewer mentions of the package name within files in the package). -- The ``alchemy`` scaffold has been removed. - -- The ``routesalchemy`` scaffold has been renamed ``alchemy``. +- The ``routesalchemy`` scaffold has been renamed ``alchemy``, replacing the + older (traversal-based) ``alchemy`` scaffold (which has been retired). -- cgit v1.2.3 From 4c6fa2f4ef0bc7ad24759648cae1dadaab087bd1 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 21 Nov 2011 22:52:59 -0600 Subject: typo --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 183c7406b..effce62b9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -60,7 +60,7 @@ Backwards Incompatibilities ``paste.httpserver`` server. Rationale: Rationale: the Paste and PasteScript packages do not run under Python 3. -- The ``pshell`` command (nee "paster pshell") no longer accepts a +- The ``pshell`` command (see "paster pshell") no longer accepts a ``--disable-ipython`` command-line argument. Instead, it accepts a ``-p`` or ``--python-shell`` argument, which can be any of the values ``python``, ``ipython`` or ``bpython``. -- cgit v1.2.3 From 38e4c7d6b0a51a92747e6c928599a7d651362c6c Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 27 Nov 2011 00:00:55 -0500 Subject: add get_appsettings API to paster --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index effce62b9..3e8a157c8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -17,6 +17,10 @@ Features - ``bpython`` interpreter compatibility in ``pshell``. See the "Command-Line Pyramid" narrative docs chapter for more information. +- Added ``get_appconfig`` function to ``pyramid.paster`` API. This function + returns the settings defined within an ``[app:...]`` section in a + PasteDeploy ini file. + Bug Fixes --------- -- cgit v1.2.3 From e14fab9210f22ffb31e8d0a51ddd3444a7f927df Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sat, 26 Nov 2011 23:03:57 -0600 Subject: garden --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 3e8a157c8..7060492f1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -17,7 +17,7 @@ Features - ``bpython`` interpreter compatibility in ``pshell``. See the "Command-Line Pyramid" narrative docs chapter for more information. -- Added ``get_appconfig`` function to ``pyramid.paster`` API. This function +- Added ``get_appsettings`` function to ``pyramid.paster`` API. This function returns the settings defined within an ``[app:...]`` section in a PasteDeploy ini file. -- cgit v1.2.3 From 596495de4aa1ab0f3a3752d21c14ac08631e8457 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 27 Nov 2011 00:42:14 -0500 Subject: - Added ``setup_logging`` API function to the ``pyramid.paster`` module. This function sets up Python logging according to the logging configuration in a PasteDeploy ini file. --- CHANGES.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 7060492f1..efc0dbb64 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -17,9 +17,13 @@ Features - ``bpython`` interpreter compatibility in ``pshell``. See the "Command-Line Pyramid" narrative docs chapter for more information. -- Added ``get_appsettings`` function to ``pyramid.paster`` API. This function - returns the settings defined within an ``[app:...]`` section in a - PasteDeploy ini file. +- Added ``get_appsettings`` API function to the ``pyramid.paster`` module. + This function returns the settings defined within an ``[app:...]`` section + in a PasteDeploy ini file. + +- Added ``setup_logging`` API function to the ``pyramid.paster`` module. + This function sets up Python logging according to the logging configuration + in a PasteDeploy ini file. Bug Fixes --------- -- cgit v1.2.3 From 5edd54f05b05330fa6e899a1bb1650cc7a2df33c Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 27 Nov 2011 04:08:20 -0500 Subject: - The SQLAlchemy Wiki tutorial has been updated. It now uses ``@view_config`` decorators and an explicit database population script. Closes #359. --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index efc0dbb64..ce36750b6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -86,6 +86,11 @@ Dependencies - Pyramid no longer depends on the Paste or PasteScript packages. +Documentation +------------- + +- The SQLAlchemy Wiki tutorial has been updated. It now uses + ``@view_config`` decorators and an explicit database population script. Scaffolds --------- -- cgit v1.2.3 From 14e5fa938b5354154f724101f444b1826b01aa3a Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 28 Nov 2011 16:15:56 -0500 Subject: garden --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index ce36750b6..c1a4f0216 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -92,6 +92,8 @@ Documentation - The SQLAlchemy Wiki tutorial has been updated. It now uses ``@view_config`` decorators and an explicit database population script. +- Minor updates to the ZODB Wiki tutorial. + Scaffolds --------- -- cgit v1.2.3 From 35ad08ba9c66b900fe0c537516b390a92cb2a8cd Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 29 Nov 2011 08:31:33 -0500 Subject: move register method from IIntrospector back to IIntrospectable; provide better conflict reporting and a more useful ActionInfo object --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index c1a4f0216..6f30d506c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -25,6 +25,9 @@ Features This function sets up Python logging according to the logging configuration in a PasteDeploy ini file. +- Configuration conflict reporting is reported in a more understandable way + ("Line 11 in file..." vs. a repr of a tuple of similar info). + Bug Fixes --------- -- cgit v1.2.3 From 57a0d7765c54031e6ac83881b536712316f22c45 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 30 Nov 2011 12:55:41 -0500 Subject: docs; todo; coverage for Introspector --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 6f30d506c..6fdb03635 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -28,6 +28,12 @@ Features - Configuration conflict reporting is reported in a more understandable way ("Line 11 in file..." vs. a repr of a tuple of similar info). +- New APIs: ``pyramid.registry.Introspectable``, + ``pyramid.config.Configurator.introspector``, + ``pyramid.config.Configurator.introspectable``, + ``pyramid.registry.Registry.introspector``. See API docs of related + modules for more info. + Bug Fixes --------- -- cgit v1.2.3 From ea814bea7b226206f59da70491f37dfcec05b319 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 2 Dec 2011 15:12:40 -0500 Subject: garden --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index c1a4f0216..8bdb35d6e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -48,6 +48,9 @@ Bug Fixes argument which contains characters that are unsuitable for URLs. See https://github.com/Pylons/pyramid/issues/349 for more info. +- Prevent a scaffold rendering from being named ``site`` (conflicts with + Python internal site.py). + Backwards Incompatibilities --------------------------- -- cgit v1.2.3 From 9d97b654057e621c4928fe597053d54aa5f63a8c Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 3 Dec 2011 03:00:15 -0500 Subject: add skeleton for using introspection chapter --- CHANGES.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 6fdb03635..6ba72fc06 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -28,6 +28,10 @@ Features - Configuration conflict reporting is reported in a more understandable way ("Line 11 in file..." vs. a repr of a tuple of similar info). +- An configuration introspection system was added; see the narrative + documentation chapter entitled "Pyramid Configuration Introspection" for + more information. + - New APIs: ``pyramid.registry.Introspectable``, ``pyramid.config.Configurator.introspector``, ``pyramid.config.Configurator.introspectable``, @@ -103,6 +107,11 @@ Documentation - Minor updates to the ZODB Wiki tutorial. +- A narrative documentation chapter named "Extending Pyramid Configuration" + was added; it describes how to add a new directive, and how use the + ``pyramid.config.Configurator.action`` method within custom directives. It + also describes how to add introspectable objects. + Scaffolds --------- -- cgit v1.2.3 From 7d109d6522353bf5f5f3ca4f29bc2b27542f2ef2 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 4 Dec 2011 17:01:04 -0500 Subject: allow config.action to take arbitrary kw args --- CHANGES.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 6ba72fc06..44f948180 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -30,13 +30,13 @@ Features - An configuration introspection system was added; see the narrative documentation chapter entitled "Pyramid Configuration Introspection" for - more information. - -- New APIs: ``pyramid.registry.Introspectable``, + more information. New APIs: ``pyramid.registry.Introspectable``, ``pyramid.config.Configurator.introspector``, ``pyramid.config.Configurator.introspectable``, - ``pyramid.registry.Registry.introspector``. See API docs of related - modules for more info. + ``pyramid.registry.Registry.introspector``. + +- Allow extra keyword arguments to be passed to the + ``pyramid.config.Configurator.action`` method. Bug Fixes --------- -- cgit v1.2.3 From 8fe02156794c2cac0cbc6961332f9d8bebc1cb90 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 5 Dec 2011 00:12:38 -0500 Subject: the starter scaffold now uses url dispatch; add a minimal section about using another WSGI server; random docs fixes --- CHANGES.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 41c608af5..66761bff7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -92,7 +92,7 @@ Backwards Incompatibilities Dependencies ------------ -- Pyramid no longer depends on the zope.component package, except as a +- Pyramid no longer depends on the ``zope.component`` package, except as a testing dependency. - Pyramid now depends on a zope.interface>=3.8.0, WebOb>=1.2dev, @@ -115,6 +115,10 @@ Documentation ``pyramid.config.Configurator.action`` method within custom directives. It also describes how to add introspectable objects. +- A narrative documentation chapter named "Pyramid Configuration + Introspection" was added. It describes how to query the introspection + system. + Scaffolds --------- @@ -124,3 +128,5 @@ Scaffolds - The ``routesalchemy`` scaffold has been renamed ``alchemy``, replacing the older (traversal-based) ``alchemy`` scaffold (which has been retired). +- The ``starter`` scaffold now uses URL dispatch by default. + -- cgit v1.2.3 From d83b3943474d2eb01b0fd8c1be31c50553fd4384 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 5 Dec 2011 01:41:04 -0500 Subject: add whatsnew-1.3; garden --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 66761bff7..e7b3e1968 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -28,7 +28,7 @@ Features - Configuration conflict reporting is reported in a more understandable way ("Line 11 in file..." vs. a repr of a tuple of similar info). -- An configuration introspection system was added; see the narrative +- A configuration introspection system was added; see the narrative documentation chapter entitled "Pyramid Configuration Introspection" for more information. New APIs: ``pyramid.registry.Introspectable``, ``pyramid.config.Configurator.introspector``, -- cgit v1.2.3 From e307fcd13a98ef5b60e6f48c5cebb703c35db31f Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 5 Dec 2011 02:09:23 -0500 Subject: - Removed the ``pyramid.renderers.renderer_from_name`` function. It has been deprecated since Pyramid 1.0, and was never an API. --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index e7b3e1968..0d2842a60 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -89,6 +89,9 @@ Backwards Incompatibilities or ``--python-shell`` argument, which can be any of the values ``python``, ``ipython`` or ``bpython``. +- Removed the ``pyramid.renderers.renderer_from_name`` function. It has been + deprecated since Pyramid 1.0, and was never an API. + Dependencies ------------ -- cgit v1.2.3 From b74abe0de69ef43cc416d61fbf3c0619b3314469 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 6 Dec 2011 02:13:12 -0500 Subject: garden --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 0d2842a60..4e8f0f699 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -92,6 +92,12 @@ Backwards Incompatibilities - Removed the ``pyramid.renderers.renderer_from_name`` function. It has been deprecated since Pyramid 1.0, and was never an API. +- To use ZCML with versions of Pyramid >= 1.3, you will need ``pyramid_zcml`` + version >= 0.8 and ``zope.configuration`` version >= 3.8.0. The + ``pyramid_zcml`` package version 0.8 is backwards compatible all the way to + Pyramid 1.0, so you won't be warned if you have older versions installed + and upgrade Pyramid "in-place"; it may simply break instead. + Dependencies ------------ -- cgit v1.2.3 From c753fc58697fa8496bb77fecce30d0f34e63e7f7 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 6 Dec 2011 12:29:38 -0500 Subject: garden --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 4e8f0f699..67cac4b2b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -64,6 +64,10 @@ Bug Fixes - Prevent a scaffold rendering from being named ``site`` (conflicts with Python internal site.py). +- Support for using instances as targets of the ``pyramid.wsgi.wsgiapp`` and + ``pryramid.wsgi.wsgiapp2`` functions. + See https://github.com/Pylons/pyramid/pull/370 for more info. + Backwards Incompatibilities --------------------------- -- cgit v1.2.3 From 56df902d0a5bcd29a2b4c3dfafab9a09d6f0c29d Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 8 Dec 2011 04:26:15 -0500 Subject: - New APIs: ``pyramid.path.AssetResolver`` and ``pyramid.path.DottedNameResolver``. The former can be used to resolve asset specifications, the latter can be used to resolve dotted names to modules or packages. --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 67cac4b2b..4be846ece 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -38,6 +38,11 @@ Features - Allow extra keyword arguments to be passed to the ``pyramid.config.Configurator.action`` method. +- New APIs: ``pyramid.path.AssetResolver`` and + ``pyramid.path.DottedNameResolver``. The former can be used to resolve + asset specifications, the latter can be used to resolve dotted names to + modules or packages. + Bug Fixes --------- -- cgit v1.2.3 From 5f1cf3fbc519085b93fb16a230c0637050ce350d Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 9 Dec 2011 15:04:49 -0500 Subject: prep for 1.3a1 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 4be846ece..9cdaac5be 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.3a1 (2011-12-09) +================== Features -------- -- cgit v1.2.3 From 4375cf2bad3535ce896e95fcf1e388e33f2e8ecf Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 14 Dec 2011 03:41:03 -0500 Subject: Flesh out new view_defaults feature and add docs, change notes, and add to whatsnew. --- CHANGES.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 9cdaac5be..c979c4dc1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,23 @@ +Next release +============ + +Features +-------- + +- New API: ``pyramid.view.view_defaults``. If you use a class as a view, you + can use the new ``view_defaults`` class decorator on the class to provide + defaults to the view configuration information used by every + ``@view_config`` decorator that decorates a method of that class. It also + works against view configurations involving a class made imperatively. + +Documentation +------------- + +- Added documentation to "View Configuration" narrative documentation chapter + about ``view_defaults`` class decorator. + +- Added API docs for ``view_defaults`` class decorator. + 1.3a1 (2011-12-09) ================== -- cgit v1.2.3 From 78d1e4aefa4948904c354268abd53b9311f79b7d Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 14 Dec 2011 07:38:28 -0500 Subject: add a backwards compatibility knob to pcreate to emulate paster create handling of --list-templates --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index c979c4dc1..977503948 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,6 +10,9 @@ Features ``@view_config`` decorator that decorates a method of that class. It also works against view configurations involving a class made imperatively. +- Added a backwards compatibility knob to ``pcreate`` to emulate ``paster + create`` handling for the ``--list-templates`` option. + Documentation ------------- -- cgit v1.2.3 From bfd4b39b3467681ad34b1dda74acd20294e81a86 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 14 Dec 2011 09:10:10 -0500 Subject: - Changed scaffolding machinery around a bit to make it easier for people who want to have extension scaffolds that can work across Pyramid 1.0.X, 1.1.X, 1.2.X and 1.3.X. See the new "Creating Pyramid Scaffolds" chapter in the narrative documentation for more info. - Added an API docs chapter for ``pyramid.scaffolds``. - Added a narrative docs chapter named "Creating Pyramid Scaffolds". - The ``template_renderer`` method of ``pyramid.scaffolds.PyramidScaffold`` was renamed to ``render_template``. If you were overriding it, you're a bad person, because it wasn't an API before now. But we're nice so we're letting you know. --- CHANGES.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 977503948..3c6213001 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -13,6 +13,11 @@ Features - Added a backwards compatibility knob to ``pcreate`` to emulate ``paster create`` handling for the ``--list-templates`` option. +- Changed scaffolding machinery around a bit to make it easier for people who + want to have extension scaffolds that can work across Pyramid 1.0.X, 1.1.X, + 1.2.X and 1.3.X. See the new "Creating Pyramid Scaffolds" chapter in the + narrative documentation for more info. + Documentation ------------- @@ -21,6 +26,18 @@ Documentation - Added API docs for ``view_defaults`` class decorator. +- Added an API docs chapter for ``pyramid.scaffolds``. + +- Added a narrative docs chapter named "Creating Pyramid Scaffolds". + +Backwards Incompatibilities +--------------------------- + +- The ``template_renderer`` method of ``pyramid.scaffolds.PyramidScaffold`` + was renamed to ``render_template``. If you were overriding it, you're a + bad person, because it wasn't an API before now. But we're nice so we're + letting you know. + 1.3a1 (2011-12-09) ================== -- cgit v1.2.3 From 9dce50a3bdd30b7c5c9b8efd184bad7cbbb1a030 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 14 Dec 2011 09:23:22 -0500 Subject: prep for 1.3a2 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 3c6213001..74f79e5ae 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.3a2 (2011-12-14) +================== Features -------- -- cgit v1.2.3 From c8061ee1d797cb666e1d45e19765ede565d21915 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 15 Dec 2011 17:29:01 -0500 Subject: finish prequest feature --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 74f79e5ae..c8a156d2e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,13 @@ +Next release +============ + +Features +-------- + +- Added a ``prequest`` script (along the lines of ``paster request``). It is + documented in the "Command-Line Pyramid" chapter in the section entitled + "Invoking a Request". + 1.3a2 (2011-12-14) ================== -- cgit v1.2.3 From d5861420e9d4c6a3c8b52955e9f28634a6811553 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 15 Dec 2011 18:42:22 -0500 Subject: - Normalized exit values and ``-h`` output for all ``p*`` scripts (``pviews``, ``proutes``, etc). --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index c8a156d2e..795824e0b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,12 @@ Features documented in the "Command-Line Pyramid" chapter in the section entitled "Invoking a Request". +Bug Fixes +--------- + +- Normalized exit values and ``-h`` output for all ``p*`` scripts + (``pviews``, ``proutes``, etc). + 1.3a2 (2011-12-14) ================== -- cgit v1.2.3 From 61838b76639d6dcf9facd549841a2ed0d07ea012 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 15 Dec 2011 21:35:23 -0500 Subject: - Added a section named "Making Your Script into a Console Script" in the "Command-Line Pyramid" chapter. --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 795824e0b..63c84d0f8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,6 +14,12 @@ Bug Fixes - Normalized exit values and ``-h`` output for all ``p*`` scripts (``pviews``, ``proutes``, etc). +Documentation +------------- + +- Added a section named "Making Your Script into a Console Script" in the + "Command-Line Pyramid" chapter. + 1.3a2 (2011-12-14) ================== -- cgit v1.2.3 From 9003a8bba654f98933b98dacac67760cff73e1c5 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 16 Dec 2011 04:35:05 -0500 Subject: - Removed the "Running Pyramid on Google App Engine" tutorial from the main docs. It survives on in the Cookbook (http://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/gae.html). Rationale: it provides the correct info for the Python 2.5 version of GAE only, and this version of Pyramid does not support Python 2.5. --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 63c84d0f8..8df5ab934 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -20,6 +20,12 @@ Documentation - Added a section named "Making Your Script into a Console Script" in the "Command-Line Pyramid" chapter. +- Removed the "Running Pyramid on Google App Engine" tutorial from the main + docs. It survives on in the Cookbook + (http://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/gae.html). + Rationale: it provides the correct info for the Python 2.5 version of GAE + only, and this version of Pyramid does not support Python 2.5. + 1.3a2 (2011-12-14) ================== -- cgit v1.2.3 From ba2a3f87fa51843a8a160f209fb576ae21d0050b Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 21 Dec 2011 01:04:26 -0500 Subject: - Add undocumented ``__discriminator__`` API to derived view callables. e.g. ``adapters.lookup(...).__discriminator__(context, request)``. It will be used by superdynamic systems that require the discriminator to be used for introspection after manual view lookup. --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 8df5ab934..b5c1859c9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,11 @@ Features documented in the "Command-Line Pyramid" chapter in the section entitled "Invoking a Request". +- Add undocumented ``__discriminator__`` API to derived view callables. + e.g. ``adapters.lookup(...).__discriminator__(context, request)``. It will + be used by superdynamic systems that require the discriminator to be used + for introspection after manual view lookup. + Bug Fixes --------- -- cgit v1.2.3 From d394da5175fece8388f2fc0dfd906942faa6f2ed Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 21 Dec 2011 02:18:37 -0500 Subject: prep for 1.3a3 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index b5c1859c9..3feaa6332 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.3a3 (2011-12-21) +================== Features -------- -- cgit v1.2.3 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 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'CHANGES.txt') 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) ================== -- cgit v1.2.3 From 030d10697cc52a5c26d19818140616a485f63428 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 2 Jan 2012 20:41:44 -0500 Subject: - Use the ``waitress`` WSGI server instead of ``wsgiref`` in scaffolding. --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 5d05b60b8..adc380c34 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,6 +10,8 @@ Features of the instance. Common use-cases for this would be to get a database connection for the request or identify the current user. +- Use the ``waitress`` WSGI server instead of ``wsgiref`` in scaffolding. + 1.3a3 (2011-12-21) ================== -- cgit v1.2.3 From 52a948e65ef923340a9c172fe6d258f2832f8799 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 3 Jan 2012 08:16:06 -0500 Subject: - The documentation of ``pyramid.events.subscriber`` indicated that using it as a decorator with no arguments like this:: @subscriber() def somefunc(event): pass Would register ``somefunc`` to receive all events sent via the registry, but this was untrue. Instead, it would receive no events at all. This has now been fixed and the code matches the documentation. See also https://github.com/Pylons/pyramid/issues/386 Closes #386 --- CHANGES.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index adc380c34..07c0b564d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -12,6 +12,21 @@ Features - Use the ``waitress`` WSGI server instead of ``wsgiref`` in scaffolding. +Bug Fixes +--------- + +- The documentation of ``pyramid.events.subscriber`` indicated that using it + as a decorator with no arguments like this:: + + @subscriber() + def somefunc(event): + pass + + Would register ``somefunc`` to receive all events sent via the registry, + but this was untrue. Instead, it would receive no events at all. This has + now been fixed and the code matches the documentation. See also + https://github.com/Pylons/pyramid/issues/386 + 1.3a3 (2011-12-21) ================== -- cgit v1.2.3 From ad9807016fd28b7da424174fdb6ed9b93641f58f Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 5 Jan 2012 06:09:08 -0500 Subject: garden --- CHANGES.txt | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 07c0b564d..93be3eab3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -27,6 +27,51 @@ Bug Fixes now been fixed and the code matches the documentation. See also https://github.com/Pylons/pyramid/issues/386 +- Literal portions of route patterns were not URL-quoted when ``route_url`` + or ``route_path`` was used. + +- The result of ``route_path`` or ``route_url`` might have been ``unicode`` + or ``str`` depending on the input. It is now guaranteed to always be + ``str``. + +- URL matching when the pattern contained non-ASCII characters in literal + parts was indeterminate. Now the pattern supplied to ``add_route`` is + assumed to be either: a ``unicode`` value, or a ``str`` value that contains + only ASCII characters. If you now want to match the path info from a URL + that contains high order characters, you can pass the Unicode + representation of the decoded path portion in the pattern. + +- When using a ``traverse=`` route predicate, traversal would fail with a + URLDecodeError if there were any high-order characters in the traversal + pattern or in the matched dynamic segments. + +Backwards Incompatibilities +--------------------------- + +- String values passed to ``route_url`` or ``route_path`` that are meant to + replace "remainder" matches will now be URL-quoted except for embedded + slashes. For example:: + + config.add_route('remain', '/foo*remainder') + request.route_path('remain', remainder='abc / def') + # -> '/foo/abc%20/%20def' + + Previously string values passed as remainder replacements were tacked on + untouched, without any URL-quoting. But this doesn't really work logically + if the value passed is Unicode (raw unicode cannot be placed in a URL or in + a path) and it is inconsistent with the rest of the URL generation + machinery if the value is a string (it won't be quoted unless by the + caller). + + Some folks will have been relying on the older behavior to tack on query + string elements and anchor portions of the URL; sorry, you'll need to + change your code to use the ``_query`` and/or ``_anchor`` arguments to + ``route_path`` or ``route_url`` to do this now. + +- If you pass a bytestring that contains non-ASCII characters to + ``add_route`` as a pattern, it will now fail at startup time. Use Unicode + instead. + 1.3a3 (2011-12-21) ================== -- cgit v1.2.3 From 92dcb5f1a52d46fec7c043a1b5b4158f3d013c34 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 5 Jan 2012 06:32:38 -0500 Subject: - Using a dynamic segment named ``traverse`` in a route pattern like this:: config.add_route('trav_route', 'traversal/{traverse:.*}') Would cause a ``UnicodeDecodeError`` when the route was matched and the matched portion of the URL contained any high-order characters. See also https://github.com/Pylons/pyramid/issues/385 . --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 93be3eab3..6116da229 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -45,6 +45,14 @@ Bug Fixes URLDecodeError if there were any high-order characters in the traversal pattern or in the matched dynamic segments. +- Using a dynamic segment named ``traverse`` in a route pattern like this:: + + config.add_route('trav_route', 'traversal/{traverse:.*}') + + Would cause a ``UnicodeDecodeError`` when the route was matched and the + matched portion of the URL contained any high-order characters. See also + https://github.com/Pylons/pyramid/issues/385 . + Backwards Incompatibilities --------------------------- -- cgit v1.2.3 From c52c927e930f44c25912c8e5d444489e95ea9d31 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 5 Jan 2012 07:16:58 -0500 Subject: garden --- CHANGES.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 6116da229..8aafeef74 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -28,7 +28,7 @@ Bug Fixes https://github.com/Pylons/pyramid/issues/386 - Literal portions of route patterns were not URL-quoted when ``route_url`` - or ``route_path`` was used. + or ``route_path`` was used to generate a URL or path. - The result of ``route_path`` or ``route_url`` might have been ``unicode`` or ``str`` depending on the input. It is now guaranteed to always be @@ -50,9 +50,16 @@ Bug Fixes config.add_route('trav_route', 'traversal/{traverse:.*}') Would cause a ``UnicodeDecodeError`` when the route was matched and the - matched portion of the URL contained any high-order characters. See also + matched portion of the URL contained any high-order characters. See https://github.com/Pylons/pyramid/issues/385 . +- When using a ``*traverse`` stararg in a route pattern, a URL that matched + that possessed a ``@@`` in its name (signifying a view name) would be + inappropriately quoted by the traversal machinery during traversal, + resulting in the view not being found properly. See + https://github.com/Pylons/pyramid/issues/382 and + https://github.com/Pylons/pyramid/issues/375 . + Backwards Incompatibilities --------------------------- -- cgit v1.2.3 From 683941663033bbac588b9ac8f1ff28eeefc511c9 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 5 Jan 2012 09:21:55 -0500 Subject: prep for 1.3a4 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 8aafeef74..339317beb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Unreleased -========== +1.3a4 (2012-01-05) +================== Features -------- -- cgit v1.2.3 From 4c29ef5be6e7bb1418ce896a92f4c8bd6d9a3111 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 6 Jan 2012 02:16:03 -0500 Subject: - The ``pyramid.view.view_defaults`` decorator did not work properly when more than one view relied on the defaults being different for configuration conflict resolution. See https://github.com/Pylons/pyramid/issues/394. Closes #394. --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 339317beb..d5ef9dd29 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,13 @@ +Next release +============ + +Bug Fixes +--------- + +- The ``pyramid.view.view_defaults`` decorator did not work properly when + more than one view relied on the defaults being different for configuration + conflict resolution. See https://github.com/Pylons/pyramid/issues/394. + 1.3a4 (2012-01-05) ================== -- cgit v1.2.3 From a5d9943f643f9d4fd7a25f1a9722bf385430b768 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 6 Jan 2012 18:35:18 -0500 Subject: - The ``path_info`` route and view predicates now match against ``request.upath_info`` (Unicode) rather than ``request.path_info`` (indeterminate value based on Python 3 vs. Python 2). This has to be done to normalize matching on Python 2 and Python 3. --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index d5ef9dd29..65e6cceec 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,14 @@ Bug Fixes more than one view relied on the defaults being different for configuration conflict resolution. See https://github.com/Pylons/pyramid/issues/394. +Backwards Incompatibilities +--------------------------- + +- The ``path_info`` route and view predicates now match against + ``request.upath_info`` (Unicode) rather than ``request.path_info`` + (indeterminate value based on Python 3 vs. Python 2). This has to be done + to normalize matching on Python 2 and Python 3. + 1.3a4 (2012-01-05) ================== -- cgit v1.2.3 From cf3a11e990adda800e284effb006f1c28335da4d Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 9 Jan 2012 03:49:46 -0500 Subject: prep for 1.3a5 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 65e6cceec..8950e75a2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.3a5 (2012-01-09) +================== Bug Fixes --------- -- cgit v1.2.3 From 6c2e8fb0f75939ebff014a7bf16500003ab9f1af Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Wed, 11 Jan 2012 02:30:57 -0600 Subject: Updated the changelogs. --- CHANGES.txt | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 8950e75a2..a755f6418 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,14 @@ +Unreleased +========== + +Features +-------- + +- New API: ``pyramid.config.Configurator.set_request_property``. Add lazy + property descriptors to a request without changing the request factory. + This method provides conflict detection and is the suggested way to add + properties to a request. + 1.3a5 (2012-01-09) ================== @@ -25,7 +36,7 @@ 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 + of the instance. Common use-cases for this would be to get a database connection for the request or identify the current user. - Use the ``waitress`` WSGI server instead of ``wsgiref`` in scaffolding. -- cgit v1.2.3 From 83086463eb6f129fe7d02d90b866eb6780581da2 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 16 Jan 2012 15:31:17 -0500 Subject: - Responses generated by Pyramid's ``static_view`` now use a ``wsgi.file_wrapper`` (see http://www.python.org/dev/peps/pep-0333/#optional-platform-specific-file-handling) when one is provided by the web server. --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index a755f6418..fc7fc1cab 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,11 @@ Features This method provides conflict detection and is the suggested way to add properties to a request. +- Responses generated by Pyramid's ``static_view`` now use + a ``wsgi.file_wrapper`` (see + http://www.python.org/dev/peps/pep-0333/#optional-platform-specific-file-handling) + when one is provided by the web server. + 1.3a5 (2012-01-09) ================== -- cgit v1.2.3 From 87233a673f112a72c2d778868d413991a9fb1470 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 19 Jan 2012 03:48:09 -0500 Subject: garden --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index fc7fc1cab..ba90c3bad 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,6 +14,13 @@ Features http://www.python.org/dev/peps/pep-0333/#optional-platform-specific-file-handling) when one is provided by the web server. +Bug Fixes +--------- + +- Views registered with an ``accept`` could not be overridden correctly with + a different view that had the same predicate arguments. See + https://github.com/Pylons/pyramid/pull/404 for more information. + 1.3a5 (2012-01-09) ================== -- cgit v1.2.3 From 134388a0157728b1f96daa09fb8bdfde6a1de209 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 19 Jan 2012 04:24:00 -0500 Subject: - When using a dotted name for a ``view`` argument to ``Configurator.add_view`` that pointed to a class with a ``view_defaults`` decorator, the view defaults would not be applied. See https://github.com/Pylons/pyramid/issues/396 . Fixes #396. --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index ba90c3bad..bfafaaae3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -21,6 +21,11 @@ Bug Fixes a different view that had the same predicate arguments. See https://github.com/Pylons/pyramid/pull/404 for more information. +- When using a dotted name for a ``view`` argument to + ``Configurator.add_view`` that pointed to a class with a ``view_defaults`` + decorator, the view defaults would not be applied. See + https://github.com/Pylons/pyramid/issues/396 . + 1.3a5 (2012-01-09) ================== -- cgit v1.2.3 From 05f462e9792d9b5f6560968503795dc162984408 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 19 Jan 2012 20:36:45 -0500 Subject: Backport fix for issue #407 to 1.3 branch. --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index bfafaaae3..c1b6ae976 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -26,6 +26,9 @@ Bug Fixes decorator, the view defaults would not be applied. See https://github.com/Pylons/pyramid/issues/396 . +- Static URL paths were URL-quoted twice. See + https://github.com/Pylons/pyramid/issues/407 . + 1.3a5 (2012-01-09) ================== -- cgit v1.2.3 From a41c8ca521ba983594364b1eb1f6c6025149fbe7 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 20 Jan 2012 10:53:55 -0500 Subject: prep for 1.3a6 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index c1b6ae976..ea86526b0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Unreleased -========== +1.3a6 (2012-01-20) +================== Features -------- -- cgit v1.2.3 From ea68d2097e03ad2c9f93b4339ff0da1c9677e306 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 21 Jan 2012 16:56:46 -0500 Subject: - The process will now restart when ``pserve`` is used with the ``--reload`` flag when the ``development.ini`` file (any any other .ini file in use) is changed. See https://github.com/Pylons/pyramid/issues/377 and https://github.com/Pylons/pyramid/pull/411 Fixes #377. --- CHANGES.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index ea86526b0..5f55c7f72 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,14 @@ +Next release +============ + +Bug Fixes +--------- + +- The process will now restart when ``pserve`` is used with the ``--reload`` + flag when the ``development.ini`` file (any any other .ini file in use) is + changed. See https://github.com/Pylons/pyramid/issues/377 and + https://github.com/Pylons/pyramid/pull/411 + 1.3a6 (2012-01-20) ================== -- cgit v1.2.3 From 8a36219597ec555c4ed95561ada7e5682a1605f7 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 21 Jan 2012 17:25:19 -0500 Subject: - The ``prequest`` script would fail when used against URLs which did not return HTML or text. See https://github.com/Pylons/pyramid/issues/381 Fixes #381. --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 5f55c7f72..c64ed47e7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,9 @@ Bug Fixes changed. See https://github.com/Pylons/pyramid/issues/377 and https://github.com/Pylons/pyramid/pull/411 +- The ``prequest`` script would fail when used against URLs which did not + return HTML or text. See https://github.com/Pylons/pyramid/issues/381 + 1.3a6 (2012-01-20) ================== -- cgit v1.2.3 From a3a71196b3f105b48caf0ce0f28e10cc02d9012e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 21 Jan 2012 17:41:25 -0500 Subject: garden --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index c64ed47e7..81f420a84 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -5,7 +5,7 @@ Bug Fixes --------- - The process will now restart when ``pserve`` is used with the ``--reload`` - flag when the ``development.ini`` file (any any other .ini file in use) is + flag when the ``development.ini`` file (or any other .ini file in use) is changed. See https://github.com/Pylons/pyramid/issues/377 and https://github.com/Pylons/pyramid/pull/411 -- cgit v1.2.3 From f8bfc6ceed3b6d059749c4baf2feec71a8211694 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 22 Jan 2012 00:28:47 -0500 Subject: - More informative error message when a ``config.include`` cannot find an ``includeme``. See https://github.com/Pylons/pyramid/pull/392. Closes #392. --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 81f420a84..2a8515d01 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,12 @@ Next release ============ +Features +-------- + +- More informative error message when a ``config.include`` cannot find an + ``includeme``. See https://github.com/Pylons/pyramid/pull/392. + Bug Fixes --------- -- cgit v1.2.3 From 7cf063bdf49c07debd4e9e961ee0b6670b9d1685 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 30 Jan 2012 18:41:24 -0500 Subject: garden --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 2a8515d01..9edcbdbe8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -18,6 +18,11 @@ Bug Fixes - The ``prequest`` script would fail when used against URLs which did not return HTML or text. See https://github.com/Pylons/pyramid/issues/381 +Documentation +------------- + +- Add a traversal hello world example to the narrative docs. + 1.3a6 (2012-01-20) ================== -- cgit v1.2.3 From 22e0aae7ebb0963b1322af146c52830226941f60 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 7 Feb 2012 01:11:19 -0500 Subject: - Internal: catch unhashable discriminators early (raise an error instead of allowing them to find their way into resolveConflicts). --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 9edcbdbe8..7d20796e1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,9 @@ Features - More informative error message when a ``config.include`` cannot find an ``includeme``. See https://github.com/Pylons/pyramid/pull/392. +- Internal: catch unhashable discriminators early (raise an error instead of + allowing them to find their way into resolveConflicts). + Bug Fixes --------- -- cgit v1.2.3 From 835d4812d3b5e37c54325b992f66ba45714d56cb Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 6 Feb 2012 23:37:37 -0600 Subject: Modified match_param to accept a tuple. Fixes #425. --- CHANGES.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 7d20796e1..8bfdc6d66 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,6 +10,10 @@ Features - Internal: catch unhashable discriminators early (raise an error instead of allowing them to find their way into resolveConflicts). +- The `match_param` view predicate now accepts a string or a tuple. + This replaces the broken behavior of accepting a dict. See + https://github.com/Pylons/pyramid/issues/425 for more information. + Bug Fixes --------- @@ -21,6 +25,13 @@ Bug Fixes - The ``prequest`` script would fail when used against URLs which did not return HTML or text. See https://github.com/Pylons/pyramid/issues/381 +Backwards Incompatibilities +--------------------------- + +- The `match_param` view predicate no longer accepts a dict. This will + have no negative affect because the implementation was broken for + dict-based arguments. + Documentation ------------- -- cgit v1.2.3 From e3f9d0e6ea3c98699de7b60bc3900b1a40fcba19 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 8 Feb 2012 00:05:31 -0500 Subject: prep for 1.3a7 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 8bfdc6d66..d76f7087a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.3a7 (2012-02-07) +================== Features -------- -- cgit v1.2.3 From e4b8fa632c5d2b020e168f4efe3d7c00049a279f Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 9 Feb 2012 00:12:26 -0500 Subject: Features -------- - The ``scan`` method of a ``Configurator`` can be passed an ``ignore`` argument, which can be a string, a callable, or a list consisting of strings and/or callables. This feature allows submodules, subpackages, and global objects from being scanned. See http://readthedocs.org/docs/venusian/en/latest/#ignore-scan-argument for more information about how to use the ``ignore`` argument to ``scan``. Dependencies ------------ - Depend on ``venusian`` >= 1.0a3 to provide scan ``ignore`` support. --- CHANGES.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index d76f7087a..fcd54217f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,21 @@ +Next release +============ + +Features +-------- + +- The ``scan`` method of a ``Configurator`` can be passed an ``ignore`` + argument, which can be a string, a callable, or a list consisting of + strings and/or callables. This feature allows submodules, subpackages, and + global objects from being scanned. See + http://readthedocs.org/docs/venusian/en/latest/#ignore-scan-argument for + more information about how to use the ``ignore`` argument to ``scan``. + +Dependencies +------------ + +- Depend on ``venusian`` >= 1.0a3 to provide scan ``ignore`` support. + 1.3a7 (2012-02-07) ================== -- cgit v1.2.3 From af24f7d5f69a74f9887ca6df622ef67c69075988 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 14 Feb 2012 04:13:41 -0500 Subject: - Better error messages when a view callable returns a value that cannot be converted to a response (for example, when a view callable returns a dictionary without a renderer defined, or doesn't return any value at all). The error message now contains information about the view callable itself as well as the result of calling it. --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index fcd54217f..411681d81 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,6 +11,12 @@ Features http://readthedocs.org/docs/venusian/en/latest/#ignore-scan-argument for more information about how to use the ``ignore`` argument to ``scan``. +- Better error messages when a view callable returns a value that cannot be + converted to a response (for example, when a view callable returns a + dictionary without a renderer defined, or doesn't return any value at all). + The error message now contains information about the view callable itself + as well as the result of calling it. + Dependencies ------------ -- cgit v1.2.3 From 5ad401ad0b7692e55c21662416642b8ac0fde449 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 14 Feb 2012 05:23:25 -0500 Subject: - Better error message when a .pyc-only module is ``config.include`` -ed. This is not permitted due to error reporting requirements, and a better error message is shown when it is attempted. Previously it would fail with something like "AttributeError: 'NoneType' object has no attribute 'rfind'". Fixed #420. --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 411681d81..6bea84e2f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -17,6 +17,12 @@ Features The error message now contains information about the view callable itself as well as the result of calling it. +- Better error message when a .pyc-only module is ``config.include`` -ed. + This is not permitted due to error reporting requirements, and a better + error message is shown when it is attempted. Previously it would fail with + something like "AttributeError: 'NoneType' object has no attribute + 'rfind'". + Dependencies ------------ -- cgit v1.2.3 From c6a299ad7159ffcabe201fa79f485c388d837971 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 14 Feb 2012 05:57:06 -0500 Subject: - Don't create a ``session`` instance in SQLA Wiki tutorial, use raw ``DBSession`` instead (this is more common in real SQLA apps). --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 6bea84e2f..a69313a8a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -23,6 +23,12 @@ Features something like "AttributeError: 'NoneType' object has no attribute 'rfind'". +Documentation +------------- + +- Don't create a ``session`` instance in SQLA Wiki tutorial, use raw + ``DBSession`` instead (this is more common in real SQLA apps). + Dependencies ------------ -- cgit v1.2.3 From 748aad47f90136b151be13f477ed6af1caed0493 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 15 Feb 2012 19:09:08 -0500 Subject: - Add ``pyramid.config.Configurator.set_traverser`` API method. See the Hooks narrative documentation section entitled "Changing the Traverser" for more information. This is not a new feature, it just provides an API for adding a traverser without needing to use the ZCA API. --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index a69313a8a..0bb2c164b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -23,6 +23,11 @@ Features something like "AttributeError: 'NoneType' object has no attribute 'rfind'". +- Add ``pyramid.config.Configurator.set_traverser`` API method. See the + Hooks narrative documentation section entitled "Changing the Traverser" for + more information. This is not a new feature, it just provides an API for + adding a traverser without needing to use the ZCA API. + Documentation ------------- -- cgit v1.2.3 From 4786cae2e7a053b01091b5e185102f9c26885b08 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 15 Feb 2012 19:32:46 -0500 Subject: - The system value ``r`` is now supplied to renderers as an alias for ``request``. This means that you can now, for example, in a template, do ``r.route_url(...)`` instead of ``request.route_url(...)``. Fixes #413. --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 0bb2c164b..d9106ddb9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -28,6 +28,10 @@ Features more information. This is not a new feature, it just provides an API for adding a traverser without needing to use the ZCA API. +- The system value ``r`` is now supplied to renderers as an alias for + ``request``. This means that you can now, for example, in a template, do + ``r.route_url(...)`` instead of ``request.route_url(...)``. + Documentation ------------- -- cgit v1.2.3 From 2a75f355dcf60ce1c8f537b4dfa35dbc15554661 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 15 Feb 2012 19:33:45 -0500 Subject: add sentence --- CHANGES.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index d9106ddb9..93ba8a199 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -30,7 +30,9 @@ Features - The system value ``r`` is now supplied to renderers as an alias for ``request``. This means that you can now, for example, in a template, do - ``r.route_url(...)`` instead of ``request.route_url(...)``. + ``r.route_url(...)`` instead of ``request.route_url(...)``. This is purely + a change to reduce the amount of typing required to reference request + methods from within templates. Documentation ------------- -- cgit v1.2.3 From b2ea4c88b8b3bc9ed657160d8a888780d6c41844 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 15 Feb 2012 22:06:30 -0500 Subject: Use req instead of r for #413. It's more likely that somebody is already passing something named r, and a template may depend on its existence or nonexistence to conditionalize rendering a bit of html. --- CHANGES.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 93ba8a199..26d547ae6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -28,11 +28,12 @@ Features more information. This is not a new feature, it just provides an API for adding a traverser without needing to use the ZCA API. -- The system value ``r`` is now supplied to renderers as an alias for +- The system value ``req`` is now supplied to renderers as an alias for ``request``. This means that you can now, for example, in a template, do - ``r.route_url(...)`` instead of ``request.route_url(...)``. This is purely - a change to reduce the amount of typing required to reference request - methods from within templates. + ``req.route_url(...)`` instead of ``request.route_url(...)``. This is + purely a change to reduce the amount of typing required to use request + methods and attributes from within templates. The value ``request`` is + still available too, this is just an alternative. Documentation ------------- -- cgit v1.2.3 From c51896756eeffc7e8c50ad71300ec355ae47465a Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 17 Feb 2012 01:08:42 -0500 Subject: Features -------- - Add ``pyramid.config.Configurator.add_resource_url_adapter`` API method. See the Hooks narrative documentation section entitled "Changing How pyramid.request.Request.resource_url Generates a URL" for more information. This is not a new feature, it just provides an API for adding a resource url adapter without needing to use the ZCA API. - A new interface was added: ``pyramid.interfaces.IResourceURL``. An adapter implementing its interface can be used to override resource URL generation when ``request.resource_url`` is called. This interface replaces the now-deprecated ``pyramid.interfaces.IContextURL`` interface. - The dictionary passed to a resource's ``__resource_url__`` method (see "Overriding Resource URL Generation" in the "Resources" chapter) now contains an ``app_url`` key, representing the application URL generated during ``request.resource_url``. It represents a potentially customized URL prefix, containing potentially custom scheme, host and port information passed by the user to ``request.resource_url``. It should be used instead of ``request.application_url`` where necessary. - The ``request.resource_url`` API now accepts these arguments: ``app_url``, ``scheme``, ``host``, and ``port``. The app_url argument can be used to replace the URL prefix wholesale during url generation. The ``scheme``, ``host``, and ``port`` arguments can be used to replace the respective default values of ``request.application_url`` partially. - A new API named ``request.resource_path`` now exists. It works like ``request.resource_url`` but produces a relative URL rather than an absolute one. - The ``request.route_url`` API now accepts these arguments: ``_app_url``, ``_scheme``, ``_host``, and ``_port``. The ``_app_url`` argument can be used to replace the URL prefix wholesale during url generation. The ``_scheme``, ``_host``, and ``_port`` arguments can be used to replace the respective default values of ``request.application_url`` partially. Backwards Incompatibilities --------------------------- - The ``pyramid.interfaces.IContextURL`` interface has been deprecated. People have been instructed to use this to register a resource url adapter in the "Hooks" chapter to use to influence ``request.resource_url`` URL generation for resources found via custom traversers since Pyramid 1.0. The interface still exists and registering such an adapter still works, but this interface will be removed from the software after a few major Pyramid releases. You should replace it with an equivalent ``pyramid.interfaces.IResourceURL`` adapter, registered using the new ``pyramid.config.Configurator.add_resource_url_adapter`` API. A deprecation warning is now emitted when a ``pyramid.interfaces.IContextURL`` adapter is found when ``request.resource_url`` is called. Misc ---- - Change ``set_traverser`` API name to ``add_traverser``. Ref #438. --- CHANGES.txt | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 26d547ae6..22f8320f9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -23,11 +23,17 @@ Features something like "AttributeError: 'NoneType' object has no attribute 'rfind'". -- Add ``pyramid.config.Configurator.set_traverser`` API method. See the +- Add ``pyramid.config.Configurator.add_traverser`` API method. See the Hooks narrative documentation section entitled "Changing the Traverser" for more information. This is not a new feature, it just provides an API for adding a traverser without needing to use the ZCA API. +- Add ``pyramid.config.Configurator.add_resource_url_adapter`` API method. + See the Hooks narrative documentation section entitled "Changing How + pyramid.request.Request.resource_url Generates a URL" for more information. + This is not a new feature, it just provides an API for adding a resource + url adapter without needing to use the ZCA API. + - The system value ``req`` is now supplied to renderers as an alias for ``request``. This means that you can now, for example, in a template, do ``req.route_url(...)`` instead of ``request.route_url(...)``. This is @@ -35,6 +41,52 @@ Features methods and attributes from within templates. The value ``request`` is still available too, this is just an alternative. +- A new interface was added: ``pyramid.interfaces.IResourceURL``. An adapter + implementing its interface can be used to override resource URL generation + when ``request.resource_url`` is called. This interface replaces the + now-deprecated ``pyramid.interfaces.IContextURL`` interface. + +- The dictionary passed to a resource's ``__resource_url__`` method (see + "Overriding Resource URL Generation" in the "Resources" chapter) now + contains an ``app_url`` key, representing the application URL generated + during ``request.resource_url``. It represents a potentially customized + URL prefix, containing potentially custom scheme, host and port information + passed by the user to ``request.resource_url``. It should be used instead + of ``request.application_url`` where necessary. + +- The ``request.resource_url`` API now accepts these arguments: ``app_url``, + ``scheme``, ``host``, and ``port``. The app_url argument can be used to + replace the URL prefix wholesale during url generation. The ``scheme``, + ``host``, and ``port`` arguments can be used to replace the respective + default values of ``request.application_url`` partially. + +- A new API named ``request.resource_path`` now exists. It works like + ``request.resource_url`` but produces a relative URL rather than an + absolute one. + +- The ``request.route_url`` API now accepts these arguments: ``_app_url``, + ``_scheme``, ``_host``, and ``_port``. The ``_app_url`` argument can be + used to replace the URL prefix wholesale during url generation. The + ``_scheme``, ``_host``, and ``_port`` arguments can be used to replace the + respective default values of ``request.application_url`` partially. + +Backwards Incompatibilities +--------------------------- + +- The ``pyramid.interfaces.IContextURL`` interface has been deprecated. + People have been instructed to use this to register a resource url adapter + in the "Hooks" chapter to use to influence ``request.resource_url`` URL + generation for resources found via custom traversers since Pyramid 1.0. + + The interface still exists and registering such an adapter still works, but + this interface will be removed from the software after a few major Pyramid + releases. You should replace it with an equivalent + ``pyramid.interfaces.IResourceURL`` adapter, registered using the new + ``pyramid.config.Configurator.add_resource_url_adapter`` API. A + deprecation warning is now emitted when a + ``pyramid.interfaces.IContextURL`` adapter is found when + ``request.resource_url`` is called. + Documentation ------------- -- cgit v1.2.3 From d21ba4b61e901b27ceae36f29dac23387a8129d5 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 19 Feb 2012 11:05:33 -0500 Subject: - Put ``pyramid.includes`` targets within ini files in scaffolds on separate lines in order to be able to tell people to comment out only the ``pyramid_debugtoolbar`` line when they want to disable the toolbar. --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 22f8320f9..feba9156e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -93,6 +93,13 @@ Documentation - Don't create a ``session`` instance in SQLA Wiki tutorial, use raw ``DBSession`` instead (this is more common in real SQLA apps). +Scaffolding +----------- + +- Put ``pyramid.includes`` targets within ini files in scaffolds on separate + lines in order to be able to tell people to comment out only the + ``pyramid_debugtoolbar`` line when they want to disable the toolbar. + Dependencies ------------ -- cgit v1.2.3 From d679fac8a17d3eaf1cca9a4edaf37b4e56f1d010 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 19 Feb 2012 12:55:35 -0500 Subject: - Create a "MakoRendererFactoryHelper" that provides customizable settings key prefixes. Allows settings prefixes other than "mako." to be used to create different factories that don't use the global mako settings. This will be useful for the debug toolbar, which can currently be sabotaged by someone using custom mako configuration settings. --- CHANGES.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index feba9156e..f3ba85cc3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -105,6 +105,15 @@ Dependencies - Depend on ``venusian`` >= 1.0a3 to provide scan ``ignore`` support. +Internal +-------- + +- Create a "MakoRendererFactoryHelper" that provides customizable settings + key prefixes. Allows settings prefixes other than "mako." to be used to + create different factories that don't use the global mako settings. This + will be useful for the debug toolbar, which can currently be sabotaged by + someone using custom mako configuration settings. + 1.3a7 (2012-02-07) ================== -- cgit v1.2.3 From 51919e05d9c251f7f80a4736be2b822eafc5d189 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 19 Feb 2012 17:54:27 -0500 Subject: prep for 1.3a8 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index f3ba85cc3..1df924b4c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.3a8 (2012-02-19) +================== Features -------- -- cgit v1.2.3 From 844ed90133f051d013330cb0ed4c95dbb29eecc1 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 20 Feb 2012 12:41:47 -0500 Subject: Features -------- - Add an ``introspection`` boolean to the Configurator constructor. If this is ``True``, actions registered using the Configurator will be registered with the introspector. If it is ``False``, they won't. The default is ``True``. Setting it to ``False`` during action processing will prevent introspection for any following registration statements, and setting it to ``True`` will start them up again. This addition is to service a requirement that the debug toolbar's own views and methods not show up in the introspector. Backwards Incompatibilities --------------------------- - Remove ``pyramid.config.Configurator.with_context`` class method. It was never an API, it is only used by ``pyramid_zcml`` and its functionality has been moved to that package's latest release. This means that you'll need to use the latest release of ``pyramid_zcml`` with this release of Pyramid. - The ``introspector`` argument to the ``pyramid.config.Configurator`` constructor API has been removed. It has been replaced by the boolean ``introspection`` flag. - The ``pyramid.registry.noop_introspector`` API object has been removed. --- CHANGES.txt | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 1df924b4c..239e1326f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,32 @@ +Next release +============ + +Features +-------- + +- Add an ``introspection`` boolean to the Configurator constructor. If this + is ``True``, actions registered using the Configurator will be registered + with the introspector. If it is ``False``, they won't. The default is + ``True``. Setting it to ``False`` during action processing will prevent + introspection for any following registration statements, and setting it to + ``True`` will start them up again. This addition is to service a + requirement that the debug toolbar's own views and methods not show up in + the introspector. + +Backwards Incompatibilities +--------------------------- + +- Remove ``pyramid.config.Configurator.with_context`` class method. It was + never an API, it is only used by ``pyramid_zcml`` and its functionality has + been moved to that package's latest release. This means that you'll need + to use the latest release of ``pyramid_zcml`` with this release of Pyramid. + +- The ``introspector`` argument to the ``pyramid.config.Configurator`` + constructor API has been removed. It has been replaced by the boolean + ``introspection`` flag. + +- The ``pyramid.registry.noop_introspector`` API object has been removed. + 1.3a8 (2012-02-19) ================== -- cgit v1.2.3 From 5ca6a9541aa995414e55443503f0f2148c8eb4ba Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 20 Feb 2012 13:36:35 -0500 Subject: provide version number --- CHANGES.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 239e1326f..076541221 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -19,7 +19,8 @@ Backwards Incompatibilities - Remove ``pyramid.config.Configurator.with_context`` class method. It was never an API, it is only used by ``pyramid_zcml`` and its functionality has been moved to that package's latest release. This means that you'll need - to use the latest release of ``pyramid_zcml`` with this release of Pyramid. + to use the latest release of ``pyramid_zcml`` (0.9.2+) with this release of + Pyramid. - The ``introspector`` argument to the ``pyramid.config.Configurator`` constructor API has been removed. It has been replaced by the boolean -- cgit v1.2.3 From 40301d8132a3f633dc0b5e941e8bd82a29f0fb36 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 20 Feb 2012 14:13:59 -0500 Subject: garden --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 076541221..e8b2326e4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -19,7 +19,7 @@ Backwards Incompatibilities - Remove ``pyramid.config.Configurator.with_context`` class method. It was never an API, it is only used by ``pyramid_zcml`` and its functionality has been moved to that package's latest release. This means that you'll need - to use the latest release of ``pyramid_zcml`` (0.9.2+) with this release of + to use the 0.9.2 or later release of ``pyramid_zcml`` with this release of Pyramid. - The ``introspector`` argument to the ``pyramid.config.Configurator`` -- cgit v1.2.3 From 22bae974cf49a80fd60bfe51b110ee00e91e729b Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 20 Feb 2012 21:27:19 -0500 Subject: - The static file response object used by ``config.add_static_view`` opened the static file twice, when it only needed to open it once. --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index e8b2326e4..8595e726e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -28,6 +28,12 @@ Backwards Incompatibilities - The ``pyramid.registry.noop_introspector`` API object has been removed. +Bug Fixes +--------- + +- The static file response object used by ``config.add_static_view`` opened + the static file twice, when it only needed to open it once. + 1.3a8 (2012-02-19) ================== -- cgit v1.2.3 From 0db4a157083d51251b4d3f574a1699fc76359c9d Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 22 Feb 2012 15:37:50 -0500 Subject: - New API: ``pyramid.config.Configurator.add_notfound_view``. This is a wrapper for ``pyramid.Config.configurator.add_view`` which provides easy append_slash support. It should be preferred over calling ``add_view`` directly with ``context=HTTPNotFound`` as was previously recommended. - New API: ``pyramid.view.notfound_view_config``. This is a decorator constructor like ``pyramid.view.view_config`` that calls ``pyramid.config.Configurator.add_notfound_view`` when scanned. It should be preferred over using ``pyramid.view.view_config`` with ``context=HTTPNotFound`` as was previously recommended. - The older deprecated ``set_notfound_view`` Configurator method is now an alias for the new ``add_notfound_view`` Configurator method. This has the following impact: the ``context`` sent to views with a ``(context, request)`` call signature registered via the deprecated ``add_notfound_view``/``set_notfound_view`` will now be the HTTPNotFound exception object instead of the actual resource context found. Use ``request.context`` to get the actual resource context. It's also recommended to disuse ``set_notfound_view`` in favor of ``add_notfound_view``, despite the aliasing. - The API documentation for ``pyramid.view.append_slash_notfound_view`` and ``pyramid.view.AppendSlashNotFoundViewFactory`` was removed. These names still exist and are still importable, but they are no longer APIs. Use ``pyramid.config.Configurator.add_notfound_view(append_slash=True)`` or ``pyramid.view.notfound_view_config(append_slash=True)`` to get the same behavior. - The ``set_forbidden_view`` method of the Configurator was removed from the documentation. It has been deprecated since Pyramid 1.1. - The AppendSlashNotFoundViewFactory used request.path to match routes. This was wrong because request.path contains the script name, and this would cause it to fail in circumstances where the script name was not empty. It should have used request.path_info, and now does. - Updated the "Registering a Not Found View" section of the "Hooks" chapter, replacing explanations of registering a view using ``add_view`` or ``view_config`` with ones using ``add_notfound_view`` or ``notfound_view_config``. - Updated the "Redirecting to Slash-Appended Routes" section of the "URL Dispatch" chapter, replacing explanations of registering a view using ``add_view`` or ``view_config`` with ones using ``add_notfound_view`` or ``notfound_view_config`` --- CHANGES.txt | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 8595e726e..efeba0447 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -13,6 +13,17 @@ Features requirement that the debug toolbar's own views and methods not show up in the introspector. +- New API: ``pyramid.config.Configurator.add_notfound_view``. This is a + wrapper for ``pyramid.Config.configurator.add_view`` which provides easy + append_slash support. It should be preferred over calling ``add_view`` + directly with ``context=HTTPNotFound`` as was previously recommended. + +- New API: ``pyramid.view.notfound_view_config``. This is a decorator + constructor like ``pyramid.view.view_config`` that calls + ``pyramid.config.Configurator.add_notfound_view`` when scanned. It should + be preferred over using ``pyramid.view.view_config`` with + ``context=HTTPNotFound`` as was previously recommended. + Backwards Incompatibilities --------------------------- @@ -28,12 +39,53 @@ Backwards Incompatibilities - The ``pyramid.registry.noop_introspector`` API object has been removed. +- The older deprecated ``set_notfound_view`` Configurator method is now an + alias for the new ``add_notfound_view`` Configurator method. This has the + following impact: the ``context`` sent to views with a ``(context, + request)`` call signature registered via the deprecated + ``add_notfound_view``/``set_notfound_view`` will now be the HTTPNotFound + exception object instead of the actual resource context found. Use + ``request.context`` to get the actual resource context. It's also + recommended to disuse ``set_notfound_view`` in favor of + ``add_notfound_view``, despite the aliasing. + +Deprecations +------------ + +- The API documentation for ``pyramid.view.append_slash_notfound_view`` and + ``pyramid.view.AppendSlashNotFoundViewFactory`` was removed. These names + still exist and are still importable, but they are no longer APIs. Use + ``pyramid.config.Configurator.add_notfound_view(append_slash=True)`` or + ``pyramid.view.notfound_view_config(append_slash=True)`` to get the same + behavior. + +- The ``set_forbidden_view`` method of the Configurator was removed from the + documentation. It has been deprecated since Pyramid 1.1. + Bug Fixes --------- - The static file response object used by ``config.add_static_view`` opened the static file twice, when it only needed to open it once. +- The AppendSlashNotFoundViewFactory used request.path to match routes. This + was wrong because request.path contains the script name, and this would + cause it to fail in circumstances where the script name was not empty. It + should have used request.path_info, and now does. + +Documentation +------------- + +- Updated the "Registering a Not Found View" section of the "Hooks" chapter, + replacing explanations of registering a view using ``add_view`` or + ``view_config`` with ones using ``add_notfound_view`` or + ``notfound_view_config``. + +- Updated the "Redirecting to Slash-Appended Routes" section of the "URL + Dispatch" chapter, replacing explanations of registering a view using + ``add_view`` or ``view_config`` with ones using ``add_notfound_view`` or + ``notfound_view_config`` + 1.3a8 (2012-02-19) ================== -- cgit v1.2.3 From a7fe30f0eabd6c6fd3bcc910faa41720a75056de Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 22 Feb 2012 19:24:09 -0500 Subject: - New API: ``pyramid.config.Configurator.add_forbidden_view``. This is a wrapper for ``pyramid.Config.configurator.add_view`` which does the right thing about permissions. It should be preferred over calling ``add_view`` directly with ``context=HTTPForbidden`` as was previously recommended. - New API: ``pyramid.view.forbidden_view_config``. This is a decorator constructor like ``pyramid.view.view_config`` that calls ``pyramid.config.Configurator.add_forbidden_view`` when scanned. It should be preferred over using ``pyramid.view.view_config`` with ``context=HTTPForbidden`` as was previously recommended. - Updated the "Creating a Not Forbidden View" section of the "Hooks" chapter, replacing explanations of registering a view using ``add_view`` or ``view_config`` with ones using ``add_forbidden_view`` or ``forbidden_view_config``. - Updated all tutorials to use ``pyramid.view.forbidden_view_config`` rather than ``pyramid.view.view_config`` with an HTTPForbidden context. --- CHANGES.txt | 45 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 11 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index efeba0447..39bf59210 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -15,8 +15,9 @@ Features - New API: ``pyramid.config.Configurator.add_notfound_view``. This is a wrapper for ``pyramid.Config.configurator.add_view`` which provides easy - append_slash support. It should be preferred over calling ``add_view`` - directly with ``context=HTTPNotFound`` as was previously recommended. + append_slash support and does the right thing about permissions. It should + be preferred over calling ``add_view`` directly with + ``context=HTTPNotFound`` as was previously recommended. - New API: ``pyramid.view.notfound_view_config``. This is a decorator constructor like ``pyramid.view.view_config`` that calls @@ -24,6 +25,17 @@ Features be preferred over using ``pyramid.view.view_config`` with ``context=HTTPNotFound`` as was previously recommended. +- New API: ``pyramid.config.Configurator.add_forbidden_view``. This is a + wrapper for ``pyramid.Config.configurator.add_view`` which does the right + thing about permissions. It should be preferred over calling ``add_view`` + directly with ``context=HTTPForbidden`` as was previously recommended. + +- New API: ``pyramid.view.forbidden_view_config``. This is a decorator + constructor like ``pyramid.view.view_config`` that calls + ``pyramid.config.Configurator.add_forbidden_view`` when scanned. It should + be preferred over using ``pyramid.view.view_config`` with + ``context=HTTPForbidden`` as was previously recommended. + Backwards Incompatibilities --------------------------- @@ -40,14 +52,16 @@ Backwards Incompatibilities - The ``pyramid.registry.noop_introspector`` API object has been removed. - The older deprecated ``set_notfound_view`` Configurator method is now an - alias for the new ``add_notfound_view`` Configurator method. This has the - following impact: the ``context`` sent to views with a ``(context, - request)`` call signature registered via the deprecated - ``add_notfound_view``/``set_notfound_view`` will now be the HTTPNotFound - exception object instead of the actual resource context found. Use + alias for the new ``add_notfound_view`` Configurator method. Likewise, the + older deprecated ``set_forbidden_view`` is now an alias for the new + ``add_forbidden_view``. This has the following impact: the ``context`` sent + to views with a ``(context, request)`` call signature registered via the + ``set_notfound_view`` or ``set_forbidden_view`` will now be an exception + object instead of the actual resource context found. Use ``request.context`` to get the actual resource context. It's also recommended to disuse ``set_notfound_view`` in favor of - ``add_notfound_view``, despite the aliasing. + ``add_notfound_view``, and disuse ``set_forbidden_view`` in favor of + ``add_forbidden_view`` despite the aliasing. Deprecations ------------ @@ -59,8 +73,9 @@ Deprecations ``pyramid.view.notfound_view_config(append_slash=True)`` to get the same behavior. -- The ``set_forbidden_view`` method of the Configurator was removed from the - documentation. It has been deprecated since Pyramid 1.1. +- The ``set_forbidden_view`` and ``set_notfound_view`` methods of the + Configurator were removed from the documentation. They have been + deprecated since Pyramid 1.1. Bug Fixes --------- @@ -76,16 +91,24 @@ Bug Fixes Documentation ------------- -- Updated the "Registering a Not Found View" section of the "Hooks" chapter, +- Updated the "Creating a Not Found View" section of the "Hooks" chapter, replacing explanations of registering a view using ``add_view`` or ``view_config`` with ones using ``add_notfound_view`` or ``notfound_view_config``. +- Updated the "Creating a Not Forbidden View" section of the "Hooks" chapter, + replacing explanations of registering a view using ``add_view`` or + ``view_config`` with ones using ``add_forbidden_view`` or + ``forbidden_view_config``. + - Updated the "Redirecting to Slash-Appended Routes" section of the "URL Dispatch" chapter, replacing explanations of registering a view using ``add_view`` or ``view_config`` with ones using ``add_notfound_view`` or ``notfound_view_config`` +- Updated all tutorials to use ``pyramid.view.forbidden_view_config`` rather + than ``pyramid.view.view_config`` with an HTTPForbidden context. + 1.3a8 (2012-02-19) ================== -- cgit v1.2.3 From 6b3cca0d548c0c3bcec62902f5b261df4e7c1d1e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 22 Feb 2012 20:02:03 -0500 Subject: - New APIs: ``pyramid.response.FileResponse`` and ``pyramid.response.FileIter``, for usage in views that must serve files "manually". --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 39bf59210..ecac7a68f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -36,6 +36,10 @@ Features be preferred over using ``pyramid.view.view_config`` with ``context=HTTPForbidden`` as was previously recommended. +- New APIs: ``pyramid.response.FileResponse`` and + ``pyramid.response.FileIter``, for usage in views that must serve files + "manually". + Backwards Incompatibilities --------------------------- -- cgit v1.2.3 From 662d6ea96a79cdd9943a9e3c871fe07282ee671c Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 22 Feb 2012 21:10:08 -0500 Subject: prep for 1.3a9 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index ecac7a68f..bcedb19a1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.3a9 (2012-02-22) +================== Features -------- -- cgit v1.2.3 From b0ebdf0bf54b1eb40d714710e1fcaf24a055003e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 22 Feb 2012 22:09:30 -0500 Subject: - ``pyramid.config.Configurator.with_package`` didn't work if the Configurator was an old-style ``pyramid.configuration.Configurator`` instance. --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index bcedb19a1..d07d49f8b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,13 @@ +Next release +============ + +Bug Fixes +--------- + +- ``pyramid.config.Configurator.with_package`` didn't work if the + Configurator was an old-style ``pyramid.configuration.Configurator`` + instance. + 1.3a9 (2012-02-22) ================== -- cgit v1.2.3 From 01eac92dcdbe0d51b75783350997e69a7613da9e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 24 Feb 2012 15:15:18 -0500 Subject: docs-deprecate tmpl_context --- CHANGES.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index d07d49f8b..249e7fcfc 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,17 @@ Bug Fixes Configurator was an old-style ``pyramid.configuration.Configurator`` instance. +Deprecations +------------ + +- All references to the ``tmpl_context`` request variable were removed from + the docs. Its existence in Pyramid is confusing for people who were never + Pylons users. It was added as a porting convenience for Pylons users in + Pyramid 1.0, but it never caught on because the Pyramid rendering system is + a lot different than Pylons' was, and alternate ways exist to do what it + was designed to offer in Pylons. It will continue to exist "forever" but + it will not be recommended or mentioned in the docs. + 1.3a9 (2012-02-22) ================== -- cgit v1.2.3 From 1b7342f994abeb94a63b571a2a397cb2328eed98 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 26 Feb 2012 05:22:02 -0500 Subject: - Pyramid authorization policies did not show up in the introspector. --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 249e7fcfc..fb2f4486a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,8 @@ Bug Fixes Configurator was an old-style ``pyramid.configuration.Configurator`` instance. +- Pyramid authorization policies did not show up in the introspector. + Deprecations ------------ -- cgit v1.2.3 From cf973d67fcae67f517d407a3f1bc3cb191def5b6 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 26 Feb 2012 15:59:20 -0500 Subject: prep for 1.3b1 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index fb2f4486a..207dbad05 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.3b1 (2012-02-26) +================== Bug Fixes --------- -- cgit v1.2.3 From 5b1e2a42a8880575a48b1fe2868fb4bc5f987f4e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 27 Feb 2012 00:18:45 -0500 Subject: - The method ``pyramid.request.Request.partial_application_url`` is no longer in the API docs. It was meant to be a private method; its publication in the documentation as an API method was a mistake, and it has been renamed to something private. --- CHANGES.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 207dbad05..2c3d2c3a8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,14 @@ +Next release +============ + +Bug Fixes +--------- + +- The method ``pyramid.request.Request.partial_application_url`` is no longer + in the API docs. It was meant to be a private method; its publication in + the documentation as an API method was a mistake, and it has been renamed + to something private. + 1.3b1 (2012-02-26) ================== -- cgit v1.2.3 From 52ca12afbf96621ffa225133529bae0a6a70a446 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 28 Feb 2012 03:56:44 -0500 Subject: Fix security bug caused by __iter__ checking on strings under Python 3 --- CHANGES.txt | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 2c3d2c3a8..84de3c642 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,33 @@ Bug Fixes the documentation as an API method was a mistake, and it has been renamed to something private. +- Bug in ACL authentication checking on Python 3: the ``permits`` and + ``principals_allowed_by_permission`` method of + ``pyramid.authorization.ACLAuthenticationPolicy`` could return an + inappropriate ``True`` value when a permission on an ACL was a string + rather than a sequence, and then only if the ACL permission string was a + substring of the ``permission`` value passed to the function. + + This bug effects no Pyramid deployment under Python 2; it is a bug that + exists only in deployments running on Python 3. It has existed since + Pyramid 1.3a1. + + This bug was due to the presence of an ``__iter__`` attribute on strings + under Python 3 which is not present under strings in Python 2. I've been + assured by multiple Python cognoscenti that this difference in behavior + between Python 2 and Python 3 makes complete sense. Iterating over a + string character by character is of course something everyone wants to do + as often as possible and it would just be too darn slow to need to call a + method in order to turn a string into a list. Announcing that a string is + iterable by adding an ``__iter__`` to it simply canonizes its amazing, + speedy usefulness! So lest you think that Python 3's addition of an + ``__iter__`` to strings was a useless, pointless, harmful, + developer-hostile change, you're clearly mistaken, and quite possibly + brain-damaged. I feel for you. It's clearly much better to have a bug + that goes uncaught for nine alphas and one beta and almost leads to a + latent security hole that might have led to indiscriminate data + disclosure. + 1.3b1 (2012-02-26) ================== -- cgit v1.2.3 From 28c3135c6dab669bc4bace40cd7f8f22c0a8f997 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 29 Feb 2012 10:01:58 -0500 Subject: garden --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 84de3c642..284c45ae4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,13 @@ Bug Fixes the documentation as an API method was a mistake, and it has been renamed to something private. +- When a static view was registered using an absolute filesystem path on + Windows, the ``request.static_url`` function did not work to generate URLs + to its resources. Symptom: "No static URL definition matching + c:\foo\bar\baz". + +- Make all tests pass on Windows XP. + - Bug in ACL authentication checking on Python 3: the ``permits`` and ``principals_allowed_by_permission`` method of ``pyramid.authorization.ACLAuthenticationPolicy`` could return an -- cgit v1.2.3 From 45ddd896d75c9b4a4e205b215e047f125e32fe8e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 29 Feb 2012 10:06:42 -0500 Subject: remove rant --- CHANGES.txt | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 284c45ae4..3f5819954 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -28,20 +28,7 @@ Bug Fixes Pyramid 1.3a1. This bug was due to the presence of an ``__iter__`` attribute on strings - under Python 3 which is not present under strings in Python 2. I've been - assured by multiple Python cognoscenti that this difference in behavior - between Python 2 and Python 3 makes complete sense. Iterating over a - string character by character is of course something everyone wants to do - as often as possible and it would just be too darn slow to need to call a - method in order to turn a string into a list. Announcing that a string is - iterable by adding an ``__iter__`` to it simply canonizes its amazing, - speedy usefulness! So lest you think that Python 3's addition of an - ``__iter__`` to strings was a useless, pointless, harmful, - developer-hostile change, you're clearly mistaken, and quite possibly - brain-damaged. I feel for you. It's clearly much better to have a bug - that goes uncaught for nine alphas and one beta and almost leads to a - latent security hole that might have led to indiscriminate data - disclosure. + under Python 3 which is not present under strings in Python 2. 1.3b1 (2012-02-26) ================== -- cgit v1.2.3 From 3a14206e0f03fe24fa9a6611097230607332184d Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 2 Mar 2012 03:11:22 -0500 Subject: prep for 1.3b2 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 3f5819954..574d887b2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.3b2 (2012-03-02) +================== Bug Fixes --------- -- cgit v1.2.3 From caebdfa6a0ccb56b578431a059934dafb2171d77 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 4 Mar 2012 12:50:21 -0500 Subject: backslash is an escape character in RST --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 574d887b2..8076bc35d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -12,7 +12,7 @@ Bug Fixes - When a static view was registered using an absolute filesystem path on Windows, the ``request.static_url`` function did not work to generate URLs to its resources. Symptom: "No static URL definition matching - c:\foo\bar\baz". + c:\\foo\\bar\\baz". - Make all tests pass on Windows XP. -- cgit v1.2.3 From 4a6f532316421ef85caefc706e191d6977e71feb Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 11 Mar 2012 21:05:04 -0700 Subject: - ``config.add_view()`` raised AttributeError involving ``__text__``. See https://github.com/Pylons/pyramid/issues/461 Fixes #461. --- CHANGES.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 8076bc35d..abdb3d80a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,12 @@ +Next release +============ + +Bug Fixes +--------- + +- ``config.add_view()`` raised AttributeError involving + ``__text__``. See https://github.com/Pylons/pyramid/issues/461 + 1.3b2 (2012-03-02) ================== -- cgit v1.2.3 From a678380044bdb762fbff7559dc2f9b7e671e5337 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 14 Mar 2012 14:43:08 -0700 Subject: Changes to support #481. - The ``alchemy`` scaffold now shows an informative error message in the browser if the person creating the project forgets to run the initialization script. - The ``alchemy`` scaffold initialization script is now called ``initialize__db`` instead of ``populate_``. --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index abdb3d80a..33db7b956 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,16 @@ Bug Fixes - ``config.add_view()`` raised AttributeError involving ``__text__``. See https://github.com/Pylons/pyramid/issues/461 +Scaffolds +--------- + +- The ``alchemy`` scaffold now shows an informative error message in the + browser if the person creating the project forgets to run the + initialization script. + +- The ``alchemy`` scaffold initialization script is now called + ``initialize__db`` instead of ``populate_``. + 1.3b2 (2012-03-02) ================== -- cgit v1.2.3 From 343fb59c318e35c656611b58e7fe870373e33452 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 17 Mar 2012 14:48:01 -0400 Subject: - Remove references to do-nothing ``pyramid.debug_templates`` setting in all Pyramid-provided ``.ini`` files. This setting previously told Chameleon to render better exceptions; now Chameleon always renders nice exceptions regardless of the value of this setting. Fixes #491. --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 33db7b956..ac7dcaee3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,11 @@ Bug Fixes - ``config.add_view()`` raised AttributeError involving ``__text__``. See https://github.com/Pylons/pyramid/issues/461 +- Remove references to do-nothing ``pyramid.debug_templates`` setting in all + Pyramid-provided ``.ini`` files. This setting previously told Chameleon to + render better exceptions; now Chameleon always renders nice exceptions + regardless of the value of this setting. + Scaffolds --------- -- cgit v1.2.3 From ae1648cf034f10b27e80cbb7b9d4c2b12f6d85ed Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 17 Mar 2012 14:53:25 -0400 Subject: add info about sprint improvements --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index ac7dcaee3..f12e98a8b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -22,6 +22,11 @@ Scaffolds - The ``alchemy`` scaffold initialization script is now called ``initialize__db`` instead of ``populate_``. +Documentation +------------- + +- Wiki tutorials improved due to collaboration at PyCon US 2012 sprints. + 1.3b2 (2012-03-02) ================== -- cgit v1.2.3 From 58d14988ca00ceda3764970a041f7e8c1d9b8501 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 17 Mar 2012 17:49:42 -0400 Subject: prep for 1.3b3 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index f12e98a8b..f673143cd 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.3b3 (2012-03-17) +================== Bug Fixes --------- -- cgit v1.2.3 From 2b41345e815c2e584fd51bbe534ba35e222f3b80 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 18 Mar 2012 18:09:44 -0400 Subject: - When ``pyramid.wsgi.wsgiapp2`` calls the downstream WSGI app, the app's environ will no longer have (deprecated and potentially misleading) ``bfg.routes.matchdict`` or ``bfg.routes.route`` keys in it. --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index f673143cd..d52c8d479 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,13 @@ +Next release +============ + +Bug Fixes +--------- + +- When ``pyramid.wsgi.wsgiapp2`` calls the downstream WSGI app, the + app's environ will no longer have (deprecated and potentially misleading) + ``bfg.routes.matchdict`` or ``bfg.routes.route`` keys in it. + 1.3b3 (2012-03-17) ================== -- cgit v1.2.3 From 5cccad104522cb5b8de0e683ea3a1d5bad91d518 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 18 Mar 2012 18:15:32 -0400 Subject: explain --- CHANGES.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index d52c8d479..4befd2ecc 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,9 +4,12 @@ Next release Bug Fixes --------- -- When ``pyramid.wsgi.wsgiapp2`` calls the downstream WSGI app, the - app's environ will no longer have (deprecated and potentially misleading) - ``bfg.routes.matchdict`` or ``bfg.routes.route`` keys in it. +- When ``pyramid.wsgi.wsgiapp2`` calls the downstream WSGI app, the app's + environ will no longer have (deprecated and potentially misleading) + ``bfg.routes.matchdict`` or ``bfg.routes.route`` keys in it. A symptom of + this bug would be a ``wsgiapp2``-wrapped Pyramid app finding the wrong view + because it mistakenly detects that a route was matched when, in fact, it + was not. 1.3b3 (2012-03-17) ================== -- cgit v1.2.3 From 6c15971a0006ed944e19a8f93b5897dccda028c0 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 20 Mar 2012 00:35:17 -0400 Subject: - The fix for issue https://github.com/Pylons/pyramid/issues/461 (which made it possible for instance methods to be used as view callables) introduced a backwards incompatibility when methods that declared only a request argument were used. See https://github.com/Pylons/pyramid/issues/503 Fixes #503 --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 4befd2ecc..916deb009 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,6 +11,11 @@ Bug Fixes because it mistakenly detects that a route was matched when, in fact, it was not. +- The fix for issue https://github.com/Pylons/pyramid/issues/461 (which made + it possible for instance methods to be used as view callables) introduced a + backwards incompatibility when methods that declared only a request + argument were used. See https://github.com/Pylons/pyramid/issues/503 + 1.3b3 (2012-03-17) ================== -- cgit v1.2.3 From 7c88fec67a3c3edd33ef44dc0ad0c55fb672b7e1 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 21 Mar 2012 03:46:00 -0400 Subject: prep for 1.3 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 916deb009..e978f61f0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.3 (2012-03-21) +================ Bug Fixes --------- -- cgit v1.2.3 From a39dd2ff1992f81e98a4d3307aee53fbc7a405cf Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 22 Mar 2012 17:25:35 -0400 Subject: - Add ``REMOTE_ADDR`` to the ``prequest`` WSGI environ dict for benefit of the debug toolbar, which effectively requires it to be present to work properly. --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index e978f61f0..7fd8b7a64 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,13 @@ +Next release +============ + +Bug Fixes +--------- + +- Add ``REMOTE_ADDR`` to the ``prequest`` WSGI environ dict for benefit of + the debug toolbar, which effectively requires it to be present to work + properly. + 1.3 (2012-03-21) ================ -- cgit v1.2.3 From 077fa3a52fb3c160e33bbd7344c56534e77adc49 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 27 Mar 2012 00:01:39 -0400 Subject: add change note --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 7fd8b7a64..859dc7b74 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,16 @@ Bug Fixes the debug toolbar, which effectively requires it to be present to work properly. +- When an asset specification was used as a Mako ``renderer=`` argument and a + ``mako.modules_directory`` was specified, Pyramid would fail to render the + template and instead would raise an error when attempting to write the file + to the modules directory. Example symptom: ``WindowsError: [Error 267] The + directory name is invalid: + 'c:\\docume~1\\chrism\\locals~1\\temp\\tmp9jtjix\\pyramid.tests:fixtures'``. + We now replace the colon in the Mako module filename with a dollar sign, so + it can work on Windows. See https://github.com/Pylons/pyramid/issues/512 + for more information. + 1.3 (2012-03-21) ================ -- cgit v1.2.3 From de797c4cefb03f16cfe3505c85d94c0af24eb066 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 29 Mar 2012 04:21:30 -0400 Subject: - Coverage and docs updates for custom JSON class. - Fork point: master now represents a future 1.4 release. --- CHANGES.txt | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 859dc7b74..0714f6940 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,22 +1,13 @@ Next release ============ -Bug Fixes ---------- +Features +-------- -- Add ``REMOTE_ADDR`` to the ``prequest`` WSGI environ dict for benefit of - the debug toolbar, which effectively requires it to be present to work - properly. - -- When an asset specification was used as a Mako ``renderer=`` argument and a - ``mako.modules_directory`` was specified, Pyramid would fail to render the - template and instead would raise an error when attempting to write the file - to the modules directory. Example symptom: ``WindowsError: [Error 267] The - directory name is invalid: - 'c:\\docume~1\\chrism\\locals~1\\temp\\tmp9jtjix\\pyramid.tests:fixtures'``. - We now replace the colon in the Mako module filename with a dollar sign, so - it can work on Windows. See https://github.com/Pylons/pyramid/issues/512 - for more information. +- Custom objects can be made easily JSON-serializable in Pyramid by defining + a ``__json__`` method on the object's class. This method should return + values natively serializable by ``json.dumps`` (such as ints, lists, + dictionaries, strings, and so forth). 1.3 (2012-03-21) ================ -- cgit v1.2.3 From 2c949d8557ee8c7f9f75797f79ec911b93f60291 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 29 Mar 2012 05:05:00 -0400 Subject: move changes to history on master (master is now 1.4dev) --- CHANGES.txt | 733 ------------------------------------------------------------ 1 file changed, 733 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 0714f6940..c3e679b8a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,736 +9,3 @@ Features values natively serializable by ``json.dumps`` (such as ints, lists, dictionaries, strings, and so forth). -1.3 (2012-03-21) -================ - -Bug Fixes ---------- - -- When ``pyramid.wsgi.wsgiapp2`` calls the downstream WSGI app, the app's - environ will no longer have (deprecated and potentially misleading) - ``bfg.routes.matchdict`` or ``bfg.routes.route`` keys in it. A symptom of - this bug would be a ``wsgiapp2``-wrapped Pyramid app finding the wrong view - because it mistakenly detects that a route was matched when, in fact, it - was not. - -- The fix for issue https://github.com/Pylons/pyramid/issues/461 (which made - it possible for instance methods to be used as view callables) introduced a - backwards incompatibility when methods that declared only a request - argument were used. See https://github.com/Pylons/pyramid/issues/503 - -1.3b3 (2012-03-17) -================== - -Bug Fixes ---------- - -- ``config.add_view()`` raised AttributeError involving - ``__text__``. See https://github.com/Pylons/pyramid/issues/461 - -- Remove references to do-nothing ``pyramid.debug_templates`` setting in all - Pyramid-provided ``.ini`` files. This setting previously told Chameleon to - render better exceptions; now Chameleon always renders nice exceptions - regardless of the value of this setting. - -Scaffolds ---------- - -- The ``alchemy`` scaffold now shows an informative error message in the - browser if the person creating the project forgets to run the - initialization script. - -- The ``alchemy`` scaffold initialization script is now called - ``initialize__db`` instead of ``populate_``. - -Documentation -------------- - -- Wiki tutorials improved due to collaboration at PyCon US 2012 sprints. - -1.3b2 (2012-03-02) -================== - -Bug Fixes ---------- - -- The method ``pyramid.request.Request.partial_application_url`` is no longer - in the API docs. It was meant to be a private method; its publication in - the documentation as an API method was a mistake, and it has been renamed - to something private. - -- When a static view was registered using an absolute filesystem path on - Windows, the ``request.static_url`` function did not work to generate URLs - to its resources. Symptom: "No static URL definition matching - c:\\foo\\bar\\baz". - -- Make all tests pass on Windows XP. - -- Bug in ACL authentication checking on Python 3: the ``permits`` and - ``principals_allowed_by_permission`` method of - ``pyramid.authorization.ACLAuthenticationPolicy`` could return an - inappropriate ``True`` value when a permission on an ACL was a string - rather than a sequence, and then only if the ACL permission string was a - substring of the ``permission`` value passed to the function. - - This bug effects no Pyramid deployment under Python 2; it is a bug that - exists only in deployments running on Python 3. It has existed since - Pyramid 1.3a1. - - This bug was due to the presence of an ``__iter__`` attribute on strings - under Python 3 which is not present under strings in Python 2. - -1.3b1 (2012-02-26) -================== - -Bug Fixes ---------- - -- ``pyramid.config.Configurator.with_package`` didn't work if the - Configurator was an old-style ``pyramid.configuration.Configurator`` - instance. - -- Pyramid authorization policies did not show up in the introspector. - -Deprecations ------------- - -- All references to the ``tmpl_context`` request variable were removed from - the docs. Its existence in Pyramid is confusing for people who were never - Pylons users. It was added as a porting convenience for Pylons users in - Pyramid 1.0, but it never caught on because the Pyramid rendering system is - a lot different than Pylons' was, and alternate ways exist to do what it - was designed to offer in Pylons. It will continue to exist "forever" but - it will not be recommended or mentioned in the docs. - -1.3a9 (2012-02-22) -================== - -Features --------- - -- Add an ``introspection`` boolean to the Configurator constructor. If this - is ``True``, actions registered using the Configurator will be registered - with the introspector. If it is ``False``, they won't. The default is - ``True``. Setting it to ``False`` during action processing will prevent - introspection for any following registration statements, and setting it to - ``True`` will start them up again. This addition is to service a - requirement that the debug toolbar's own views and methods not show up in - the introspector. - -- New API: ``pyramid.config.Configurator.add_notfound_view``. This is a - wrapper for ``pyramid.Config.configurator.add_view`` which provides easy - append_slash support and does the right thing about permissions. It should - be preferred over calling ``add_view`` directly with - ``context=HTTPNotFound`` as was previously recommended. - -- New API: ``pyramid.view.notfound_view_config``. This is a decorator - constructor like ``pyramid.view.view_config`` that calls - ``pyramid.config.Configurator.add_notfound_view`` when scanned. It should - be preferred over using ``pyramid.view.view_config`` with - ``context=HTTPNotFound`` as was previously recommended. - -- New API: ``pyramid.config.Configurator.add_forbidden_view``. This is a - wrapper for ``pyramid.Config.configurator.add_view`` which does the right - thing about permissions. It should be preferred over calling ``add_view`` - directly with ``context=HTTPForbidden`` as was previously recommended. - -- New API: ``pyramid.view.forbidden_view_config``. This is a decorator - constructor like ``pyramid.view.view_config`` that calls - ``pyramid.config.Configurator.add_forbidden_view`` when scanned. It should - be preferred over using ``pyramid.view.view_config`` with - ``context=HTTPForbidden`` as was previously recommended. - -- New APIs: ``pyramid.response.FileResponse`` and - ``pyramid.response.FileIter``, for usage in views that must serve files - "manually". - -Backwards Incompatibilities ---------------------------- - -- Remove ``pyramid.config.Configurator.with_context`` class method. It was - never an API, it is only used by ``pyramid_zcml`` and its functionality has - been moved to that package's latest release. This means that you'll need - to use the 0.9.2 or later release of ``pyramid_zcml`` with this release of - Pyramid. - -- The ``introspector`` argument to the ``pyramid.config.Configurator`` - constructor API has been removed. It has been replaced by the boolean - ``introspection`` flag. - -- The ``pyramid.registry.noop_introspector`` API object has been removed. - -- The older deprecated ``set_notfound_view`` Configurator method is now an - alias for the new ``add_notfound_view`` Configurator method. Likewise, the - older deprecated ``set_forbidden_view`` is now an alias for the new - ``add_forbidden_view``. This has the following impact: the ``context`` sent - to views with a ``(context, request)`` call signature registered via the - ``set_notfound_view`` or ``set_forbidden_view`` will now be an exception - object instead of the actual resource context found. Use - ``request.context`` to get the actual resource context. It's also - recommended to disuse ``set_notfound_view`` in favor of - ``add_notfound_view``, and disuse ``set_forbidden_view`` in favor of - ``add_forbidden_view`` despite the aliasing. - -Deprecations ------------- - -- The API documentation for ``pyramid.view.append_slash_notfound_view`` and - ``pyramid.view.AppendSlashNotFoundViewFactory`` was removed. These names - still exist and are still importable, but they are no longer APIs. Use - ``pyramid.config.Configurator.add_notfound_view(append_slash=True)`` or - ``pyramid.view.notfound_view_config(append_slash=True)`` to get the same - behavior. - -- The ``set_forbidden_view`` and ``set_notfound_view`` methods of the - Configurator were removed from the documentation. They have been - deprecated since Pyramid 1.1. - -Bug Fixes ---------- - -- The static file response object used by ``config.add_static_view`` opened - the static file twice, when it only needed to open it once. - -- The AppendSlashNotFoundViewFactory used request.path to match routes. This - was wrong because request.path contains the script name, and this would - cause it to fail in circumstances where the script name was not empty. It - should have used request.path_info, and now does. - -Documentation -------------- - -- Updated the "Creating a Not Found View" section of the "Hooks" chapter, - replacing explanations of registering a view using ``add_view`` or - ``view_config`` with ones using ``add_notfound_view`` or - ``notfound_view_config``. - -- Updated the "Creating a Not Forbidden View" section of the "Hooks" chapter, - replacing explanations of registering a view using ``add_view`` or - ``view_config`` with ones using ``add_forbidden_view`` or - ``forbidden_view_config``. - -- Updated the "Redirecting to Slash-Appended Routes" section of the "URL - Dispatch" chapter, replacing explanations of registering a view using - ``add_view`` or ``view_config`` with ones using ``add_notfound_view`` or - ``notfound_view_config`` - -- Updated all tutorials to use ``pyramid.view.forbidden_view_config`` rather - than ``pyramid.view.view_config`` with an HTTPForbidden context. - -1.3a8 (2012-02-19) -================== - -Features --------- - -- The ``scan`` method of a ``Configurator`` can be passed an ``ignore`` - argument, which can be a string, a callable, or a list consisting of - strings and/or callables. This feature allows submodules, subpackages, and - global objects from being scanned. See - http://readthedocs.org/docs/venusian/en/latest/#ignore-scan-argument for - more information about how to use the ``ignore`` argument to ``scan``. - -- Better error messages when a view callable returns a value that cannot be - converted to a response (for example, when a view callable returns a - dictionary without a renderer defined, or doesn't return any value at all). - The error message now contains information about the view callable itself - as well as the result of calling it. - -- Better error message when a .pyc-only module is ``config.include`` -ed. - This is not permitted due to error reporting requirements, and a better - error message is shown when it is attempted. Previously it would fail with - something like "AttributeError: 'NoneType' object has no attribute - 'rfind'". - -- Add ``pyramid.config.Configurator.add_traverser`` API method. See the - Hooks narrative documentation section entitled "Changing the Traverser" for - more information. This is not a new feature, it just provides an API for - adding a traverser without needing to use the ZCA API. - -- Add ``pyramid.config.Configurator.add_resource_url_adapter`` API method. - See the Hooks narrative documentation section entitled "Changing How - pyramid.request.Request.resource_url Generates a URL" for more information. - This is not a new feature, it just provides an API for adding a resource - url adapter without needing to use the ZCA API. - -- The system value ``req`` is now supplied to renderers as an alias for - ``request``. This means that you can now, for example, in a template, do - ``req.route_url(...)`` instead of ``request.route_url(...)``. This is - purely a change to reduce the amount of typing required to use request - methods and attributes from within templates. The value ``request`` is - still available too, this is just an alternative. - -- A new interface was added: ``pyramid.interfaces.IResourceURL``. An adapter - implementing its interface can be used to override resource URL generation - when ``request.resource_url`` is called. This interface replaces the - now-deprecated ``pyramid.interfaces.IContextURL`` interface. - -- The dictionary passed to a resource's ``__resource_url__`` method (see - "Overriding Resource URL Generation" in the "Resources" chapter) now - contains an ``app_url`` key, representing the application URL generated - during ``request.resource_url``. It represents a potentially customized - URL prefix, containing potentially custom scheme, host and port information - passed by the user to ``request.resource_url``. It should be used instead - of ``request.application_url`` where necessary. - -- The ``request.resource_url`` API now accepts these arguments: ``app_url``, - ``scheme``, ``host``, and ``port``. The app_url argument can be used to - replace the URL prefix wholesale during url generation. The ``scheme``, - ``host``, and ``port`` arguments can be used to replace the respective - default values of ``request.application_url`` partially. - -- A new API named ``request.resource_path`` now exists. It works like - ``request.resource_url`` but produces a relative URL rather than an - absolute one. - -- The ``request.route_url`` API now accepts these arguments: ``_app_url``, - ``_scheme``, ``_host``, and ``_port``. The ``_app_url`` argument can be - used to replace the URL prefix wholesale during url generation. The - ``_scheme``, ``_host``, and ``_port`` arguments can be used to replace the - respective default values of ``request.application_url`` partially. - -Backwards Incompatibilities ---------------------------- - -- The ``pyramid.interfaces.IContextURL`` interface has been deprecated. - People have been instructed to use this to register a resource url adapter - in the "Hooks" chapter to use to influence ``request.resource_url`` URL - generation for resources found via custom traversers since Pyramid 1.0. - - The interface still exists and registering such an adapter still works, but - this interface will be removed from the software after a few major Pyramid - releases. You should replace it with an equivalent - ``pyramid.interfaces.IResourceURL`` adapter, registered using the new - ``pyramid.config.Configurator.add_resource_url_adapter`` API. A - deprecation warning is now emitted when a - ``pyramid.interfaces.IContextURL`` adapter is found when - ``request.resource_url`` is called. - -Documentation -------------- - -- Don't create a ``session`` instance in SQLA Wiki tutorial, use raw - ``DBSession`` instead (this is more common in real SQLA apps). - -Scaffolding ------------ - -- Put ``pyramid.includes`` targets within ini files in scaffolds on separate - lines in order to be able to tell people to comment out only the - ``pyramid_debugtoolbar`` line when they want to disable the toolbar. - -Dependencies ------------- - -- Depend on ``venusian`` >= 1.0a3 to provide scan ``ignore`` support. - -Internal --------- - -- Create a "MakoRendererFactoryHelper" that provides customizable settings - key prefixes. Allows settings prefixes other than "mako." to be used to - create different factories that don't use the global mako settings. This - will be useful for the debug toolbar, which can currently be sabotaged by - someone using custom mako configuration settings. - -1.3a7 (2012-02-07) -================== - -Features --------- - -- More informative error message when a ``config.include`` cannot find an - ``includeme``. See https://github.com/Pylons/pyramid/pull/392. - -- Internal: catch unhashable discriminators early (raise an error instead of - allowing them to find their way into resolveConflicts). - -- The `match_param` view predicate now accepts a string or a tuple. - This replaces the broken behavior of accepting a dict. See - https://github.com/Pylons/pyramid/issues/425 for more information. - -Bug Fixes ---------- - -- The process will now restart when ``pserve`` is used with the ``--reload`` - flag when the ``development.ini`` file (or any other .ini file in use) is - changed. See https://github.com/Pylons/pyramid/issues/377 and - https://github.com/Pylons/pyramid/pull/411 - -- The ``prequest`` script would fail when used against URLs which did not - return HTML or text. See https://github.com/Pylons/pyramid/issues/381 - -Backwards Incompatibilities ---------------------------- - -- The `match_param` view predicate no longer accepts a dict. This will - have no negative affect because the implementation was broken for - dict-based arguments. - -Documentation -------------- - -- Add a traversal hello world example to the narrative docs. - -1.3a6 (2012-01-20) -================== - -Features --------- - -- New API: ``pyramid.config.Configurator.set_request_property``. Add lazy - property descriptors to a request without changing the request factory. - This method provides conflict detection and is the suggested way to add - properties to a request. - -- Responses generated by Pyramid's ``static_view`` now use - a ``wsgi.file_wrapper`` (see - http://www.python.org/dev/peps/pep-0333/#optional-platform-specific-file-handling) - when one is provided by the web server. - -Bug Fixes ---------- - -- Views registered with an ``accept`` could not be overridden correctly with - a different view that had the same predicate arguments. See - https://github.com/Pylons/pyramid/pull/404 for more information. - -- When using a dotted name for a ``view`` argument to - ``Configurator.add_view`` that pointed to a class with a ``view_defaults`` - decorator, the view defaults would not be applied. See - https://github.com/Pylons/pyramid/issues/396 . - -- Static URL paths were URL-quoted twice. See - https://github.com/Pylons/pyramid/issues/407 . - -1.3a5 (2012-01-09) -================== - -Bug Fixes ---------- - -- The ``pyramid.view.view_defaults`` decorator did not work properly when - more than one view relied on the defaults being different for configuration - conflict resolution. See https://github.com/Pylons/pyramid/issues/394. - -Backwards Incompatibilities ---------------------------- - -- The ``path_info`` route and view predicates now match against - ``request.upath_info`` (Unicode) rather than ``request.path_info`` - (indeterminate value based on Python 3 vs. Python 2). This has to be done - to normalize matching on Python 2 and Python 3. - -1.3a4 (2012-01-05) -================== - -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. - -- Use the ``waitress`` WSGI server instead of ``wsgiref`` in scaffolding. - -Bug Fixes ---------- - -- The documentation of ``pyramid.events.subscriber`` indicated that using it - as a decorator with no arguments like this:: - - @subscriber() - def somefunc(event): - pass - - Would register ``somefunc`` to receive all events sent via the registry, - but this was untrue. Instead, it would receive no events at all. This has - now been fixed and the code matches the documentation. See also - https://github.com/Pylons/pyramid/issues/386 - -- Literal portions of route patterns were not URL-quoted when ``route_url`` - or ``route_path`` was used to generate a URL or path. - -- The result of ``route_path`` or ``route_url`` might have been ``unicode`` - or ``str`` depending on the input. It is now guaranteed to always be - ``str``. - -- URL matching when the pattern contained non-ASCII characters in literal - parts was indeterminate. Now the pattern supplied to ``add_route`` is - assumed to be either: a ``unicode`` value, or a ``str`` value that contains - only ASCII characters. If you now want to match the path info from a URL - that contains high order characters, you can pass the Unicode - representation of the decoded path portion in the pattern. - -- When using a ``traverse=`` route predicate, traversal would fail with a - URLDecodeError if there were any high-order characters in the traversal - pattern or in the matched dynamic segments. - -- Using a dynamic segment named ``traverse`` in a route pattern like this:: - - config.add_route('trav_route', 'traversal/{traverse:.*}') - - Would cause a ``UnicodeDecodeError`` when the route was matched and the - matched portion of the URL contained any high-order characters. See - https://github.com/Pylons/pyramid/issues/385 . - -- When using a ``*traverse`` stararg in a route pattern, a URL that matched - that possessed a ``@@`` in its name (signifying a view name) would be - inappropriately quoted by the traversal machinery during traversal, - resulting in the view not being found properly. See - https://github.com/Pylons/pyramid/issues/382 and - https://github.com/Pylons/pyramid/issues/375 . - -Backwards Incompatibilities ---------------------------- - -- String values passed to ``route_url`` or ``route_path`` that are meant to - replace "remainder" matches will now be URL-quoted except for embedded - slashes. For example:: - - config.add_route('remain', '/foo*remainder') - request.route_path('remain', remainder='abc / def') - # -> '/foo/abc%20/%20def' - - Previously string values passed as remainder replacements were tacked on - untouched, without any URL-quoting. But this doesn't really work logically - if the value passed is Unicode (raw unicode cannot be placed in a URL or in - a path) and it is inconsistent with the rest of the URL generation - machinery if the value is a string (it won't be quoted unless by the - caller). - - Some folks will have been relying on the older behavior to tack on query - string elements and anchor portions of the URL; sorry, you'll need to - change your code to use the ``_query`` and/or ``_anchor`` arguments to - ``route_path`` or ``route_url`` to do this now. - -- If you pass a bytestring that contains non-ASCII characters to - ``add_route`` as a pattern, it will now fail at startup time. Use Unicode - instead. - -1.3a3 (2011-12-21) -================== - -Features --------- - -- Added a ``prequest`` script (along the lines of ``paster request``). It is - documented in the "Command-Line Pyramid" chapter in the section entitled - "Invoking a Request". - -- Add undocumented ``__discriminator__`` API to derived view callables. - e.g. ``adapters.lookup(...).__discriminator__(context, request)``. It will - be used by superdynamic systems that require the discriminator to be used - for introspection after manual view lookup. - -Bug Fixes ---------- - -- Normalized exit values and ``-h`` output for all ``p*`` scripts - (``pviews``, ``proutes``, etc). - -Documentation -------------- - -- Added a section named "Making Your Script into a Console Script" in the - "Command-Line Pyramid" chapter. - -- Removed the "Running Pyramid on Google App Engine" tutorial from the main - docs. It survives on in the Cookbook - (http://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/gae.html). - Rationale: it provides the correct info for the Python 2.5 version of GAE - only, and this version of Pyramid does not support Python 2.5. - -1.3a2 (2011-12-14) -================== - -Features --------- - -- New API: ``pyramid.view.view_defaults``. If you use a class as a view, you - can use the new ``view_defaults`` class decorator on the class to provide - defaults to the view configuration information used by every - ``@view_config`` decorator that decorates a method of that class. It also - works against view configurations involving a class made imperatively. - -- Added a backwards compatibility knob to ``pcreate`` to emulate ``paster - create`` handling for the ``--list-templates`` option. - -- Changed scaffolding machinery around a bit to make it easier for people who - want to have extension scaffolds that can work across Pyramid 1.0.X, 1.1.X, - 1.2.X and 1.3.X. See the new "Creating Pyramid Scaffolds" chapter in the - narrative documentation for more info. - -Documentation -------------- - -- Added documentation to "View Configuration" narrative documentation chapter - about ``view_defaults`` class decorator. - -- Added API docs for ``view_defaults`` class decorator. - -- Added an API docs chapter for ``pyramid.scaffolds``. - -- Added a narrative docs chapter named "Creating Pyramid Scaffolds". - -Backwards Incompatibilities ---------------------------- - -- The ``template_renderer`` method of ``pyramid.scaffolds.PyramidScaffold`` - was renamed to ``render_template``. If you were overriding it, you're a - bad person, because it wasn't an API before now. But we're nice so we're - letting you know. - -1.3a1 (2011-12-09) -================== - -Features --------- - -- Python 3.2 compatibility. - -- New ``pyramid.compat`` module and API documentation which provides Python - 2/3 straddling support for Pyramid add-ons and development environments. - -- A ``mako.directories`` setting is no longer required to use Mako templates - Rationale: Mako template renderers can be specified using an absolute asset - spec. An entire application can be written with such asset specs, - requiring no ordered lookup path. - -- ``bpython`` interpreter compatibility in ``pshell``. See the "Command-Line - Pyramid" narrative docs chapter for more information. - -- Added ``get_appsettings`` API function to the ``pyramid.paster`` module. - This function returns the settings defined within an ``[app:...]`` section - in a PasteDeploy ini file. - -- Added ``setup_logging`` API function to the ``pyramid.paster`` module. - This function sets up Python logging according to the logging configuration - in a PasteDeploy ini file. - -- Configuration conflict reporting is reported in a more understandable way - ("Line 11 in file..." vs. a repr of a tuple of similar info). - -- A configuration introspection system was added; see the narrative - documentation chapter entitled "Pyramid Configuration Introspection" for - more information. New APIs: ``pyramid.registry.Introspectable``, - ``pyramid.config.Configurator.introspector``, - ``pyramid.config.Configurator.introspectable``, - ``pyramid.registry.Registry.introspector``. - -- Allow extra keyword arguments to be passed to the - ``pyramid.config.Configurator.action`` method. - -- New APIs: ``pyramid.path.AssetResolver`` and - ``pyramid.path.DottedNameResolver``. The former can be used to resolve - asset specifications, the latter can be used to resolve dotted names to - modules or packages. - -Bug Fixes ---------- - -- Make test suite pass on 32-bit systems; closes #286. closes #306. - See also https://github.com/Pylons/pyramid/issues/286 - -- The ``pryamid.view.view_config`` decorator did not accept a ``match_params`` - predicate argument. See https://github.com/Pylons/pyramid/pull/308 - -- The AuthTktCookieHelper could potentially generate Unicode headers - inappropriately when the ``tokens`` argument to remember was used. See - https://github.com/Pylons/pyramid/pull/314. - -- The AuthTktAuthenticationPolicy did not use a timing-attack-aware string - comparator. See https://github.com/Pylons/pyramid/pull/320 for more info. - -- The DummySession in ``pyramid.testing`` now generates a new CSRF token if - one doesn't yet exist. - -- ``request.static_url`` now generates URL-quoted URLs when fed a ``path`` - argument which contains characters that are unsuitable for URLs. See - https://github.com/Pylons/pyramid/issues/349 for more info. - -- Prevent a scaffold rendering from being named ``site`` (conflicts with - Python internal site.py). - -- Support for using instances as targets of the ``pyramid.wsgi.wsgiapp`` and - ``pryramid.wsgi.wsgiapp2`` functions. - See https://github.com/Pylons/pyramid/pull/370 for more info. - -Backwards Incompatibilities ---------------------------- - -- Pyramid no longer runs on Python 2.5 (which includes the most recent - release of Jython and the Python 2.5 version of GAE as of this writing). - -- The ``paster`` command is no longer the documented way to create projects, - start the server, or run debugging commands. To create projects from - scaffolds, ``paster create`` is replaced by the ``pcreate`` console script. - To serve up a project, ``paster serve`` is replaced by the ``pserve`` - console script. New console scripts named ``pshell``, ``pviews``, - ``proutes``, and ``ptweens`` do what their ``paster `` - equivalents used to do. Rationale: the Paste and PasteScript packages do - not run under Python 3. - -- The default WSGI server run as the result of ``pserve`` from newly rendered - scaffolding is now the ``wsgiref`` WSGI server instead of the - ``paste.httpserver`` server. Rationale: Rationale: the Paste and - PasteScript packages do not run under Python 3. - -- The ``pshell`` command (see "paster pshell") no longer accepts a - ``--disable-ipython`` command-line argument. Instead, it accepts a ``-p`` - or ``--python-shell`` argument, which can be any of the values ``python``, - ``ipython`` or ``bpython``. - -- Removed the ``pyramid.renderers.renderer_from_name`` function. It has been - deprecated since Pyramid 1.0, and was never an API. - -- To use ZCML with versions of Pyramid >= 1.3, you will need ``pyramid_zcml`` - version >= 0.8 and ``zope.configuration`` version >= 3.8.0. The - ``pyramid_zcml`` package version 0.8 is backwards compatible all the way to - Pyramid 1.0, so you won't be warned if you have older versions installed - and upgrade Pyramid "in-place"; it may simply break instead. - -Dependencies ------------- - -- Pyramid no longer depends on the ``zope.component`` package, except as a - testing dependency. - -- Pyramid now depends on a zope.interface>=3.8.0, WebOb>=1.2dev, - repoze.lru>=0.4, zope.deprecation>=3.5.0, translationstring>=0.4 (for - Python 3 compatibility purposes). It also, as a testing dependency, - depends on WebTest>=1.3.1 for the same reason. - -- Pyramid no longer depends on the Paste or PasteScript packages. - -Documentation -------------- - -- The SQLAlchemy Wiki tutorial has been updated. It now uses - ``@view_config`` decorators and an explicit database population script. - -- Minor updates to the ZODB Wiki tutorial. - -- A narrative documentation chapter named "Extending Pyramid Configuration" - was added; it describes how to add a new directive, and how use the - ``pyramid.config.Configurator.action`` method within custom directives. It - also describes how to add introspectable objects. - -- A narrative documentation chapter named "Pyramid Configuration - Introspection" was added. It describes how to query the introspection - system. - -Scaffolds ---------- - -- Rendered scaffolds have now been changed to be more relocatable (fewer - mentions of the package name within files in the package). - -- The ``routesalchemy`` scaffold has been renamed ``alchemy``, replacing the - older (traversal-based) ``alchemy`` scaffold (which has been retired). - -- The ``starter`` scaffold now uses URL dispatch by default. - -- cgit v1.2.3 From 8782def302a98cefdd4a4c1d448f5226acf81103 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 30 Mar 2012 02:28:34 -0400 Subject: - When no authentication policy was configured, a call to ``pyramid.security.effective_principals`` would unconditionally return the empty list. This was incorrect, it should have unconditionally returned ``[Everyone]``, and now does. --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 859dc7b74..2393e28ec 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -18,6 +18,11 @@ Bug Fixes it can work on Windows. See https://github.com/Pylons/pyramid/issues/512 for more information. +- When no authentication policy was configured, a call to + ``pyramid.security.effective_principals`` would unconditionally return the + empty list. This was incorrect, it should have unconditionally returned + ``[Everyone]``, and now does. + 1.3 (2012-03-21) ================ -- cgit v1.2.3 From 1794b4b17482314bfc57285a71b78fce091870c3 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 30 Mar 2012 02:31:06 -0400 Subject: note that this is a forward port --- CHANGES.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index ac22aa36d..9cddc01b5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,10 +4,10 @@ Next release Bug Fixes --------- -- When no authentication policy was configured, a call to - ``pyramid.security.effective_principals`` would unconditionally return the - empty list. This was incorrect, it should have unconditionally returned - ``[Everyone]``, and now does. +- Forward port from 1.3 branch: When no authentication policy was configured, + a call to ``pyramid.security.effective_principals`` would unconditionally + return the empty list. This was incorrect, it should have unconditionally + returned ``[Everyone]``, and now does. Features -------- -- cgit v1.2.3 From 360f251a1765e53a15bec53c91068880f47e503f Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 30 Mar 2012 05:42:47 -0400 Subject: - As of this release, the ``request_method`` predicate, when used, will also imply that ``HEAD`` is implied when you use ``GET``. For example, using ``@view_config(request_method='GET')`` is equivalent to using ``@view_config(request_method='HEAD')``. Using ``@view_config(request_method=('GET', 'POST')`` is equivalent to using ``@view_config(request_method=('GET', 'HEAD', 'POST')``. This is because HEAD is a variant of GET that omits the body, and WebOb has special support to return an empty body when a HEAD is used. --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 9cddc01b5..f0fef62ea 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -17,3 +17,11 @@ Features values natively serializable by ``json.dumps`` (such as ints, lists, dictionaries, strings, and so forth). +- As of this release, the ``request_method`` predicate, when used, will also + imply that ``HEAD`` is implied when you use ``GET``. For example, using + ``@view_config(request_method='GET')`` is equivalent to using + ``@view_config(request_method='HEAD')``. Using + ``@view_config(request_method=('GET', 'POST')`` is equivalent to using + ``@view_config(request_method=('GET', 'HEAD', 'POST')``. This is because + HEAD is a variant of GET that omits the body, and WebOb has special support + to return an empty body when a HEAD is used. -- cgit v1.2.3 From 09d38a72a4797b5ca4661e877abea67644c20d01 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 10 Apr 2012 19:00:34 -0400 Subject: poke rtd --- CHANGES.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index f0fef62ea..8f8286628 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,7 @@ Bug Fixes return the empty list. This was incorrect, it should have unconditionally returned ``[Everyone]``, and now does. + Features -------- -- cgit v1.2.3 From 15c40a14c41d90dada89a20085226d74406dfa92 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 11 Apr 2012 01:50:26 -0400 Subject: readme --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 8f8286628..de4714bf2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -26,3 +26,6 @@ Features ``@view_config(request_method=('GET', 'HEAD', 'POST')``. This is because HEAD is a variant of GET that omits the body, and WebOb has special support to return an empty body when a HEAD is used. + +- ``config.set_request_properties`` now causes less code to be executed at + request construction time. -- cgit v1.2.3 From 67eb618bbf1eae072c9f096792abd6396bf90096 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Wed, 11 Apr 2012 21:28:28 -0500 Subject: spelling --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index de4714bf2..337754162 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -27,5 +27,5 @@ Features HEAD is a variant of GET that omits the body, and WebOb has special support to return an empty body when a HEAD is used. -- ``config.set_request_properties`` now causes less code to be executed at +- ``config.set_request_property`` now causes less code to be executed at request construction time. -- cgit v1.2.3 From 136ca148ffec69e54ed0d3c5645e8f7d96413726 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 18 Apr 2012 15:53:07 -0400 Subject: test checkin for automating shiningpanda build from github post-receive url --- CHANGES.txt | 1 - 1 file changed, 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 337754162..7a0a6f28c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,7 +9,6 @@ Bug Fixes return the empty list. This was incorrect, it should have unconditionally returned ``[Everyone]``, and now does. - Features -------- -- cgit v1.2.3 From 2b2451ad920af1defabd8b06509d2100f627dc3f Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 18 Apr 2012 15:56:11 -0400 Subject: test checkin for automating shiningpanda build from github post-receive url (this time for sure) --- CHANGES.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 7a0a6f28c..337754162 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,7 @@ Bug Fixes return the empty list. This was incorrect, it should have unconditionally returned ``[Everyone]``, and now does. + Features -------- -- cgit v1.2.3 From fcb209534f069c79ecf90c5499d2955b049aca78 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 27 Apr 2012 11:15:24 -0400 Subject: garden --- CHANGES.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 337754162..b8d42ba6f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,7 +9,6 @@ Bug Fixes return the empty list. This was incorrect, it should have unconditionally returned ``[Everyone]``, and now does. - Features -------- @@ -29,3 +28,9 @@ Features - ``config.set_request_property`` now causes less code to be executed at request construction time. + +- Don't add a ``?`` to URLs generated by request.resource_url if the + ``query`` argument is provided but empty. + +- Don't add a ``?`` to URLs generated by request.route_url if the + ``_query`` argument is provided but empty. -- cgit v1.2.3 From 561a443369bea131fcdbf0476c7e6a4935638d62 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 27 Apr 2012 11:20:08 -0400 Subject: fix example --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index b8d42ba6f..67b03d59b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -20,7 +20,7 @@ Features - As of this release, the ``request_method`` predicate, when used, will also imply that ``HEAD`` is implied when you use ``GET``. For example, using ``@view_config(request_method='GET')`` is equivalent to using - ``@view_config(request_method='HEAD')``. Using + ``@view_config(request_method=('GET', 'HEAD'))``. Using ``@view_config(request_method=('GET', 'POST')`` is equivalent to using ``@view_config(request_method=('GET', 'HEAD', 'POST')``. This is because HEAD is a variant of GET that omits the body, and WebOb has special support -- cgit v1.2.3 From 988035afbb745237ea8bec0a7c5e4552d2fc98ba Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 2 May 2012 23:15:46 -0400 Subject: add a change note --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 67b03d59b..34d60090d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -34,3 +34,7 @@ Features - Don't add a ``?`` to URLs generated by request.route_url if the ``_query`` argument is provided but empty. + +- The static view machinery now raises (rather than returns) ``HTTPNotFound`` + and ``HTTPMovedPermanently`` exceptions, so these can be caught by the + NotFound view (and other exception views). -- cgit v1.2.3 From e012aa12760f6c29bfc9967c50a51d3f47db47da Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 3 May 2012 02:42:55 -0400 Subject: allow __json__ and custom adapters to accept request arg --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 34d60090d..7c2af4451 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -17,6 +17,9 @@ Features values natively serializable by ``json.dumps`` (such as ints, lists, dictionaries, strings, and so forth). +- The JSON renderer now allows for the definition of custom type adapters to + convert unknown objects to JSON serializations. + - As of this release, the ``request_method`` predicate, when used, will also imply that ``HEAD`` is implied when you use ``GET``. For example, using ``@view_config(request_method='GET')`` is equivalent to using -- cgit v1.2.3 From ea009a6d4a1ffa8585faa85581848f6e74a57dfc Mon Sep 17 00:00:00 2001 From: Blaise Laflamme Date: Tue, 19 Jun 2012 20:12:55 -0400 Subject: added docs and changes for using defs in mako renderer --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 7c2af4451..3cb2f2848 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -41,3 +41,8 @@ Features - The static view machinery now raises (rather than returns) ``HTTPNotFound`` and ``HTTPMovedPermanently`` exceptions, so these can be caught by the NotFound view (and other exception views). + +- The mako renderer now accepts a def name and returns the template def + result for the view being called. The uri format using an asset spec is + package:path/to/template#defname.mako. The old way of returning a tuple + from the view is supported for backward compatibility, ('defname', {}). -- cgit v1.2.3 From 6cea47e9c34841cdf109899e8d965c67af3a5ce9 Mon Sep 17 00:00:00 2001 From: Blaise Laflamme Date: Tue, 19 Jun 2012 20:20:17 -0400 Subject: fixed typos --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 3cb2f2848..1fd92fe19 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -42,7 +42,7 @@ 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 and returns the template def +- The mako renderer now accepts a defname and returns the template def result for the view being called. The uri format using an asset spec is package:path/to/template#defname.mako. The old way of returning a tuple from the view is supported for backward compatibility, ('defname', {}). -- cgit v1.2.3 From c2d65ff71dac6a9b15119db8c2fb09884f4060e3 Mon Sep 17 00:00:00 2001 From: Blaise Laflamme Date: Tue, 19 Jun 2012 20:22:34 -0400 Subject: fixed typos --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 1fd92fe19..3cb2f2848 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -42,7 +42,7 @@ Features and ``HTTPMovedPermanently`` exceptions, so these can be caught by the NotFound view (and other exception views). -- The mako renderer now accepts a defname and returns the template def +- The mako renderer now accepts a def name and returns the template def result for the view being called. The uri format using an asset spec is package:path/to/template#defname.mako. The old way of returning a tuple from the view is supported for backward compatibility, ('defname', {}). -- cgit v1.2.3 From 3074e78a5b3818bf6c6cb43b832e4ab1df845e16 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 10 Jul 2012 15:56:38 -0400 Subject: garden --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 3cb2f2848..c06b8106d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,9 @@ Bug Fixes return the empty list. This was incorrect, it should have unconditionally returned ``[Everyone]``, and now does. +- Explicit url dispatch regexes can now contain colons. + https://github.com/Pylons/pyramid/issues/629 + Features -------- -- cgit v1.2.3 From e652518e00cde05b55b065196a460efd9bc86e32 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 13 Jul 2012 12:08:18 -0400 Subject: - On at least one 64-bit Ubuntu system under Python 3.2, using the ``view_config`` decorator caused a ``RuntimeError: dictionary changed size during iteration`` exception. It no longer does. See https://github.com/Pylons/pyramid/issues/635 for more information. - Fixes issue #635. --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index c06b8106d..c6afaf0c7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -12,6 +12,11 @@ Bug Fixes - Explicit url dispatch regexes can now contain colons. https://github.com/Pylons/pyramid/issues/629 +- On at least one 64-bit Ubuntu system under Python 3.2, using the + ``view_config`` decorator caused a ``RuntimeError: dictionary changed size + during iteration`` exception. It no longer does. See + https://github.com/Pylons/pyramid/issues/635 for more information. + Features -------- -- cgit v1.2.3 From 61a57eaaa82c3e001ee3b0102e7a1b6cdb42532d Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 29 Jul 2012 14:54:34 -0400 Subject: - When there is a predicate mismatch exception (seen when no view matches for a given request due to predicates not working), the exception now contains a textual description of the predicate which didn't match. - Fixes issue #502 and issue #519. --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index c6afaf0c7..ecb2bf659 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -54,3 +54,7 @@ Features result for the view being called. The uri format using an asset spec is package:path/to/template#defname.mako. The old way of returning a tuple from the view is supported for backward compatibility, ('defname', {}). + +- When there is a predicate mismatch exception (seen when no view matches for + a given request due to predicates not working), the exception now contains + a textual description of the predicate which didn't match. -- cgit v1.2.3 From 8b26752c4e54b1c9a6f8b14b14c0236be9c239b7 Mon Sep 17 00:00:00 2001 From: Blaise Laflamme Date: Fri, 3 Aug 2012 00:48:00 -0400 Subject: added entry to changes.txt for mako fix --- CHANGES.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index ecb2bf659..94553955c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -17,6 +17,12 @@ Bug Fixes during iteration`` exception. It no longer does. See https://github.com/Pylons/pyramid/issues/635 for more information. +- In Mako Templates lookup, check if the uri is already adjusted and bring + it back to an asset spec. Normally occurs with inherited templates or + included components. + https://github.com/Pylons/pyramid/issues/606 + https://github.com/Pylons/pyramid/issues/607 + Features -------- @@ -50,9 +56,9 @@ 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 and returns the template def - result for the view being called. The uri format using an asset spec is - package:path/to/template#defname.mako. The old way of returning a tuple +- The mako renderer now accepts a def name and returns the template def + result for the view being called. The uri format using an asset spec is + package:path/to/template#defname.mako. The old way of returning a tuple from the view is supported for backward compatibility, ('defname', {}). - When there is a predicate mismatch exception (seen when no view matches for -- cgit v1.2.3 From 0196b2a06ef66d2e8b33a03cc84373ab84ba44be Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 6 Aug 2012 00:48:29 -0400 Subject: add docs for third-party view predicates --- CHANGES.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index ecb2bf659..5e0bf0968 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -20,6 +20,21 @@ Bug Fixes Features -------- +- Third-party custom view and route predicates can now be added for use by + view authors via ``pyramid.config.Configurator.add_view_predicate`` and + ``pyramid.config.Configurator.add_route_predicate``. So, for example, + doing this:: + + config.add_view_predicate('abc', my.package.ABCPredicate) + + Might allow a view author to do this in an application that configured that + predicate:: + + @view_config(abc=1) + + See "Adding A Third Party View or Route Predicate" in the Hooks chapter for + more information. + - Custom objects can be made easily JSON-serializable in Pyramid by defining a ``__json__`` method on the object's class. This method should return values natively serializable by ``json.dumps`` (such as ints, lists, -- cgit v1.2.3 From 735abf49f936cedc845907516a3922cdffa83665 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 7 Aug 2012 00:08:59 -0400 Subject: note conflict behavior change --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index ecffea5d9..e092b1545 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -41,6 +41,12 @@ Features See "Adding A Third Party View or Route Predicate" in the Hooks chapter for more information. + Note that changes made to support the above feature now means that only + actions registered using the same "order" can conflict with one another. + It used to be the case that actions registered at different orders could + potentially conflict, but to my knowledge nothing ever depended on this + behavior (it was a bit silly). + - Custom objects can be made easily JSON-serializable in Pyramid by defining a ``__json__`` method on the object's class. This method should return values natively serializable by ``json.dumps`` (such as ints, lists, -- cgit v1.2.3 From 6b180cbb77d6c5bee0e75220d93fc1800d1217df Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 15 Aug 2012 22:49:59 -0400 Subject: - An ``add_permission`` directive method was added to the Configurator. This directive registers a free-standing permission introspectable into the Pyramid introspection system. Frameworks built atop Pyramid can thus use the the ``permissions`` introspectable category data to build a comprehensive list of permissions supported by a running system. Before this method was added, permissions were already registered in this introspectable category as a side effect of naming them in an ``add_view`` call, this method just makes it possible to arrange for a permission to be put into the ``permissions`` introspectable category without naming it along with an associated view. Here's an example of usage of ``add_permission``:: config = Configurator() config.add_permission('view') --- CHANGES.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index e092b1545..f02925585 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -85,3 +85,18 @@ Features - When there is a predicate mismatch exception (seen when no view matches for a given request due to predicates not working), the exception now contains a textual description of the predicate which didn't match. + +- An ``add_permission`` directive method was added to the Configurator. This + directive registers a free-standing permission introspectable into the + Pyramid introspection system. Frameworks built atop Pyramid can thus use + the the ``permissions`` introspectable category data to build a + comprehensive list of permissions supported by a running system. Before + this method was added, permissions were already registered in this + introspectable category as a side effect of naming them in an ``add_view`` + call, this method just makes it possible to arrange for a permission to be + put into the ``permissions`` introspectable category without naming it + along with an associated view. Here's an example of usage of + ``add_permission``:: + + config = Configurator() + config.add_permission('view') -- cgit v1.2.3 From 2c25342383eed7b10e349b2396eed08d332cfb80 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Thu, 16 Aug 2012 02:28:43 -0500 Subject: docs-deprecated set_request_property --- CHANGES.txt | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index f02925585..b2f37355b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -64,13 +64,17 @@ Features HEAD is a variant of GET that omits the body, and WebOb has special support to return an empty body when a HEAD is used. -- ``config.set_request_property`` now causes less code to be executed at - request construction time. - -- Don't add a ``?`` to URLs generated by request.resource_url if the +- ``config.set_request_method`` has been introduced to support extending + request objects with arbitrary callables. This method expands on the + previous ``config.set_request_property`` by supporting methods as well as + properties. This method now causes less code to be executed at + request construction time than ``config.set_request_property`` in + version 1.3. + +- Don't add a ``?`` to URLs generated by ``request.resource_url`` if the ``query`` argument is provided but empty. -- Don't add a ``?`` to URLs generated by request.route_url if the +- Don't add a ``?`` to URLs generated by ``request.route_url`` if the ``_query`` argument is provided but empty. - The static view machinery now raises (rather than returns) ``HTTPNotFound`` @@ -100,3 +104,13 @@ Features config = Configurator() config.add_permission('view') + +Deprecations +------------ + +- The documentation for + ``pyramid.config.Configurator.set_request_property`` has been removed. + The method remains usable but the more featureful + ``pyramid.config.Configurator.set_request_method`` should be used in its + place. It has all of the same capabilities but can also extend the + request object with methods. -- cgit v1.2.3 From 9cdb28614e558a886cb75d1d9ce9689621199722 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 16 Aug 2012 11:25:23 -0400 Subject: readd set_request_property to docs (just so when people run across it in in-the-wild code they're not totally confused); we'll remove it later --- CHANGES.txt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index b2f37355b..a9dd18985 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -108,9 +108,8 @@ Features Deprecations ------------ -- The documentation for - ``pyramid.config.Configurator.set_request_property`` has been removed. - The method remains usable but the more featureful - ``pyramid.config.Configurator.set_request_method`` should be used in its - place. It has all of the same capabilities but can also extend the - request object with methods. +- The ``pyramid.config.Configurator.set_request_property`` has been + documentation-deprecated. The method remains usable but the more + featureful ``pyramid.config.Configurator.set_request_method`` should be + used in its place (it has all of the same capabilities but can also extend + the request object with methods). -- cgit v1.2.3 From dbc792498c1c8a3390c1babc1bf742def40e2b46 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 19 Aug 2012 11:26:55 -0400 Subject: Garden. --- CHANGES.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index a9dd18985..abd30c950 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -17,12 +17,15 @@ Bug Fixes during iteration`` exception. It no longer does. See https://github.com/Pylons/pyramid/issues/635 for more information. -- In Mako Templates lookup, check if the uri is already adjusted and bring +- In Mako Templates lookup, cyheck if the uri is already adjusted and bring it back to an asset spec. Normally occurs with inherited templates or included components. https://github.com/Pylons/pyramid/issues/606 https://github.com/Pylons/pyramid/issues/607 +- ``pserve``: don't show --stop-daemon option on Windows. + https://github.com/Pylons/pyramid/pull/661 + Features -------- -- cgit v1.2.3 From b9b4657e79e7e1ed1f0c79bf82c3fe19a0ab5687 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 19 Aug 2012 12:15:27 -0400 Subject: - Undo effects of merging pull #661 because tests wont pass on windows https://github.com/Pylons/pyramid/pull/661 --- CHANGES.txt | 3 --- 1 file changed, 3 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index abd30c950..0291d924a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -23,9 +23,6 @@ Bug Fixes https://github.com/Pylons/pyramid/issues/606 https://github.com/Pylons/pyramid/issues/607 -- ``pserve``: don't show --stop-daemon option on Windows. - https://github.com/Pylons/pyramid/pull/661 - Features -------- -- cgit v1.2.3 From 7853bc001283db8c5b87d026dcc130d1bece8dcc Mon Sep 17 00:00:00 2001 From: Blaise Laflamme Date: Wed, 22 Aug 2012 10:49:18 -0400 Subject: garden --- CHANGES.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 0291d924a..30df788b3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -17,12 +17,16 @@ Bug Fixes during iteration`` exception. It no longer does. See https://github.com/Pylons/pyramid/issues/635 for more information. -- In Mako Templates lookup, cyheck if the uri is already adjusted and bring +- In Mako Templates lookup, check if the uri is already adjusted and bring it back to an asset spec. Normally occurs with inherited templates or included components. https://github.com/Pylons/pyramid/issues/606 https://github.com/Pylons/pyramid/issues/607 +- In Mako Templates lookup, check for absolute uri (using mako directories) + when mixing up inheritance with asset specs. + https://github.com/Pylons/pyramid/issues/662 + Features -------- -- cgit v1.2.3 From 45b6e192c44ebee124317a90a9a6dcc044407a2a Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Thu, 23 Aug 2012 10:31:38 -0500 Subject: added cookie session changes to CHANGES.txt --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 30df788b3..b8747f06c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -109,6 +109,11 @@ Features config = Configurator() config.add_permission('view') +- The ``UnencryptedCookieSessionFactoryConfig`` now accepts + ``signed_serialize`` and ``signed_deserialize`` hooks which may be used + to influence how the sessions are marshalled (by default this is done + with HMAC+pickle). + Deprecations ------------ -- cgit v1.2.3 From 75a8ff4ad0ba8eed13592eb5e7a211da3035e209 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Thu, 23 Aug 2012 10:53:04 -0500 Subject: updated CHANGES with accept-header bug fix --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index b8747f06c..e799c8f00 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -27,6 +27,11 @@ Bug Fixes when mixing up inheritance with asset specs. https://github.com/Pylons/pyramid/issues/662 +- HTTP Accept headers were not being normalized causing potentially + conflicting view registrations to go unnoticed. Two views that only + differ in the case ('text/html' vs. 'text/HTML') will now raise an error. + https://github.com/Pylons/pyramid/pull/620 + Features -------- -- cgit v1.2.3 From c9a0331f5f867a1ba3f13565f8c61cfa433bc8fc Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 24 Aug 2012 14:03:04 -0400 Subject: garden --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index e799c8f00..d20257679 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -32,6 +32,11 @@ 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. + Features -------- -- cgit v1.2.3 From 95f766bc7c380797c569da464f1f41d12b05bdbe Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 25 Aug 2012 00:10:46 -0400 Subject: Subscriber predicates: - Add ``add_subscriber_predicate`` method to Configurator. - Allow ``add_subscriber`` and ``subscriber`` venusian decorator to accept ``**predicates`` arguments. - Document subscriber predicate feature. - Share more code between view, route, and subscriber related method wrt predicates. --- CHANGES.txt | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index d20257679..369e9d74d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -40,9 +40,11 @@ Bug Fixes Features -------- -- Third-party custom view and route predicates can now be added for use by - view authors via ``pyramid.config.Configurator.add_view_predicate`` and - ``pyramid.config.Configurator.add_route_predicate``. So, for example, +- Third-party custom view, route, and subscriber predicates can now be added + for use by view authors via + ``pyramid.config.Configurator.add_view_predicate``, + ``pyramid.config.Configurator.add_route_predicate`` and + ``pyramid.config.Configurator.add_subscriber_predicate``. So, for example, doing this:: config.add_view_predicate('abc', my.package.ABCPredicate) @@ -52,8 +54,9 @@ Features @view_config(abc=1) - See "Adding A Third Party View or Route Predicate" in the Hooks chapter for - more information. + Similar features exist for ``add_route``, and ``add_subscriber``. See + "Adding A Third Party View, Route, or Subscriber Predicate" in the Hooks + chapter for more information. Note that changes made to support the above feature now means that only actions registered using the same "order" can conflict with one another. -- cgit v1.2.3 From a9289d95036eb23e973815e529d3db3fea235046 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 26 Aug 2012 15:50:34 -0400 Subject: - 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() < function()`` exception. --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 369e9d74d..c414ab74c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -37,6 +37,11 @@ Bug Fixes ``__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() < + function()`` exception. + Features -------- -- cgit v1.2.3 From 8b55a68adb54783895a91a9e1af800a7f8f22c07 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 29 Aug 2012 16:06:17 -0400 Subject: garden --- CHANGES.txt | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index a9dd18985..62c37f374 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -81,10 +81,21 @@ 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 and returns the template def - result for the view being called. The uri format using an asset spec is - package:path/to/template#defname.mako. The old way of returning a tuple - from the view is supported for backward compatibility, ('defname', {}). +- The Mako renderer now accepts a def name in an asset spect. 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', {}). + +- 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 + macro listed as a ``define-macro`` and return the result instead of + rendering the entire template. An example asset spec: + ``package:path/to/template#macroname.pt``. This will render the macro + defined as ``macroname`` within the ``template.pt`` template instead of the + entire templae. - When there is a predicate mismatch exception (seen when no view matches for a given request due to predicates not working), the exception now contains -- cgit v1.2.3 From f6bd88ecb34b26315b01650dfa586ea8b59dc746 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 8 Sep 2012 18:37:09 -0400 Subject: trivial change to poke jenkins (im in on an untrusted network and cant use the jenkins web ui because we dont have https access to it) --- CHANGES.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index bb726738c..9e911ce7e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,7 @@ Next release ============ + Bug Fixes --------- -- cgit v1.2.3 From ebcdc7cccc977e388426f581abaf16e39c49cdbd Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 9 Sep 2012 13:06:06 -0400 Subject: - It is no longer possible to pass an environ dictionary directly to ``pyramid.traversal.ResourceTreeTraverser.__call__`` (aka ``ModelGraphTraverser.__call__``). Instead, you must pass a request object. Passing an environment instead of a request has generated a deprecation warning since Pyramid 1.1. - Pyramid will no longer work properly if you use the ``webob.request.LegacyRequest`` as a request factory. Instances of the LegacyRequest class have a ``request.path_info`` which return a string. This Pyramid release assumes that ``request.path_info`` will unconditionally be Unicode. - Pyramid now requires WebOb 1.2b3+ (the prior Pyramid release only relied on 1.2dev+). This is to ensure that we obtain a version of WebOb that returns ``request.path_info`` as text. --- CHANGES.txt | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index bb726738c..41e716065 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -151,3 +151,32 @@ Deprecations featureful ``pyramid.config.Configurator.set_request_method`` should be used in its place (it has all of the same capabilities but can also extend the request object with methods). + +Backwards Incompatibilities +--------------------------- + +- The Pyramid router no longer adds the values ``bfg.routes.route`` and + ``bfg.routes.matchdict`` to the request's WSGI environment dictionary. + These values were docs-deprecated in ``repoze.bfg`` 1.0 (effectively seven + minor releases ago). If your code depended on these values, use + request.matched_route and request.matchdict instead. + +- It is no longer possible to pass an environ dictionary directly to + ``pyramid.traversal.ResourceTreeTraverser.__call__`` (aka + ``ModelGraphTraverser.__call__``). Instead, you must pass a request + object. Passing an environment instead of a request has generated a + deprecation warning since Pyramid 1.1. + +- Pyramid will no longer work properly if you use the + ``webob.request.LegacyRequest`` as a request factory. Instances of the + LegacyRequest class have a ``request.path_info`` which return a string. + This Pyramid release assumes that ``request.path_info`` will + unconditionally be Unicode. + +Dependencies +------------ + +- Pyramid now requires WebOb 1.2b3+ (the prior Pyramid release only relied on + 1.2dev+). This is to ensure that we obtain a version of WebOb that returns + ``request.path_info`` as text. + -- cgit v1.2.3 From 25d3ddfd61bcc97ad6e2d5d9c51a71719f18af57 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 9 Sep 2012 13:12:16 -0400 Subject: garden --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 41e716065..294950d1d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -155,7 +155,7 @@ Deprecations Backwards Incompatibilities --------------------------- -- The Pyramid router no longer adds the values ``bfg.routes.route`` and +- The Pyramid router no longer adds the values ``bfg.routes.route`` or ``bfg.routes.matchdict`` to the request's WSGI environment dictionary. These values were docs-deprecated in ``repoze.bfg`` 1.0 (effectively seven minor releases ago). If your code depended on these values, use -- cgit v1.2.3 From 3d42722767f2b5843b61f6627aec5ee8080d0f75 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 9 Sep 2012 14:05:11 -0400 Subject: - The functions from ``pyramid.chameleon_zpt`` and ``pyramid.chameleon_text`` named ``get_renderer``, ``get_template``, ``render_template``, and ``render_template_to_response`` have been removed. These have issued a deprecation warning upon import since Pyramid 1.0. Use ``pyramid.renderers.get_renderer()``, ``pyramid.renderers.get_renderer().implementation()``, ``pyramid.renderers.render()`` or ``pyramid.renderers.render_to_response`` respectively instead of these functions. --- CHANGES.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index dd5f66e5b..bbe723476 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -174,6 +174,15 @@ Backwards Incompatibilities This Pyramid release assumes that ``request.path_info`` will unconditionally be Unicode. +- The functions from ``pyramid.chameleon_zpt`` and ``pyramid.chameleon_text`` + named ``get_renderer``, ``get_template``, ``render_template``, and + ``render_template_to_response`` have been removed. These have issued a + deprecation warning upon import since Pyramid 1.0. Use + ``pyramid.renderers.get_renderer()``, + ``pyramid.renderers.get_renderer().implementation()``, + ``pyramid.renderers.render()`` or ``pyramid.renderers.render_to_response`` + respectively instead of these functions. + Dependencies ------------ -- cgit v1.2.3 From 94a6f356e87829fb96ddbb7aa293f8446de7bf52 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 9 Sep 2012 14:19:18 -0400 Subject: - The ``pyramid.configuration`` module was removed. It had been deprecated since Pyramid 1.0 and printed a deprecation warning upon its use. Use ``pyramid.config`` instead. --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index bbe723476..b93a02193 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -183,6 +183,10 @@ Backwards Incompatibilities ``pyramid.renderers.render()`` or ``pyramid.renderers.render_to_response`` respectively instead of these functions. +- The ``pyramid.configuration`` module was removed. It had been deprecated + since Pyramid 1.0 and printed a deprecation warning upon its use. Use + ``pyramid.config`` instead. + Dependencies ------------ -- cgit v1.2.3 From b274d051847299a7dc52781fbc3ce0f61070138d Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 9 Sep 2012 14:26:40 -0400 Subject: - The ``pyramid.paster.PyramidTemplate`` API was removed. It had been deprecated since Pyramid 1.1 and issued a warning on import. If your code depended on this, adjust your code to import ``pyramid.scaffolds.PyramidTemplate`` instead. --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index b93a02193..7e0bf73cf 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -187,6 +187,11 @@ Backwards Incompatibilities since Pyramid 1.0 and printed a deprecation warning upon its use. Use ``pyramid.config`` instead. +- The ``pyramid.paster.PyramidTemplate`` API was removed. It had been + deprecated since Pyramid 1.1 and issued a warning on import. If your code + depended on this, adjust your code to import + ``pyramid.scaffolds.PyramidTemplate`` instead. + Dependencies ------------ -- cgit v1.2.3 From ef2e51792e4f2b970d23186dd883ad4fbf7d0815 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 9 Sep 2012 14:32:00 -0400 Subject: - The ``pyramid.settings.get_settings()`` API was removed. It had been printing a deprecation warning since Pyramid 1.0. If your code depended on this API, use ``pyramid.threadlocal.get_current_registry().settings`` instead or use the ``settings`` attribute of the registry available from the request (``request.registry.settings``). --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 7e0bf73cf..cffccca06 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -192,6 +192,12 @@ Backwards Incompatibilities depended on this, adjust your code to import ``pyramid.scaffolds.PyramidTemplate`` instead. +- The ``pyramid.settings.get_settings()`` API was removed. It had been + printing a deprecation warning since Pyramid 1.0. If your code depended on + this API, use ``pyramid.threadlocal.get_current_registry().settings`` + instead or use the ``settings`` attribute of the registry available from + the request (``request.registry.settings``). + Dependencies ------------ -- cgit v1.2.3 From 69e0aadac592221717e72ffd2b089bd6eccb5f33 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 9 Sep 2012 18:25:02 -0400 Subject: - These APIs from the ``pyramid.testing`` module were removed. They have been printing deprecation warnings since Pyramid 1.0: * ``registerDummySecurityPolicy``, use ``pyramid.config.Configurator.testing_securitypolicy`` instead. * ``registerResources`` (aka ``registerModels``, use ``pyramid.config.Configurator.testing_resources`` instead. * ``registerEventListener``, use ``pyramid.config.Configurator.testing_add_subscriber`` instead. * ``registerTemplateRenderer`` (aka `registerDummyRenderer``), use ``pyramid.config.Configurator.testing_add_template`` instead. * ``registerView``, use ``pyramid.config.Configurator.add_view`` instead. * ``registerUtility``, use ``pyramid.config.Configurator.registry.registerUtility`` instead. * ``registerAdapter``, use ``pyramid.config.Configurator.registry.registerAdapter`` instead. * ``registerSubscriber``, use ``pyramid.config.Configurator.add_subscriber`` instead. * ``registerRoute``, use ``pyramid.config.Configurator.add_route`` instead. * ``registerSettings``, use ``pyramid.config.Configurator.add_settings`` instead. --- CHANGES.txt | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index cffccca06..eedf50d14 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -198,6 +198,38 @@ Backwards Incompatibilities instead or use the ``settings`` attribute of the registry available from the request (``request.registry.settings``). +- These APIs from the ``pyramid.testing`` module were removed. They have + been printing deprecation warnings since Pyramid 1.0: + + * ``registerDummySecurityPolicy``, use + ``pyramid.config.Configurator.testing_securitypolicy`` instead. + + * ``registerResources`` (aka ``registerModels``, use + ``pyramid.config.Configurator.testing_resources`` instead. + + * ``registerEventListener``, use + ``pyramid.config.Configurator.testing_add_subscriber`` instead. + + * ``registerTemplateRenderer`` (aka `registerDummyRenderer``), use + ``pyramid.config.Configurator.testing_add_template`` instead. + + * ``registerView``, use ``pyramid.config.Configurator.add_view`` instead. + + * ``registerUtility``, use + ``pyramid.config.Configurator.registry.registerUtility`` instead. + + * ``registerAdapter``, use + ``pyramid.config.Configurator.registry.registerAdapter`` instead. + + * ``registerSubscriber``, use + ``pyramid.config.Configurator.add_subscriber`` instead. + + * ``registerRoute``, use + ``pyramid.config.Configurator.add_route`` instead. + + * ``registerSettings``, use + ``pyramid.config.Configurator.add_settings`` instead. + Dependencies ------------ -- cgit v1.2.3 From 023c88b67b907dd3682ef71216245609c9bbdbe1 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 9 Sep 2012 23:01:06 -0400 Subject: rename set_request_method to add_request_method. closes #683 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index eedf50d14..95a435ef4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -87,7 +87,7 @@ Features HEAD is a variant of GET that omits the body, and WebOb has special support to return an empty body when a HEAD is used. -- ``config.set_request_method`` has been introduced to support extending +- ``config.add_request_method`` has been introduced to support extending request objects with arbitrary callables. This method expands on the previous ``config.set_request_property`` by supporting methods as well as properties. This method now causes less code to be executed at @@ -149,7 +149,7 @@ Deprecations - The ``pyramid.config.Configurator.set_request_property`` has been documentation-deprecated. The method remains usable but the more - featureful ``pyramid.config.Configurator.set_request_method`` should be + featureful ``pyramid.config.Configurator.add_request_method`` should be used in its place (it has all of the same capabilities but can also extend the request object with methods). -- cgit v1.2.3 From 28dba04ad96aca432b1b55719c960c7e8837191c Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 10 Sep 2012 23:51:17 -0400 Subject: - ``pyramid.testing.DummyRequest`` now supports methods supplied by the ``pyramid.util.InstancePropertyMixin`` class such as ``set_property``. --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 95a435ef4..693cb4fc6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -144,6 +144,9 @@ Features to influence how the sessions are marshalled (by default this is done with HMAC+pickle). +- ``pyramid.testing.DummyRequest`` now supports methods supplied by the + ``pyramid.util.InstancePropertyMixin`` class such as ``set_property``. + Deprecations ------------ -- cgit v1.2.3 From 73598739fbd0596ef15b15f827d6a47fb5862a98 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 11 Sep 2012 01:18:20 -0400 Subject: - 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``. Related partially to issue #520 and issue #538 and issue #596, although it doesn't actually allow us to close any of them, because we still don't issue a newrequest event when bootstrap is used. --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 693cb4fc6..d510731fd 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -147,6 +147,16 @@ Features - ``pyramid.testing.DummyRequest`` now supports methods supplied by the ``pyramid.util.InstancePropertyMixin`` class such as ``set_property``. +- 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``. + Deprecations ------------ -- cgit v1.2.3 From dc8b49f436e3d249c6c9440cf2c1b74acf4a8ad8 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 11 Sep 2012 01:55:40 -0400 Subject: garden --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index d510731fd..44e594afb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -157,6 +157,9 @@ Features ``config.add_request_method`` are now available in the request object returned from ``pyramid.paster.bootstrap``. +- ``request.context`` of environment request during ``bootstrap`` is now the + root object if a context isn't already set on a provided request. + Deprecations ------------ -- cgit v1.2.3 From b72ba1a98ebc6fc6c8d9a11ab1c340b89015e644 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 13 Sep 2012 02:05:19 -0400 Subject: add upgrading chapter, make docs render again --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 44e594afb..47f51575c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -246,6 +246,12 @@ Backwards Incompatibilities * ``registerSettings``, use ``pyramid.config.Configurator.add_settings`` instead. +Documentation +------------- + +- Added an "Upgrading Pyramid" chapter to the narrative documentation. It + describes how to cope with deprecations and removals of Pyramid APIs. + Dependencies ------------ -- cgit v1.2.3 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 From 06a904f88a64dc0c12b8ed7803287bac8786ff67 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 13 Oct 2012 19:02:01 -0400 Subject: add docs and changelog note --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index e40401528..613be1b80 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,9 +1,19 @@ Next release ============ +Features +-------- + +- Allow multiple values to be specified to the ``request_param`` view/route + predicate as a sequence. Previously only a single string value was allowed. + See https://github.com/Pylons/pyramid/pull/705 + Bug Fixes --------- +- The match_param predicate's text method was fixed to sort its values. + Part of https://github.com/Pylons/pyramid/pull/705 + - 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 -- cgit v1.2.3 From de6ec0482e4d9d3d139ccd83edf35f8438470584 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 13 Oct 2012 19:20:11 -0400 Subject: mention comments --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 95375e5ba..fbac16117 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,9 @@ Features predicate as a sequence. Previously only a single string value was allowed. See https://github.com/Pylons/pyramid/pull/705 +- Comments with references to documentation sections placed in scaffold + ``.ini`` files. + Bug Fixes --------- -- cgit v1.2.3 From 9937a4e2d4c575486c04b089141bfbd6325f3711 Mon Sep 17 00:00:00 2001 From: Chris Rossi Date: Sun, 14 Oct 2012 14:16:39 -0400 Subject: Fix rst syntax error which prevented Sphinx docs from building. --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index df4ada7e9..4221c7071 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -17,7 +17,7 @@ Bug Fixes - 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 + 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. -- cgit v1.2.3 From 1f85ed07248f65ea414dc69d23056e6a15cee23b Mon Sep 17 00:00:00 2001 From: Chris Rossi Date: Sun, 14 Oct 2012 14:22:58 -0400 Subject: Update change log. --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 6f1dadc6b..bde6d4f92 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,6 +11,8 @@ Features - Comments with references to documentation sections placed in scaffold ``.ini`` files. +- Added an HTTP Basic authentication policy. + Bug Fixes --------- -- cgit v1.2.3 From 67fa5ad66216b6a1aa71fed639e3d2d82aa4458d Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 14 Oct 2012 16:01:09 -0400 Subject: point at policy --- CHANGES.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index bde6d4f92..9b3ce1253 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,7 +11,8 @@ Features - Comments with references to documentation sections placed in scaffold ``.ini`` files. -- Added an HTTP Basic authentication policy. +- Added an HTTP Basic authentication policy + at ``pyramid.authentication.BasicAuthAuthenticationPolicy``. Bug Fixes --------- -- cgit v1.2.3 From c25a8fd5d2895a117d8eb77162ed8388f0482674 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 26 Oct 2012 00:32:08 -0400 Subject: - New ``physical_path`` view predicate. If specified, this value should be a string or a tuple representing the physical traversal path of the context found via traversal for this predicate to match as true. For example: ``physical_path='/'`` or ``physical_path='/a/b/c'`` or ``physical_path=('', 'a', 'b', 'c')``. This is not a path prefix match or a regex, it's a whole-path match. It's useful when you want to always potentially show a view when some object is traversed to, but you can't be sure about what kind of object it will be, so you can't use the ``context`` predicate. The individual path elements inbetween slash characters or in tuple elements should be the Unicode representation of the name of the resource and should not be encoded in any way. --- CHANGES.txt | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 9b3ce1253..4baf81581 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,19 +1,6 @@ Next release ============ -Features --------- - -- Allow multiple values to be specified to the ``request_param`` view/route - predicate as a sequence. Previously only a single string value was allowed. - See https://github.com/Pylons/pyramid/pull/705 - -- Comments with references to documentation sections placed in scaffold - ``.ini`` files. - -- Added an HTTP Basic authentication policy - at ``pyramid.authentication.BasicAuthAuthenticationPolicy``. - Bug Fixes --------- @@ -40,6 +27,16 @@ Bug Fixes Features -------- +- Allow multiple values to be specified to the ``request_param`` view/route + predicate as a sequence. Previously only a single string value was allowed. + See https://github.com/Pylons/pyramid/pull/705 + +- Comments with references to documentation sections placed in scaffold + ``.ini`` files. + +- Added an HTTP Basic authentication policy + at ``pyramid.authentication.BasicAuthAuthenticationPolicy``. + - The Configurator ``testing_securitypolicy`` method now returns the policy object it creates. @@ -56,6 +53,18 @@ Features ``remembered`` value on the policy, which is the value of the ``principal`` argument it's called with when its ``remember`` method is called. +- New ``physical_path`` view predicate. If specified, this value should be a + string or a tuple representing the physical traversal path of the context + found via traversal for this predicate to match as true. For example: + ``physical_path='/'`` or ``physical_path='/a/b/c'`` or ``physical_path=('', + 'a', 'b', 'c')``. This is not a path prefix match or a regex, it's a + whole-path match. It's useful when you want to always potentially show a + view when some object is traversed to, but you can't be sure about what kind + of object it will be, so you can't use the ``context`` predicate. The + individual path elements inbetween slash characters or in tuple elements + should be the Unicode representation of the name of the resource and should + not be encoded in any way. + 1.4a2 (2012-09-27) ================== -- cgit v1.2.3 From 4a6cca62ddf33580b1de210ef5ca54bfb2769243 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 26 Oct 2012 01:48:24 -0400 Subject: prep for 1.4a3 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 4baf81581..1eec21fc2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.4a3 (2012-10-26) +================== Bug Fixes --------- -- cgit v1.2.3 From c7337ba1b02915824cb33803993c8ba236ed23b9 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 28 Oct 2012 23:17:31 -0400 Subject: - Added an ``effective_principals`` route and view predicate. --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 1eec21fc2..740de0f17 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,11 @@ +Next release +============ + +Features +-------- + +- Added an ``effective_principals`` route and view predicate. + 1.4a3 (2012-10-26) ================== -- cgit v1.2.3 From 6099144cf0b85ecfb9c97e344ef6ca499833725e Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Tue, 30 Oct 2012 01:08:35 -0500 Subject: updated changes --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 740de0f17..25d2dc75c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,14 @@ Features - Added an ``effective_principals`` route and view predicate. +Bug Fixes +--------- + +- :func:`pyramid.security.view_execution_permitted` would return `True` if + no view could be found. This case now raises an exception as it doesn't + make sense make an assertion about a non-existant view. See + https://github.com/Pylons/pyramid/issues/299. + 1.4a3 (2012-10-26) ================== -- cgit v1.2.3 From 07c9ee0ec96eb664974fe314a46389ed59390520 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 2 Nov 2012 21:05:46 -0400 Subject: - Do not allow the userid returned from the ``authenticated_userid`` or the userid that is one of the list of principals returned by ``effective_principals`` to be either of the strings ``system.Everyone`` or ``system.Authenticated`` when any of the built-in authorization policies that live in ``pyramid.authentication`` are in use. These two strings are reserved for internal usage by Pyramid and they will not be accepted as valid userids. --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 740de0f17..291795da3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,14 @@ Features - Added an ``effective_principals`` route and view predicate. +- Do not allow the userid returned from the ``authenticated_userid`` or the + userid that is one of the list of principals returned by + ``effective_principals`` to be either of the strings ``system.Everyone`` or + ``system.Authenticated`` when any of the built-in authorization policies that + live in ``pyramid.authentication`` are in use. These two strings are + reserved for internal usage by Pyramid and they will not be accepted as valid + userids. + 1.4a3 (2012-10-26) ================== -- cgit v1.2.3 From 47146eb568aa35f88c567fd785f676a89ce76e12 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 2 Nov 2012 21:07:15 -0400 Subject: garden --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 291795da3..80d4a5dee 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,6 +14,8 @@ Features reserved for internal usage by Pyramid and they will not be accepted as valid userids. +- Slightly better debug logging from RepozeWho1AuthenticationPolicy. + 1.4a3 (2012-10-26) ================== -- cgit v1.2.3 From a007a4f5a7a6c81ef9bb15f4ccea35212bc020c0 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 2 Nov 2012 22:00:35 -0400 Subject: - In the past if a renderer returned ``None``, the body of the resulting response would be set explicitly to the empty string. Instead, now, the body is left unchanged, which allows the renderer to set a body itself by using e.g. ``request.response.body = b'foo'``. The body set by the renderer will be unmolested on the way out. See https://github.com/Pylons/pyramid/issues/709 Closes #709 --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 563851e74..0ef1a0593 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -21,6 +21,16 @@ Features it doesn't make sense to assert that a nonexistent view is execution-permitted. See https://github.com/Pylons/pyramid/issues/299. +Bug Fixes +--------- + +- In the past if a renderer returned ``None``, the body of the resulting + response would be set explicitly to the empty string. Instead, now, the body + is left unchanged, which allows the renderer to set a body itself by using + e.g. ``request.response.body = b'foo'``. The body set by the renderer will + be unmolested on the way out. See + https://github.com/Pylons/pyramid/issues/709 + 1.4a3 (2012-10-26) ================== -- cgit v1.2.3 From cb745b36a4b3b110728bfd4876e2d65649d22f3d Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 2 Nov 2012 22:48:30 -0400 Subject: garden; fixes #702 --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 0ef1a0593..86a9e8b50 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -21,6 +21,13 @@ Features it doesn't make sense to assert that a nonexistent view is execution-permitted. See https://github.com/Pylons/pyramid/issues/299. +- Get rid of shady monkeypatching of ``pyramid.request.Request`` and + ``pyramid.response.Response`` done within the ``__init__.py`` of Pyramid. + Webob no longer relies on this being done. Instead, the ResponseClass + attribute of the Pyramid Request class is assigned to the Pyramid response + class; that's enough to satisfy WebOb and behave as it did before with the + monkeypatching. + Bug Fixes --------- -- cgit v1.2.3 From 66fe1d05adbbcb07482972b4fd512676d68388ee Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 3 Nov 2012 19:02:53 -0400 Subject: - Move ``TopologicalSorter`` from ``pyramid.config.util`` to ``pyramid.util``, move ``CyclicDependencyError`` from ``pyramid.config.util`` to ``pyramid.exceptions``, rename ``Singleton`` to ``Sentinel`` and move from ``pyramid.config.util`` to ``pyramid.config.util``; this is in an effort to move that stuff that may be an API one day out of ``pyramid.config.util, because that package should never be imported from non-Pyramid code. TopologicalSorter is still not an API, but may become one. --- CHANGES.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 86a9e8b50..298bddf7a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -38,6 +38,17 @@ Bug Fixes be unmolested on the way out. See https://github.com/Pylons/pyramid/issues/709 +Internals +--------- + +- Move ``TopologicalSorter`` from ``pyramid.config.util`` to ``pyramid.util``, + move ``CyclicDependencyError`` from ``pyramid.config.util`` to + ``pyramid.exceptions``, rename ``Singleton`` to ``Sentinel`` and move from + ``pyramid.config.util`` to ``pyramid.config.util``; this is in an effort to + move that stuff that may be an API one day out of ``pyramid.config.util, + because that package should never be imported from non-Pyramid code. + TopologicalSorter is still not an API, but may become one. + 1.4a3 (2012-10-26) ================== -- cgit v1.2.3 From 34d4cd0ea38fdbe0ab0e0832fc2114953ef4e94a Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 4 Nov 2012 01:02:19 -0500 Subject: - In uncommon cases, the ``pyramid_excview_tween_factory`` might have inadvertently raised a ``KeyError`` looking for ``request_iface`` as an attribute of the request. It no longer fails in this case. See https://github.com/Pylons/pyramid/issues/700 Fixes #700 --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 298bddf7a..8d5a00e77 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -38,6 +38,11 @@ Bug Fixes be unmolested on the way out. See https://github.com/Pylons/pyramid/issues/709 +- In uncommon cases, the ``pyramid_excview_tween_factory`` might have + inadvertently raised a ``KeyError`` looking for ``request_iface`` as an + attribute of the request. It no longer fails in this case. See + https://github.com/Pylons/pyramid/issues/700 + Internals --------- -- cgit v1.2.3 From 04875452db1da40bd8ed0841869d511b8d86527d Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 4 Nov 2012 01:51:42 -0500 Subject: fix docs, upgrade tutorials, add change note, deprecate using zope.deprecation instead of a warning, make hashalg arg a kwarg in certain cases in case someone (maybe me) is using nonapi function imports from authentication --- CHANGES.txt | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 8d5a00e77..45fc19762 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -43,6 +43,24 @@ Bug Fixes attribute of the request. It no longer fails in this case. See https://github.com/Pylons/pyramid/issues/700 +Deprecations +------------ + +- The ``pyramid.authentication.AuthTktAuthenticationPolicy`` authentication + policy is deprecated in Pyramid 1.4 due to its use of the MD5 hashing + algorithm, which has known hash collision vulnerabilities. The risk of an + exploit is low. However, for improved authentication security, use the + ``pyramid.authentication.SHA512AuthTktAuthenticationPolicy`` instead. + Cookies generated by the AuthTktAuthenticationPolicy are not compatible with + cookies generated by the SHA512AuthTktAuthenticationPolicy, however, so + switching to the latter will imply that all existing users with a valid + cookie will be required to re-login. The SHA-512 version is not compatible + with Apache's mod_auth_tkt either, so if you are relying on that + compatibility, you'll want to stick with the MD5 version. + + A deprecation warning is now emitted when the AuthTktAuthenticationPolicy is + imported. + Internals --------- @@ -50,7 +68,7 @@ Internals move ``CyclicDependencyError`` from ``pyramid.config.util`` to ``pyramid.exceptions``, rename ``Singleton`` to ``Sentinel`` and move from ``pyramid.config.util`` to ``pyramid.config.util``; this is in an effort to - move that stuff that may be an API one day out of ``pyramid.config.util, + move that stuff that may be an API one day out of ``pyramid.config.util``, because that package should never be imported from non-Pyramid code. TopologicalSorter is still not an API, but may become one. -- cgit v1.2.3 From 19b8207ff1e959669d296407ed112545364a495d Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sun, 4 Nov 2012 11:19:41 -0600 Subject: merged SHA512AuthTktAuthenticationPolicy into AuthTktAuthenticationPolicy AuthTktAuthenticationPolicy now accepts a hashalg parameter and is no longer deprecated. Docs recommend overriding hashalg and using 'sha512'. --- CHANGES.txt | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 45fc19762..390d3c3e3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,10 @@ Next release Features -------- +- ``pyramid.authentication.AuthTktAuthenticationPolicy`` has been updated to + support newer hashing algorithms such as ``sha512``. Existing applications + should consider updating if possible. + - Added an ``effective_principals`` route and view predicate. - Do not allow the userid returned from the ``authenticated_userid`` or the @@ -43,24 +47,6 @@ Bug Fixes attribute of the request. It no longer fails in this case. See https://github.com/Pylons/pyramid/issues/700 -Deprecations ------------- - -- The ``pyramid.authentication.AuthTktAuthenticationPolicy`` authentication - policy is deprecated in Pyramid 1.4 due to its use of the MD5 hashing - algorithm, which has known hash collision vulnerabilities. The risk of an - exploit is low. However, for improved authentication security, use the - ``pyramid.authentication.SHA512AuthTktAuthenticationPolicy`` instead. - Cookies generated by the AuthTktAuthenticationPolicy are not compatible with - cookies generated by the SHA512AuthTktAuthenticationPolicy, however, so - switching to the latter will imply that all existing users with a valid - cookie will be required to re-login. The SHA-512 version is not compatible - with Apache's mod_auth_tkt either, so if you are relying on that - compatibility, you'll want to stick with the MD5 version. - - A deprecation warning is now emitted when the AuthTktAuthenticationPolicy is - imported. - Internals --------- -- cgit v1.2.3 From ca4656877ab909b88ee1730cab611c8007ff7a39 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sun, 4 Nov 2012 11:37:35 -0600 Subject: garden --- CHANGES.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 45fc19762..a9ce80712 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,7 +14,8 @@ Features reserved for internal usage by Pyramid and they will not be accepted as valid userids. -- Slightly better debug logging from RepozeWho1AuthenticationPolicy. +- Slightly better debug logging from + ``pyramid.authentication.RepozeWho1AuthenticationPolicy``. - ``pyramid.security.view_execution_permitted`` used to return `True` if no view could be found. It now raises a ``TypeError`` exception in that case, as @@ -67,7 +68,7 @@ Internals - Move ``TopologicalSorter`` from ``pyramid.config.util`` to ``pyramid.util``, move ``CyclicDependencyError`` from ``pyramid.config.util`` to ``pyramid.exceptions``, rename ``Singleton`` to ``Sentinel`` and move from - ``pyramid.config.util`` to ``pyramid.config.util``; this is in an effort to + ``pyramid.config.util`` to ``pyramid.util``; this is in an effort to move that stuff that may be an API one day out of ``pyramid.config.util``, because that package should never be imported from non-Pyramid code. TopologicalSorter is still not an API, but may become one. -- cgit v1.2.3 From ca3df803c9afd04d7dee612e0bf321cc62cf900f Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sun, 4 Nov 2012 12:34:22 -0600 Subject: emit a warning if a user is using the default hashalg to AuthTkt --- CHANGES.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index b3733a787..43a910f96 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -48,6 +48,15 @@ Bug Fixes attribute of the request. It no longer fails in this case. See https://github.com/Pylons/pyramid/issues/700 +Deprecations +------------ + +- ``pyramid.authentication.AuthTktAuthenticationPolicy`` will emit a warning + if an application is using the policy without explicitly setting the + ``hashalg``. This is because the default is "md5" which is considered + insecure. If you really want "md5" then you must specify it explicitly to + get rid of the warning. + Internals --------- -- cgit v1.2.3 From a8d71ca12aa648aa70e0c00f303e60da1fa97a61 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 4 Nov 2012 18:39:25 -0500 Subject: - Allow a ``_depth`` argument to ``pyramid.view.view_config``, which will permit limited compisition reuse of the decorator by other software that wants to provide custom decorators that are much like view_config. Closes #637. --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 43a910f96..5175baa5a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -33,6 +33,10 @@ Features class; that's enough to satisfy WebOb and behave as it did before with the monkeypatching. +- Allow a ``_depth`` argument to ``pyramid.view.view_config``, which will + permit limited composition reuse of the decorator by other software that + wants to provide custom decorators that are much like view_config. + Bug Fixes --------- -- cgit v1.2.3 From 170124352a495438ef689d3376988bc8aefa8876 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sun, 4 Nov 2012 19:10:16 -0600 Subject: update changelog, close #627 --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 5175baa5a..d57444ad0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -37,6 +37,11 @@ Features permit limited composition reuse of the decorator by other software that wants to provide custom decorators that are much like view_config. +- Allow an iterable of decorators to be passed to + ``pyramid.config.Configurator.add_view``. This allows views to be wrapped + by more than one decorator without requiring combining the decorators + yourself. + Bug Fixes --------- -- cgit v1.2.3 From 267dbd261862c3d1e06ec49aad36e4bbae384eca Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 11 Nov 2012 12:35:16 -0500 Subject: - Be more tolerant of potential error conditions in ``match_param`` and ``physical_path`` predicate implementations; instead of raising an exception, return False. --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 5175baa5a..b0bbd32a2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -52,6 +52,10 @@ Bug Fixes attribute of the request. It no longer fails in this case. See https://github.com/Pylons/pyramid/issues/700 +- Be more tolerant of potential error conditions in ``match_param`` and + ``physical_path`` predicate implementations; instead of raising an exception, + return False. + Deprecations ------------ -- cgit v1.2.3 From 18a9aed5810a5680fc027b8c55c10bd67616d1b0 Mon Sep 17 00:00:00 2001 From: Robert Jackiewicz Date: Mon, 12 Nov 2012 12:47:23 -0500 Subject: Added changes to the CHANGES log. --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index e40312c34..c28597f0e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -81,6 +81,13 @@ Internals because that package should never be imported from non-Pyramid code. TopologicalSorter is still not an API, but may become one. +Documentation +------------- + +- Updated the hooks narrative documentation to reflect the fact that + the context passed into the view callable is actually the instance of + Exception called when a Forbidden Exception is envoked + 1.4a3 (2012-10-26) ================== -- cgit v1.2.3 From fd77b5c78677109c7756a690d0e4be43895ae12a Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 12 Nov 2012 11:54:01 -0600 Subject: removed doc-update from changelog --- CHANGES.txt | 7 ------- 1 file changed, 7 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index c28597f0e..e40312c34 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -81,13 +81,6 @@ Internals because that package should never be imported from non-Pyramid code. TopologicalSorter is still not an API, but may become one. -Documentation -------------- - -- Updated the hooks narrative documentation to reflect the fact that - the context passed into the view callable is actually the instance of - Exception called when a Forbidden Exception is envoked - 1.4a3 (2012-10-26) ================== -- cgit v1.2.3 From f89cfcdd50a8beba17a6d02854f4153961ff478c Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Tue, 13 Nov 2012 21:50:05 -0600 Subject: updated changelog --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index e40312c34..16e3d8586 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -61,6 +61,10 @@ Bug Fixes ``physical_path`` predicate implementations; instead of raising an exception, return False. +- :func:`pyramid.view.render_view` was not functioning properly under + Python 3.x due to a byte/unicode discrepancy. See + http://github.com/Pylons/pyramid/issues/721 + Deprecations ------------ -- cgit v1.2.3 From 39ef68dbc196824f66796fa91ea1eeeaa96d7471 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 14 Nov 2012 02:39:08 -0500 Subject: rearrange deck chairs --- CHANGES.txt | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 16e3d8586..16dad95f1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,7 +6,8 @@ Features - ``pyramid.authentication.AuthTktAuthenticationPolicy`` has been updated to support newer hashing algorithms such as ``sha512``. Existing applications - should consider updating if possible. + should consider updating if possible for improved security over the default + md5 hashing. - Added an ``effective_principals`` route and view predicate. @@ -21,18 +22,11 @@ Features - Slightly better debug logging from ``pyramid.authentication.RepozeWho1AuthenticationPolicy``. -- ``pyramid.security.view_execution_permitted`` used to return `True` if no +- ``pyramid.security.view_execution_permitted`` used to return ``True`` if no view could be found. It now raises a ``TypeError`` exception in that case, as it doesn't make sense to assert that a nonexistent view is execution-permitted. See https://github.com/Pylons/pyramid/issues/299. -- Get rid of shady monkeypatching of ``pyramid.request.Request`` and - ``pyramid.response.Response`` done within the ``__init__.py`` of Pyramid. - Webob no longer relies on this being done. Instead, the ResponseClass - attribute of the Pyramid Request class is assigned to the Pyramid response - class; that's enough to satisfy WebOb and behave as it did before with the - monkeypatching. - - Allow a ``_depth`` argument to ``pyramid.view.view_config``, which will permit limited composition reuse of the decorator by other software that wants to provide custom decorators that are much like view_config. @@ -61,18 +55,26 @@ Bug Fixes ``physical_path`` predicate implementations; instead of raising an exception, return False. -- :func:`pyramid.view.render_view` was not functioning properly under - Python 3.x due to a byte/unicode discrepancy. See +- ``pyramid.view.render_view`` was not functioning properly under Python 3.x + due to a byte/unicode discrepancy. See http://github.com/Pylons/pyramid/issues/721 Deprecations ------------ -- ``pyramid.authentication.AuthTktAuthenticationPolicy`` will emit a warning - if an application is using the policy without explicitly setting the - ``hashalg``. This is because the default is "md5" which is considered - insecure. If you really want "md5" then you must specify it explicitly to - get rid of the warning. +- ``pyramid.authentication.AuthTktAuthenticationPolicy`` will emit a warning if + an application is using the policy without explicitly passing a ``hashalg`` + argument. This is because the default is "md5" which is considered + theoretically subject to collision attacks. If you really want "md5" then you + must specify it explicitly to get rid of the warning. + +Documentation +------------- + +- All of the tutorials that use + ``pyramid.authentication.AuthTktAuthenticationPolicy`` now explicitly pass + ``sha512`` as a ``hashalg`` argument. + Internals --------- @@ -85,6 +87,13 @@ Internals because that package should never be imported from non-Pyramid code. TopologicalSorter is still not an API, but may become one. +- Get rid of shady monkeypatching of ``pyramid.request.Request`` and + ``pyramid.response.Response`` done within the ``__init__.py`` of Pyramid. + Webob no longer relies on this being done. Instead, the ResponseClass + attribute of the Pyramid Request class is assigned to the Pyramid response + class; that's enough to satisfy WebOb and behave as it did before with the + monkeypatching. + 1.4a3 (2012-10-26) ================== -- cgit v1.2.3 From 948068688561806a321a17bfc15c87446a577b5b Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 14 Nov 2012 02:49:16 -0500 Subject: prep for release --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 16dad95f1..9f5ce064f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.4a4 (2012-11-14) +================== Features -------- -- cgit v1.2.3 From 0ccdc23f6ec53548bb1f81f3b528f2a8be0a5467 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 18 Nov 2012 21:47:32 -0500 Subject: - A failure when trying to locate the attribute ``__text__`` on route and view predicates existed when the ``debug_routematch`` setting was true or when the ``pviews`` command was used. See https://github.com/Pylons/pyramid/pull/727 Closes #727. --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 9f5ce064f..f5c5c9449 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,13 @@ +Next release +============ + +Bug Fixes +--------- + +- A failure when trying to locate the attribute ``__text__`` on route and view + predicates existed when the ``debug_routematch`` setting was true or when the + ``pviews`` command was used. See https://github.com/Pylons/pyramid/pull/727 + 1.4a4 (2012-11-14) ================== -- cgit v1.2.3 From 71cd93bd78015285db9aaadaa63a5ac9042f6843 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 20 Nov 2012 18:36:56 -0500 Subject: - Small microspeed enhancement which anticipates that a ``pyramid.response.Response`` object is likely to be returned from a view. Some code is shortcut if the class of the object returned by a view is this class. A similar microoptimization was done to ``pyramid.request.Request.is_response``. --- CHANGES.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index f5c5c9449..22abf63d9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,15 @@ Next release ============ +Features +-------- + +- Small microspeed enhancement which anticipates that a + ``pyramid.response.Response`` object is likely to be returned from a view. + Some code is shortcut if the class of the object returned by a view is this + class. A similar microoptimization was done to + ``pyramid.request.Request.is_response``. + Bug Fixes --------- -- cgit v1.2.3 From b5e4443dd28f3d4ed6e767e06d658838575d159e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 20 Nov 2012 22:02:06 -0500 Subject: garden --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 22abf63d9..51266d15f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -17,6 +17,12 @@ Bug Fixes predicates existed when the ``debug_routematch`` setting was true or when the ``pviews`` command was used. See https://github.com/Pylons/pyramid/pull/727 +Documentation +------------- + +- Sync up tutorial source files with the files that are rendered by the + scaffold that each uses. + 1.4a4 (2012-11-14) ================== -- cgit v1.2.3 From 9132f65d8cfcd197ff8bc33e6190556b77becc96 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 20 Nov 2012 22:49:33 -0500 Subject: garden --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 51266d15f..b41a29a68 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,6 +10,11 @@ Features class. A similar microoptimization was done to ``pyramid.request.Request.is_response``. +- Make it possible to use variable arguments on ``p*`` commands (``pserve``, + ``pshell``, ``pviews``, etc) in the form ``a=1 b=2`` so you can fill in + values in parameterized ``.ini`` file, e.g. ``pshell etc/development.ini + http_port=8080``. + Bug Fixes --------- -- cgit v1.2.3 From 6ba0fc746b15262a018cd271efc14089a71d8297 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 20 Nov 2012 22:49:47 -0500 Subject: garden --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index b41a29a68..5344cb7d1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -13,7 +13,7 @@ Features - Make it possible to use variable arguments on ``p*`` commands (``pserve``, ``pshell``, ``pviews``, etc) in the form ``a=1 b=2`` so you can fill in values in parameterized ``.ini`` file, e.g. ``pshell etc/development.ini - http_port=8080``. + http_port=8080``. See https://github.com/Pylons/pyramid/pull/714 Bug Fixes --------- -- cgit v1.2.3 From 28fc3d575107a95a977a049eb38f55c6c422813a Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 21 Nov 2012 06:26:40 -0500 Subject: - In order to normalize the relationship between event subscribers and subscriber predicates, we now allow both subscribers and subscriber predicates to accept only a single ``event`` argument even if they've been subscribed for notifications that involve multiple interfaces. Subscribers and subscriber predicates that accept only one argument will receive the first object passed to ``notify``; this is typically (but not always) the event object. The other objects involved in the subscription lookup will be discarded. For instance, if an event is sent by code like this:: registry.notify(event, context) In the past, in order to catch such an event, you were obligated to write and register an event subscriber that mentioned both the event and the context in its argument list:: @subscriber([SomeEvent, SomeContextType]) def subscriber(event, context): pass With the event-only feature you can now write an event subscriber that accepts only ``event`` even if it subscribes to multiple interfaces:: @subscriber([SomeEvent, SomeContextType]) def subscriber(event): # this will work! Note, however, that if the event object is not the first object in the call to ``notify``, you'll run into trouble. For example, if notify is called with the context argument first:: registry.notify(context, event) You won't be able to take advantage of the feature. It will "work", but the object received by your event handler won't be the event object, it will be the context object, which won't be very useful:: @subscriber([SomeContextType, SomeEvent]) def subscriber(event): # bzzt! you'll be getting the context here as ``event``, and it'll # be useless Existing multiple-argument subscribers continue to work without issue, so you should continue use those if your system notifies using multiple interfaces and the first interface is not the event interface. For example:: @subscriber([SomeContextType, SomeEvent]) def subscriber(context, event): # this will still work! The event-only feature makes it possible to use a subscriber predicate that accepts only a request argument within both multiple-interface subscriber registrations and single-interface subscriber registrations. In the past, if you had a subscriber predicate like this:: class RequestPathStartsWith(object): def __init__(self, val, config): self.val = val def text(self): return 'path_startswith = %s' % (self.val,) phash = text def __call__(self, event): return event.request.path.startswith(self.val) If you attempted to use the above predicate to condition a subscription that involved multiple interfaces, it would not work. You had to change it to accept the same arguments as the subscription itself. For example, you might have had to change its ``__call__`` method like so, adding a ``context`` argument:: def __call__(self, event, context): return event.request.path.startswith(self.val) With the event-only feature, you needn't make the change. Instead, you can write all predicates so they only accept ``event`` in their ``__call__`` and they'll be useful across all registrations for subscriptions that use an event as their first argument, even ones which accept more than just ``event``. However, the same caveat applies to predicates as to subscriptions: if you're subscribing to a multi-interface event, and the first interface is not the event interface, the predicate won't work properly. In such a case, you'll need to match the predicate ``__call__`` argument ordering and composition to the ordering of the interfaces. For example:: def __call__(self, context, event): return event.request.path.startswith(self.val) tl;dr: 1) Always use the event as the first argument to a multi-interface subscription and 2) Use only ``event`` in your subscriber and subscriber predicate parameter lists, no matter how many interfaces the subscriber is notified with, as long as the event object is the first argument passed to ``registry.notify``. This will result in the maximum amount of reusability of subscriber predicates. --- CHANGES.txt | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 5344cb7d1..a625af3f9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -15,6 +15,104 @@ Features values in parameterized ``.ini`` file, e.g. ``pshell etc/development.ini http_port=8080``. See https://github.com/Pylons/pyramid/pull/714 +- In order to normalize the relationship between event subscribers and + subscriber predicates, we now allow both subscribers and subscriber + predicates to accept only a single ``event`` argument even if they've been + subscribed for notifications that involve multiple interfaces. Subscribers + and subscriber predicates that accept only one argument will receive the + first object passed to ``notify``; this is typically (but not always) the + event object. The other objects involved in the subscription lookup will be + discarded. + + For instance, if an event is sent by code like this:: + + registry.notify(event, context) + + In the past, in order to catch such an event, you were obligated to write and + register an event subscriber that mentioned both the event and the context in + its argument list:: + + @subscriber([SomeEvent, SomeContextType]) + def subscriber(event, context): + pass + + With the event-only feature you can now write an event subscriber that + accepts only ``event`` even if it subscribes to multiple interfaces:: + + @subscriber([SomeEvent, SomeContextType]) + def subscriber(event): + # this will work! + + Note, however, that if the event object is not the first object in the call + to ``notify``, you'll run into trouble. For example, if notify is called + with the context argument first:: + + registry.notify(context, event) + + You won't be able to take advantage of the feature. It will "work", but the + object received by your event handler won't be the event object, it will be + the context object, which won't be very useful:: + + @subscriber([SomeContextType, SomeEvent]) + def subscriber(event): + # bzzt! you'll be getting the context here as ``event``, and it'll + # be useless + + Existing multiple-argument subscribers continue to work without issue, so you + should continue use those if your system notifies using multiple interfaces + and the first interface is not the event interface. For example:: + + @subscriber([SomeContextType, SomeEvent]) + def subscriber(context, event): + # this will still work! + + The event-only feature makes it possible to use a subscriber predicate that + accepts only a request argument within both multiple-interface subscriber + registrations and single-interface subscriber registrations. In the past, if + you had a subscriber predicate like this:: + + class RequestPathStartsWith(object): + def __init__(self, val, config): + self.val = val + + def text(self): + return 'path_startswith = %s' % (self.val,) + + phash = text + + def __call__(self, event): + return event.request.path.startswith(self.val) + + If you attempted to use the above predicate to condition a subscription that + involved multiple interfaces, it would not work. You had to change it to + accept the same arguments as the subscription itself. For example, you might + have had to change its ``__call__`` method like so, adding a ``context`` + argument:: + + def __call__(self, event, context): + return event.request.path.startswith(self.val) + + With the event-only feature, you needn't make the change. Instead, you can + write all predicates so they only accept ``event`` in their ``__call__`` and + they'll be useful across all registrations for subscriptions that use an + event as their first argument, even ones which accept more than just + ``event``. However, the same caveat applies to predicates as to + subscriptions: if you're subscribing to a multi-interface event, and the + first interface is not the event interface, the predicate won't work + properly. In such a case, you'll need to match the predicate ``__call__`` + argument ordering and composition to the ordering of the interfaces. For + example:: + + def __call__(self, context, event): + return event.request.path.startswith(self.val) + + tl;dr: 1) Always use the event as the first argument to a multi-interface + subscription and 2) Use only ``event`` in your subscriber and subscriber + predicate parameter lists, no matter how many interfaces the subscriber is + notified with, as long as the event object is the first argument passed to + ``registry.notify``. This will result in the maximum amount of reusability + of subscriber predicates. + Bug Fixes --------- -- cgit v1.2.3 From f700d374e903a501bc32a4b10774e87c74edc4d8 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 21 Nov 2012 07:01:00 -0500 Subject: garden --- CHANGES.txt | 172 ++++++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 110 insertions(+), 62 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index a625af3f9..4e3e45a79 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -15,16 +15,10 @@ Features values in parameterized ``.ini`` file, e.g. ``pshell etc/development.ini http_port=8080``. See https://github.com/Pylons/pyramid/pull/714 -- In order to normalize the relationship between event subscribers and - subscriber predicates, we now allow both subscribers and subscriber - predicates to accept only a single ``event`` argument even if they've been - subscribed for notifications that involve multiple interfaces. Subscribers - and subscriber predicates that accept only one argument will receive the - first object passed to ``notify``; this is typically (but not always) the - event object. The other objects involved in the subscription lookup will be - discarded. - - For instance, if an event is sent by code like this:: +- A somewhat advanced and obscure feature of Pyramid event handlers is their + ability to handle "multi-interface" notifications. These notifications have + traditionally presented multiple objects to the subscriber callable. For + instance, if an event was sent by code like this:: registry.notify(event, context) @@ -33,28 +27,101 @@ Features its argument list:: @subscriber([SomeEvent, SomeContextType]) - def subscriber(event, context): + def asubscriber(event, context): + pass + + In many subscriber callables registered this way, it was common for the logic + in the subscriber callable to completely ignore the second and following + arguments (e.g. ``context`` in the above example might be ignored), because + they usually existed as attributes of the event anyway. You could usually + get the same value by doing ``event.context`` or similar in most cases. + + The fact that you needed to put an extra argument which you usually ignored + in the subscriber callable body was only a minor annoyance until we added + "subscriber predicates" in a prior 1.4 alpha release. Subscriber predicates + are used to narrow the set of circumstances under which a subscriber will be + executed. Once those were added, the annoyance was escalated, because + subscriber predicates needed to accept the same argument list and arity as + the subscriber callables that they were configured against. So, for example, + if you had these two subscriber registrations in your code:: + + @subscriber([SomeEvent, SomeContextType]) + def asubscriber(event, context): + pass + + @subscriber(SomeOtherEvent) + def asubscriber(event): + pass + + And you wanted to use a subscriber predicate:: + + @subscriber([SomeEvent, SomeContextType], mypredicate=True) + def asubscriber(event, context): pass - With the event-only feature you can now write an event subscriber that - accepts only ``event`` even if it subscribes to multiple interfaces:: + @subscriber(SomeOtherEvent, mypredicate=True) + def asubscriber(event): + pass + + If you had previously written your ``mypredicate`` subscriber predicate that + accepted in such a way that it accepted only one argument in its + ``__call__``, you could not use it against a subscription which named more + than one interface in its subscriber interface list. Similarly, if you had + written a subscriber predicate that accepted two arguments, you couldn't use + it against a registration that named only a single interface type. For + example, if you created this predicate:: + + class MyPredicate(object): + # portions elided... + def __call__(self, event): + return self.val == event.context.foo + + It would not work against a multi-interface-registered subscription. + + To hack around this limitation, you needed to design a ``mypredicate`` + predicate to expect to receive in its ``__call__`` either a single ``event`` + argument (a SomeOtherEvent object) *or* a pair of arguments (a SomeEvent + object and a SomeContextType object), presumably by doing something like + this:: + + class MyPredicate(object): + # portions elided... + def __call__(self, event, context=None): + return self.val == event.context.foo + + This was confusing and bad. + + In order to allow people to ignore unused arguments to subscriber callables + and to normalize the relationship between event subscribers and subscriber + predicates, we now allow both subscribers and subscriber predicates to accept + only a single ``event`` argument even if they've been subscribed for + notifications that involve multiple interfaces. Subscribers and subscriber + predicates that accept only one argument will receive the first object passed + to ``notify``; this is typically (but not always) the event object. The + other objects involved in the subscription lookup will be discarded. You can + now write an event subscriber that accepts only ``event`` even if it + subscribes to multiple interfaces:: @subscriber([SomeEvent, SomeContextType]) - def subscriber(event): + def asubscriber(event): # this will work! - Note, however, that if the event object is not the first object in the call - to ``notify``, you'll run into trouble. For example, if notify is called - with the context argument first:: + This prevents you from needing to match the subscriber callable parameters to + the subscription type unnecessarily, especially when you don't make use of + any argument in your subscribers except for the event object itself. + + Note, however, that if the event object is not the first + object in the call to ``notify``, you'll run into trouble. For example, if + notify is called with the context argument first:: registry.notify(context, event) - You won't be able to take advantage of the feature. It will "work", but the - object received by your event handler won't be the event object, it will be - the context object, which won't be very useful:: + You won't be able to take advantage of the event-only feature. It will + "work", but the object received by your event handler won't be the event + object, it will be the context object, which won't be very useful:: @subscriber([SomeContextType, SomeEvent]) - def subscriber(event): + def asubscriber(event): # bzzt! you'll be getting the context here as ``event``, and it'll # be useless @@ -63,55 +130,36 @@ Features and the first interface is not the event interface. For example:: @subscriber([SomeContextType, SomeEvent]) - def subscriber(context, event): + def asubscriber(context, event): # this will still work! The event-only feature makes it possible to use a subscriber predicate that accepts only a request argument within both multiple-interface subscriber - registrations and single-interface subscriber registrations. In the past, if - you had a subscriber predicate like this:: - - class RequestPathStartsWith(object): - def __init__(self, val, config): - self.val = val - - def text(self): - return 'path_startswith = %s' % (self.val,) - - phash = text - - def __call__(self, event): - return event.request.path.startswith(self.val) - - If you attempted to use the above predicate to condition a subscription that - involved multiple interfaces, it would not work. You had to change it to - accept the same arguments as the subscription itself. For example, you might - have had to change its ``__call__`` method like so, adding a ``context`` - argument:: - - def __call__(self, event, context): - return event.request.path.startswith(self.val) - - With the event-only feature, you needn't make the change. Instead, you can - write all predicates so they only accept ``event`` in their ``__call__`` and - they'll be useful across all registrations for subscriptions that use an - event as their first argument, even ones which accept more than just - ``event``. However, the same caveat applies to predicates as to - subscriptions: if you're subscribing to a multi-interface event, and the - first interface is not the event interface, the predicate won't work - properly. In such a case, you'll need to match the predicate ``__call__`` - argument ordering and composition to the ordering of the interfaces. For - example:: + registrations and single-interface subscriber registrations. You needn't + make slightly different variations of predicates depending on the + subscription type arguments. Instead, just write all your subscriber + predicates so they only accept ``event`` in their ``__call__`` and they'll be + useful across all registrations for subscriptions that use an event as their + first argument, even ones which accept more than just ``event``. + + However, the same caveat applies to predicates as to subscriber callables: if + you're subscribing to a multi-interface event, and the first interface is not + the event interface, the predicate won't work properly. In such a case, + you'll need to match the predicate ``__call__`` argument ordering and + composition to the ordering of the interfaces. For example, if the + registration for the subscription uses ``[SomeContext, SomeEvent]``, you'll + need to reflect that in the ordering of the parameters of the predicate's + ``__call__`` method:: def __call__(self, context, event): return event.request.path.startswith(self.val) - tl;dr: 1) Always use the event as the first argument to a multi-interface - subscription and 2) Use only ``event`` in your subscriber and subscriber - predicate parameter lists, no matter how many interfaces the subscriber is - notified with, as long as the event object is the first argument passed to - ``registry.notify``. This will result in the maximum amount of reusability - of subscriber predicates. + tl;dr: 1) When using multi-interface subscriptions, always use the event type + as the first subscription registration argument and 2) When 1 is true, use + only ``event`` in your subscriber and subscriber predicate parameter lists, + no matter how many interfaces the subscriber is notified with. This + combination will result in the maximum amount of reusability of subscriber + predicates and the least amount of thought on your part. Drink responsibly. Bug Fixes --------- -- cgit v1.2.3 From a3810e706bce12c0195737c2713362795613e2ae Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 21 Nov 2012 07:05:04 -0500 Subject: garden --- CHANGES.txt | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 4e3e45a79..01fd60161 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -34,16 +34,16 @@ Features in the subscriber callable to completely ignore the second and following arguments (e.g. ``context`` in the above example might be ignored), because they usually existed as attributes of the event anyway. You could usually - get the same value by doing ``event.context`` or similar in most cases. + get the same value by doing ``event.context`` or similar. The fact that you needed to put an extra argument which you usually ignored in the subscriber callable body was only a minor annoyance until we added - "subscriber predicates" in a prior 1.4 alpha release. Subscriber predicates - are used to narrow the set of circumstances under which a subscriber will be - executed. Once those were added, the annoyance was escalated, because - subscriber predicates needed to accept the same argument list and arity as - the subscriber callables that they were configured against. So, for example, - if you had these two subscriber registrations in your code:: + "subscriber predicates", used to narrow the set of circumstances under which + a subscriber will be executed, in a prior 1.4 alpha release. Once those were + added, the annoyance was escalated, because subscriber predicates needed to + accept the same argument list and arity as the subscriber callables that they + were configured against. So, for example, if you had these two subscriber + registrations in your code:: @subscriber([SomeEvent, SomeContextType]) def asubscriber(event, context): @@ -56,33 +56,37 @@ Features And you wanted to use a subscriber predicate:: @subscriber([SomeEvent, SomeContextType], mypredicate=True) - def asubscriber(event, context): + def asubscriber1(event, context): pass @subscriber(SomeOtherEvent, mypredicate=True) - def asubscriber(event): + def asubscriber2(event): pass - If you had previously written your ``mypredicate`` subscriber predicate that - accepted in such a way that it accepted only one argument in its - ``__call__``, you could not use it against a subscription which named more - than one interface in its subscriber interface list. Similarly, if you had - written a subscriber predicate that accepted two arguments, you couldn't use - it against a registration that named only a single interface type. For - example, if you created this predicate:: + If an existing ``mypredicate`` subscriber predicate had been written in such + a way that it accepted only one argument in its ``__call__``, you could not + use it against a subscription which named more than one interface in its + subscriber interface list. Similarly, if you had written a subscriber + predicate that accepted two arguments, you couldn't use it against a + registration that named only a single interface type. + + For example, if you created this predicate:: class MyPredicate(object): # portions elided... def __call__(self, event): return self.val == event.context.foo - It would not work against a multi-interface-registered subscription. + It would not work against a multi-interface-registered subscription, so in + the above example, when you attempted to use it against ``asubscriber1``, it + would fail at runtime with a TypeError, claiming something was attempting to + call it with too many arguments. - To hack around this limitation, you needed to design a ``mypredicate`` - predicate to expect to receive in its ``__call__`` either a single ``event`` - argument (a SomeOtherEvent object) *or* a pair of arguments (a SomeEvent - object and a SomeContextType object), presumably by doing something like - this:: + To hack around this limitation, you were obligated to design the + ``mypredicate`` predicate to expect to receive in its ``__call__`` either a + single ``event`` argument (a SomeOtherEvent object) *or* a pair of arguments + (a SomeEvent object and a SomeContextType object), presumably by doing + something like this:: class MyPredicate(object): # portions elided... -- cgit v1.2.3 From 1608b26c9d3967d258613f038ff8b5f258a4a698 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 21 Nov 2012 23:19:43 -0500 Subject: prep for 1.4b1 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 01fd60161..841d2ebec 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.4b1 (2012-11-21) +================== Features -------- -- cgit v1.2.3 From ed14191bb41a891be258fc66e671bea8a25f7db1 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Thu, 6 Dec 2012 15:13:49 -0600 Subject: _depth argument to view_config is now relative to view_config This hides an implementation detail that view_config is at least 1 level away from user code. --- CHANGES.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 841d2ebec..1f2b1fc30 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,15 @@ +next release +============ + +Backwards Incompatibilities +--------------------------- + +- Modified the ``_depth`` argument to ``pyramid.view.view_config`` to accept + a value relative to the invocation of ``view_config`` itself. Thus, when it + was previously expecting a value of ``1`` or greater, to reflect that + the caller of ``view_config`` is 1 stack frame away from ``venusian.attach``, + this implementation detail is now hidden. + 1.4b1 (2012-11-21) ================== -- cgit v1.2.3 From a078e197d04400d2430206fe31e3398c761b20a3 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 6 Dec 2012 23:14:14 -0500 Subject: add changenote --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 1f2b1fc30..9d3a017ab 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,6 +10,10 @@ Backwards Incompatibilities the caller of ``view_config`` is 1 stack frame away from ``venusian.attach``, this implementation detail is now hidden. +- Modified the ``_backframes`` argument to ``pyramid.util.action_method`` in a + similar way to the changes described to ``_depth`` above. This argument + remains undocumented, but might be used in the wild by some insane person. + 1.4b1 (2012-11-21) ================== -- cgit v1.2.3 From a7e0e601df4e093ebd2fdd7b53bd0bbb9e8d7ce5 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 10 Dec 2012 15:46:57 -0500 Subject: prep for 1.4b2 --- CHANGES.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 9d3a017ab..e7c6e2b24 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,12 @@ -next release -============ +1.4b2 (2012-12-10) +================== + +Docs +---- + +- Scaffolding is now PEP-8 compliant (at least for a brief shining moment). + +- Tutorial improvements. Backwards Incompatibilities --------------------------- -- cgit v1.2.3 From e609e19d028b1d714439188812ca3c9811e0a508 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 10 Dec 2012 21:42:18 -0500 Subject: prep for 1.4b3 --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index e7c6e2b24..1191347e6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,9 @@ +1.4b3 (2012-12-10) +================== + +- Packaging release only, no code changes. 1.4b2 was a brownbag release due to + missing directories in the tarball. + 1.4b2 (2012-12-10) ================== -- cgit v1.2.3 From 758fa23e2cce36d72d6f0f14370c628aaeeb64d0 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 18 Dec 2012 02:39:34 -0500 Subject: garden --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 1191347e6..364dacf73 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,11 @@ +Next release +============ + +Docs +---- + +- Fix functional tests in the ZODB tutorial + 1.4b3 (2012-12-10) ================== -- cgit v1.2.3 From 96ab9f26990423f67045e5639a29579a1a76a71e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 18 Dec 2012 03:00:29 -0500 Subject: prep for 1.4 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 364dacf73..cfa49fb1a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.4 (2012-12-18) +================ Docs ---- -- cgit v1.2.3 From 08c2217e7f831379016e1ddee0b5d51eeca53878 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Tue, 1 Jan 2013 23:56:02 +0200 Subject: eliminate repeated "the" words --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index cfa49fb1a..1f6ae742c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -536,7 +536,7 @@ Features - An ``add_permission`` directive method was added to the Configurator. This directive registers a free-standing permission introspectable into the Pyramid introspection system. Frameworks built atop Pyramid can thus use - the the ``permissions`` introspectable category data to build a + the ``permissions`` introspectable category data to build a comprehensive list of permissions supported by a running system. Before this method was added, permissions were already registered in this introspectable category as a side effect of naming them in an ``add_view`` -- cgit v1.2.3 From 043ccddb909327106264d10ed5d413760a51770d Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Wed, 2 Jan 2013 02:22:52 +0200 Subject: eliminate other repeated words --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 1f6ae742c..adf448945 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -332,7 +332,7 @@ Bug Fixes - 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 + well as a view configuration without a macro name in 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. -- cgit v1.2.3 From 9e1e6d3f6d8e131afe102f60af3ca8f597b32745 Mon Sep 17 00:00:00 2001 From: Amos Latteier Date: Thu, 10 Jan 2013 15:19:08 -0500 Subject: Change log note. --- CHANGES.txt | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index adf448945..54623ddd2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,40 @@ +Bug Fixes +--------- + +- Now predicate mismatches don't hide valid views. This is mostly an + issue with views that use request_method predicates. Here's an + example that now works:: + + class IResource(Interface): + ... + + @view_config(context=IResource) + def get(context, request): + ... + + @view_config(context=IResource, request_method='POST') + def post(context, request): + ... + + @view_config(context=IResource, request_method='DELETE') + def delete(context, request): + ... + + @implementor(IResource) + class MyResource: + ... + + @view_config(context=MyResource, request_method='POST') + def override_post(context, request): + ... + + Previously the override_post view registration would hide the get + and delete views in the context of MyResource -- leading to a + predicate mismatch error when trying to use GET or DELETE + methods. Now the views are found and no predicate mismatch is + raised. + + 1.4 (2012-12-18) ================ -- cgit v1.2.3 From cd8ac801ac1ccefb81c2e015124be910cb8c93de Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Fri, 15 Feb 2013 00:48:08 +0200 Subject: update some links and fix others --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index adf448945..e3b77dedc 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -274,7 +274,7 @@ Bug Fixes - ``pyramid.view.render_view`` was not functioning properly under Python 3.x due to a byte/unicode discrepancy. See - http://github.com/Pylons/pyramid/issues/721 + https://github.com/Pylons/pyramid/issues/721 Deprecations ------------ -- cgit v1.2.3 From cec2b05e74b3296ab8b54b9644223e08f269808b Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Sat, 9 Mar 2013 03:15:15 +0200 Subject: consistency --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index adf448945..088c8aaa5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -511,7 +511,7 @@ Features - The static view machinery now raises (rather than returns) ``HTTPNotFound`` and ``HTTPMovedPermanently`` exceptions, so these can be caught by the - NotFound view (and other exception views). + Not Found View (and other exception views). - 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 -- cgit v1.2.3 From 2d931400b22f4c5764df68c2799be512e60a2de1 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 18 Mar 2013 21:00:50 -0700 Subject: support acl as a callable --- CHANGES.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 85dd3be2a..ae2cafba4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,16 @@ +next release +============ + +Features +-------- + +- ``ACLAuthorizationPolicy`` supports ``__acl__`` as a callable. This + removes the ambiguity between the potential ``AttributeError`` that would + be raised on the ``context`` when the property was not defined and the + ``AttributeError`` that could be raised from any user-defined code within + a dynamic property. It is recommended to define a dynamic ACL as a callable + to avoid this ambiguity. See https://github.com/Pylons/pyramid/issues/735. + 1.4 (2012-12-18) ================ -- cgit v1.2.3 From ff41f867aef84c06833f19de18d4fbc2957a983a Mon Sep 17 00:00:00 2001 From: Wolfgang Schnerring Date: Tue, 19 Mar 2013 10:43:17 -0700 Subject: Fixes #798: Allow a protocol-relative URL to be passed to add_static_view, generate URLs using the current protocol. --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index ae2cafba4..53a09078a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,6 +11,11 @@ Features a dynamic property. It is recommended to define a dynamic ACL as a callable to avoid this ambiguity. See https://github.com/Pylons/pyramid/issues/735. +- Allow a protocol-relative URL (e.g. ``//example.com/images``) to be passed to + ``pyramid.config.Configurator.add_static_view``. This allows + externally-hosted static URLs to be generated based on the current protocol. + + 1.4 (2012-12-18) ================ -- cgit v1.2.3 From 23a7c6d7835ca0745968d522a6d9b329d45bc635 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Tue, 19 Mar 2013 16:11:42 -0700 Subject: update CHANGES.txt --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index d087bf43b..86257cc22 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -15,6 +15,12 @@ Features ``pyramid.config.Configurator.add_static_view``. This allows externally-hosted static URLs to be generated based on the current protocol. +- The ``AuthTktAuthenticationPolicy`` now supports IPv6 addresses when using + the ``include_ip=True`` option. This is possibly incompatible with + alternative ``auth_tkt`` implementations, as the specification does not + define how to properly handle IPv6. See + https://github.com/Pylons/pyramid/issues/831. + Bug Fixes --------- -- cgit v1.2.3 From 07c189da9a9fa4a1a4231dbfff34ed77d09f73d1 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Tue, 19 Mar 2013 23:10:56 -0700 Subject: Fix whitespace in CHANGES.txt to permit build. Add "Before You Begin" section. --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 86257cc22..6ff54884a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -36,26 +36,32 @@ Bug Fixes .. code-block:: python class IResource(Interface): + ... @view_config(context=IResource) def get(context, request): + ... @view_config(context=IResource, request_method='POST') def post(context, request): + ... @view_config(context=IResource, request_method='DELETE') def delete(context, request): + ... @implementor(IResource) class MyResource: + ... @view_config(context=MyResource, request_method='POST') def override_post(context, request): + ... Previously the override_post view registration would hide the get -- cgit v1.2.3 From 38844f75e4a2cd85315f1d570b5b63d00ec1b0b4 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Wed, 20 Mar 2013 23:12:32 -0500 Subject: update CHANGES.txt --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 6ff54884a..2366522df 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -21,6 +21,14 @@ Features define how to properly handle IPv6. See https://github.com/Pylons/pyramid/issues/831. +- Make it possible to use variable arguments via + ``pyramid.paster.get_appsettings``. This also allowed the generated + ``initialize_db`` script from the ``alchemy`` scaffold to grow support + for options in the form ``a=1 b=2`` so you can fill in + values in a parameterized ``.ini`` file, e.g. + ``initialize_myapp_db etc/development.ini a=1 b=2``. + See https://github.com/Pylons/pyramid/pull/911 + Bug Fixes --------- -- cgit v1.2.3 From ea278e1e6e0f5cde50d260ebf5f4ff13bbcf0d38 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 1 Apr 2013 12:39:34 -0500 Subject: update changelog --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 2366522df..9d400f5b2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -78,6 +78,10 @@ Bug Fixes methods. Now the views are found and no predicate mismatch is raised. +- Spaces and dots may now be in mako renderer template paths. This was + broken when support for the new makodef syntax was added in 1.4a1. + See https://github.com/Pylons/pyramid/issues/950 + 1.4 (2012-12-18) ================ -- cgit v1.2.3 From 20c57e6cbdd28fba9fa660d6d47f940a6b9c730b Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Wed, 3 Apr 2013 03:57:07 -0500 Subject: update changelog --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 9d400f5b2..08e498b7a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -82,6 +82,11 @@ Bug Fixes broken when support for the new makodef syntax was added in 1.4a1. See https://github.com/Pylons/pyramid/issues/950 +- ``pyramid.debug_authorization=true`` will now correctly print out + ``Allowed`` for views registered with ``NO_PERMISSION_REQUIRED`` instead + of invoking the ``permits`` method of the authorization policy. + See https://github.com/Pylons/pyramid/issues/954 + 1.4 (2012-12-18) ================ -- cgit v1.2.3 From c35b298f86b2591d7acd44ccb5b1e490269fca74 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Fri, 19 Apr 2013 03:36:43 -0500 Subject: update changes.txt --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 08e498b7a..9d934794a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -87,6 +87,11 @@ Bug Fixes of invoking the ``permits`` method of the authorization policy. See https://github.com/Pylons/pyramid/issues/954 +- Pyramid failed to install on some systems due to being packaged with + some test files containing higher order characters in their names. These + files have now been removed. See + https://github.com/Pylons/pyramid/issues/981 + 1.4 (2012-12-18) ================ -- cgit v1.2.3 From 3ae87810aae47f92cb0e8fe6db01464d6ffecd59 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Wed, 24 Apr 2013 13:51:17 -0500 Subject: update changes.txt --- CHANGES.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 9d934794a..e6dd9f0cb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -77,6 +77,7 @@ Bug Fixes predicate mismatch error when trying to use GET or DELETE methods. Now the views are found and no predicate mismatch is raised. + See https://github.com/Pylons/pyramid/pull/786 - Spaces and dots may now be in mako renderer template paths. This was broken when support for the new makodef syntax was added in 1.4a1. -- cgit v1.2.3 From bea48e2f01070003a795aa12b8d8ba464fe15115 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Thu, 9 May 2013 16:45:05 -0400 Subject: Implement PEP302 API in PackageOverrides as '__loader__'. Proxy to the '__loader__' set by the importer, if present. Otherwise, raise NotImplementedError. --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index e6dd9f0cb..2fcd9c62a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,11 @@ next release Features -------- +- Make the ``pyramid.config.assets.PackageOverrides`` object implement the + API for ``__loader__`` objects specified in PEP 302. Proxies to the + ``__loader__`` set by the importer, if present; otherwise, raises + ``NotImplementedError``. + - ``ACLAuthorizationPolicy`` supports ``__acl__`` as a callable. This removes the ambiguity between the potential ``AttributeError`` that would be raised on the ``context`` when the property was not defined and the -- cgit v1.2.3 From 45ef9a69e51189051c03b3fdeac4458ee94d7529 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Tue, 21 May 2013 15:27:02 -0400 Subject: Prevent non-3.2-compatible MarkupSafe 0.16 from breaking us. Apps which actually use Mako templates are still broken. --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index e6dd9f0cb..2c4f4e31c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -32,6 +32,9 @@ Features Bug Fixes --------- +- ``mako_templating``: added defensive workaround for non-importability + of ``mako`` (due to upstream ``markupsafe`` dropping Python 3.2 support). + - View lookup will now search for valid views based on the inheritance hierarchy of the context. It tries to find views based on the most specific context first, and upon predicate failure, will move up the -- cgit v1.2.3 From 0fdb540f8e432061ec09623f0275a6b6555292ef Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 21 May 2013 18:17:57 -0400 Subject: tortured docs --- CHANGES.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 2c4f4e31c..468fe1ed1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -32,8 +32,11 @@ Features Bug Fixes --------- -- ``mako_templating``: added defensive workaround for non-importability - of ``mako`` (due to upstream ``markupsafe`` dropping Python 3.2 support). +- ``mako_templating``: added defensive workaround for non-importability of + ``mako`` due to upstream ``markupsafe`` dropping Python 3.2 support. Mako + templating will no longer work under the combination of MarkupSafe 0.17 and + Python 3.2 (although the combination of MarkupSafe 0.17 and Python 3.3 or any + supported Python 2 version will work OK). - View lookup will now search for valid views based on the inheritance hierarchy of the context. It tries to find views based on the most -- cgit v1.2.3 From d4495efddce30cf2eef771ac28e2d90b86985d39 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 21 May 2013 18:30:21 -0400 Subject: this is actually a bugfix --- CHANGES.txt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index ceaeb3519..a471addce 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,11 +4,6 @@ next release Features -------- -- Make the ``pyramid.config.assets.PackageOverrides`` object implement the - API for ``__loader__`` objects specified in PEP 302. Proxies to the - ``__loader__`` set by the importer, if present; otherwise, raises - ``NotImplementedError``. - - ``ACLAuthorizationPolicy`` supports ``__acl__`` as a callable. This removes the ambiguity between the potential ``AttributeError`` that would be raised on the ``context`` when the property was not defined and the @@ -37,6 +32,13 @@ Features Bug Fixes --------- +- Make the ``pyramid.config.assets.PackageOverrides`` object implement the API + for ``__loader__`` objects specified in PEP 302. Proxies to the + ``__loader__`` set by the importer, if present; otherwise, raises + ``NotImplementedError``. This makes Pyramid static view overrides work + properly under Python 3.3 (previously they would not). See + https://github.com/Pylons/pyramid/pull/1015 for more information. + - ``mako_templating``: added defensive workaround for non-importability of ``mako`` due to upstream ``markupsafe`` dropping Python 3.2 support. Mako templating will no longer work under the combination of MarkupSafe 0.17 and -- cgit v1.2.3 From 188aa7ee1d4cbc55d965a452d45201852b46df58 Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Mon, 3 Jun 2013 23:10:08 +0200 Subject: Add a parent_domain option for auth_tkt policy This change adds a new ``parent_domain`` option to ``AuthTktAuthenticationPolicy`` which sets the authentication cookie as a wildcard cookie on the parent domain. This is useful if you have multiple sites sharing the same domain. --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index a471addce..5153e056e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -15,6 +15,10 @@ Features ``pyramid.config.Configurator.add_static_view``. This allows externally-hosted static URLs to be generated based on the current protocol. +- The ``AuthTktAuthenticationPolicy`` has a new ``parent_domain`` option to + set the authentication cookie as a wildcard cookie on the parent domain. This + is useful if you have multiple sites sharing the same domain. + - The ``AuthTktAuthenticationPolicy`` now supports IPv6 addresses when using the ``include_ip=True`` option. This is possibly incompatible with alternative ``auth_tkt`` implementations, as the specification does not -- cgit v1.2.3 From fab8454294b6271c727a0251c78b5f55df5788bf Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 5 Jun 2013 06:04:45 -0400 Subject: add changelog note --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index a471addce..6a26879a3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -29,6 +29,11 @@ Features ``initialize_myapp_db etc/development.ini a=1 b=2``. See https://github.com/Pylons/pyramid/pull/911 +- The ``request.session.check_csrf_token()`` method and the ``check_csrf`` view + predicate now take into account the value of the HTTP header named + ``X-CSRF-Token`` (as well as the ``csrf_token`` form parameter, which they + always did). The header is tried when the form parameter does not exist. + Bug Fixes --------- -- cgit v1.2.3 From 050b71c19081d95c1fb8ed57a87fab7fa4dd3ab0 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 11 Jun 2013 13:19:16 -0400 Subject: - ``pyramid.testing.DummyResource`` didn't define ``__bool__``, so code under Python 3 would use ``__len__`` to find truthiness; this usually caused an instance of DummyResource to be "falsy" instead of "truthy". See https://github.com/Pylons/pyramid/pull/1032 Closes #1032 --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 6a26879a3..2c8c6ee46 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -111,6 +111,11 @@ Bug Fixes files have now been removed. See https://github.com/Pylons/pyramid/issues/981 +- ``pyramid.testing.DummyResource`` didn't define ``__bool__``, so code under + Python 3 would use ``__len__`` to find truthiness; this usually caused an + instance of DummyResource to be "falsy" instead of "truthy". See + https://github.com/Pylons/pyramid/pull/1032 + 1.4 (2012-12-18) ================ -- cgit v1.2.3 From f0f92b0d2f09922699e2cf8ab034c3e6517e169d Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Wed, 19 Jun 2013 15:55:51 -0400 Subject: Changelog for PR #1033. --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 2c8c6ee46..082b51c41 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,9 @@ next release Features -------- +- ``scripts/prequrest.py``: add support for submitting ``PUT`` and ``PATCH`` + requests. See https://github.com/Pylons/pyramid/pull/1033. + - ``ACLAuthorizationPolicy`` supports ``__acl__`` as a callable. This removes the ambiguity between the potential ``AttributeError`` that would be raised on the ``context`` when the property was not defined and the -- cgit v1.2.3 From 9e6c8c66aaec13e5c4868f3101b2459f56c2e0c4 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Wed, 19 Jun 2013 16:20:46 -0400 Subject: Typo --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 082b51c41..ba8aae559 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,7 +4,7 @@ next release Features -------- -- ``scripts/prequrest.py``: add support for submitting ``PUT`` and ``PATCH`` +- ``scripts/prequest.py``: add support for submitting ``PUT`` and ``PATCH`` requests. See https://github.com/Pylons/pyramid/pull/1033. - ``ACLAuthorizationPolicy`` supports ``__acl__`` as a callable. This -- cgit v1.2.3 From a1786313496754fcc3db48ef66bc764b846452cb Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 12 Jul 2013 10:33:26 -0600 Subject: add an entry to changes about code merged from feature.prequest_login branch --- CHANGES.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index ba8aae559..0156b24fd 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,8 +4,11 @@ next release Features -------- -- ``scripts/prequest.py``: add support for submitting ``PUT`` and ``PATCH`` - requests. See https://github.com/Pylons/pyramid/pull/1033. +- ``scripts/prequest.py``: add support for submitting ``PUT`` and ``PATCH`` + requests. See https://github.com/Pylons/pyramid/pull/1033. add support for + submitting ``OPTIONS`` and ``PROPFIND`` requests, and allow users to specify + basic authentication credentials in the request via a ``--login`` argument to + the script. See https://github.com/Pylons/pyramid/pull/1039. - ``ACLAuthorizationPolicy`` supports ``__acl__`` as a callable. This removes the ambiguity between the potential ``AttributeError`` that would -- cgit v1.2.3 From 6b97003b5cfc8e318eb0cb789569d3604b3821f3 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sun, 14 Jul 2013 22:22:15 -0500 Subject: update changlog --- CHANGES.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 0156b24fd..2221f9945 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -101,7 +101,8 @@ Bug Fixes predicate mismatch error when trying to use GET or DELETE methods. Now the views are found and no predicate mismatch is raised. - See https://github.com/Pylons/pyramid/pull/786 + See https://github.com/Pylons/pyramid/pull/786 and + https://github.com/Pylons/pyramid/pull/1004 - Spaces and dots may now be in mako renderer template paths. This was broken when support for the new makodef syntax was added in 1.4a1. -- cgit v1.2.3 From 75fc4ac60ed4217cfaed4145656b7cefdc05cb04 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 15 Jul 2013 21:44:01 -0500 Subject: update changelog --- CHANGES.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 2221f9945..0dff0f047 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -102,7 +102,8 @@ Bug Fixes methods. Now the views are found and no predicate mismatch is raised. See https://github.com/Pylons/pyramid/pull/786 and - https://github.com/Pylons/pyramid/pull/1004 + https://github.com/Pylons/pyramid/pull/1004 and + https://github.com/Pylons/pyramid/pull/1046 - Spaces and dots may now be in mako renderer template paths. This was broken when support for the new makodef syntax was added in 1.4a1. -- cgit v1.2.3 From 0d96b77150f1283a44acd0d9c2d2f74453d298a1 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 18 Jul 2013 18:17:20 -0400 Subject: version bump in setup.py conf.py CHANGES.txt, rejigger changes bugs vs. features --- CHANGES.txt | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 2d8cf9ef4..0031fc635 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,4 @@ -next release +Next Release ============ Features @@ -6,7 +6,7 @@ Features - ``scripts/prequest.py``: add support for submitting ``PUT`` and ``PATCH`` requests. See https://github.com/Pylons/pyramid/pull/1033. add support for - submitting ``OPTIONS`` and ``PROPFIND`` requests, and allow users to specify + submitting ``OPTIONS`` and ``PROPFIND`` requests, and allow users to specify basic authentication credentials in the request via a ``--login`` argument to the script. See https://github.com/Pylons/pyramid/pull/1039. @@ -44,22 +44,6 @@ Features ``X-CSRF-Token`` (as well as the ``csrf_token`` form parameter, which they always did). The header is tried when the form parameter does not exist. -Bug Fixes ---------- - -- Make the ``pyramid.config.assets.PackageOverrides`` object implement the API - for ``__loader__`` objects specified in PEP 302. Proxies to the - ``__loader__`` set by the importer, if present; otherwise, raises - ``NotImplementedError``. This makes Pyramid static view overrides work - properly under Python 3.3 (previously they would not). See - https://github.com/Pylons/pyramid/pull/1015 for more information. - -- ``mako_templating``: added defensive workaround for non-importability of - ``mako`` due to upstream ``markupsafe`` dropping Python 3.2 support. Mako - templating will no longer work under the combination of MarkupSafe 0.17 and - Python 3.2 (although the combination of MarkupSafe 0.17 and Python 3.3 or any - supported Python 2 version will work OK). - - View lookup will now search for valid views based on the inheritance hierarchy of the context. It tries to find views based on the most specific context first, and upon predicate failure, will move up the @@ -67,7 +51,7 @@ Bug Fixes In the past, only the most specific type containing views would be checked and if no matching view could be found then a PredicateMismatch would be raised. Now predicate mismatches don't hide valid views registered on - super-types. Here's an example that now works:: + super-types. Here's an example that now works: .. code-block:: python @@ -109,6 +93,22 @@ Bug Fixes https://github.com/Pylons/pyramid/pull/1004 and https://github.com/Pylons/pyramid/pull/1046 +Bug Fixes +--------- + +- Make the ``pyramid.config.assets.PackageOverrides`` object implement the API + for ``__loader__`` objects specified in PEP 302. Proxies to the + ``__loader__`` set by the importer, if present; otherwise, raises + ``NotImplementedError``. This makes Pyramid static view overrides work + properly under Python 3.3 (previously they would not). See + https://github.com/Pylons/pyramid/pull/1015 for more information. + +- ``mako_templating``: added defensive workaround for non-importability of + ``mako`` due to upstream ``markupsafe`` dropping Python 3.2 support. Mako + templating will no longer work under the combination of MarkupSafe 0.17 and + Python 3.2 (although the combination of MarkupSafe 0.17 and Python 3.3 or any + supported Python 2 version will work OK). + - Spaces and dots may now be in mako renderer template paths. This was broken when support for the new makodef syntax was added in 1.4a1. See https://github.com/Pylons/pyramid/issues/950 @@ -124,9 +124,9 @@ Bug Fixes https://github.com/Pylons/pyramid/issues/981 - ``pyramid.testing.DummyResource`` didn't define ``__bool__``, so code under - Python 3 would use ``__len__`` to find truthiness; this usually caused an - instance of DummyResource to be "falsy" instead of "truthy". See - https://github.com/Pylons/pyramid/pull/1032 + Python 3 would use ``__len__`` to find truthiness; this usually caused an + instance of DummyResource to be "falsy" instead of "truthy". See + https://github.com/Pylons/pyramid/pull/1032 1.4 (2012-12-18) ================ -- cgit v1.2.3 From 32333e4d84fe0e71ce097a5dca57025353956dbe Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 24 Jul 2013 17:22:48 -0400 Subject: add not_ predicate feature --- CHANGES.txt | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 0031fc635..c100f7fa6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,30 @@ Next Release Features -------- +- Add the ability to invert the result of any view, route, or subscriber + predicate using the ``not_`` class. For example:: + + from pyramid.config import not_ + + @view_config(route_name='myroute', request_method=not_('POST')) + def myview(request): ... + + The above example will ensure that the view is called if the request method + is not POST (at least if no other view is more specific). + + The :class:`pyramid.config.not_` class can be used against any value that is + a predicate value passed in any of these contexts: + + - ``pyramid.config.Configurator.add_view`` + + - ``pyramid.config.Configurator.add_route`` + + - ``pyramid.config.Configurator.add_subscriber`` + + - ``pyramid.view.view_config`` + + - ``pyramid.events.subscriber`` + - ``scripts/prequest.py``: add support for submitting ``PUT`` and ``PATCH`` requests. See https://github.com/Pylons/pyramid/pull/1033. add support for submitting ``OPTIONS`` and ``PROPFIND`` requests, and allow users to specify -- cgit v1.2.3 From b210ce350a3856166376f63a32725cc1516ba294 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 2 Aug 2013 19:14:29 -0400 Subject: add pdistreport command --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index c100f7fa6..8292a2382 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,10 @@ Next Release Features -------- +- Add ``pdistreport`` script, which prints the Python version in use, the + Pyramid version in use, and the version number and location of all Python + distributions currently installed. + - Add the ability to invert the result of any view, route, or subscriber predicate using the ``not_`` class. For example:: -- cgit v1.2.3 From 1377480e027112afd8fdc4f75862b31b6111df0b Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 10 Aug 2013 02:38:36 -0400 Subject: add change note --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 8292a2382..457bfc7b7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -121,6 +121,12 @@ Features https://github.com/Pylons/pyramid/pull/1004 and https://github.com/Pylons/pyramid/pull/1046 +- The ``pserve`` command now takes a ``-v`` (or ``--verbose``) flag and a + ``-q`` (or ``--quiet``) flag. Output from running ``pserve`` can be + controlled using these flags. ``-v`` can be specified multiple times to + increase verbosity. ``-q`` sets verbosity to ``0`` unconditionally. The + default verbosity level is ``1``. + Bug Fixes --------- -- cgit v1.2.3 From 0a8d50f1e227acbfd5a9d63a61a4b383ee63c1c1 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 10 Aug 2013 02:55:13 -0400 Subject: add change note --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 457bfc7b7..68799da4a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -162,6 +162,9 @@ Bug Fixes instance of DummyResource to be "falsy" instead of "truthy". See https://github.com/Pylons/pyramid/pull/1032 +- The ``alchemy`` scaffold would break when the database was MySQL during + tables creation. See https://github.com/Pylons/pyramid/pull/1049 + 1.4 (2012-12-18) ================ -- cgit v1.2.3 From 986dc5f96c3bf0a62eb8984bfa5c2da4a3e2f254 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 10 Aug 2013 03:05:00 -0400 Subject: add change note --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 68799da4a..e9533ab48 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -127,6 +127,9 @@ Features increase verbosity. ``-q`` sets verbosity to ``0`` unconditionally. The default verbosity level is ``1``. +- The ``alchemy`` scaffold tests now provide better coverage. See + https://github.com/Pylons/pyramid/pull/1029 + Bug Fixes --------- -- cgit v1.2.3 From a1f768cc766516e81f295c7ad507305e526a740e Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Mon, 12 Aug 2013 20:50:55 +0200 Subject: Allow explicit cookie domain setting. This is useful as an escape hatch when dealing with enviroments where no normal rules apply. --- CHANGES.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index e9533ab48..2e1a2efd4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -49,9 +49,13 @@ Features ``pyramid.config.Configurator.add_static_view``. This allows externally-hosted static URLs to be generated based on the current protocol. -- The ``AuthTktAuthenticationPolicy`` has a new ``parent_domain`` option to - set the authentication cookie as a wildcard cookie on the parent domain. This - is useful if you have multiple sites sharing the same domain. +- The ``AuthTktAuthenticationPolicy`` has two new options to configure its + domain usage: + * ``parent_domain``: if set the authentication cookie is set on + the parent domain. This is useful if you have multiple sites sharing the + same domain. + * ``domain``: if provided the cookie is always set for this domain, bypassing + all usual logic. - The ``AuthTktAuthenticationPolicy`` now supports IPv6 addresses when using the ``include_ip=True`` option. This is possibly incompatible with -- cgit v1.2.3 From 0f1bc5286f772d2001bbcab8235bf5f7805b7634 Mon Sep 17 00:00:00 2001 From: Jonathan Villemaire-Krajden Date: Tue, 13 Aug 2013 13:10:47 -0400 Subject: Updated CHANGES Fixes 1040. --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index e9533ab48..1b4c3492c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -168,6 +168,9 @@ Bug Fixes - The ``alchemy`` scaffold would break when the database was MySQL during tables creation. See https://github.com/Pylons/pyramid/pull/1049 +- The route ``current_route_url`` method now attaches the query string to the URL by default. See + https://github.com/Pylons/pyramid/issues/1040 + 1.4 (2012-12-18) ================ @@ -205,6 +208,8 @@ Backwards Incompatibilities similar way to the changes described to ``_depth`` above. This argument remains undocumented, but might be used in the wild by some insane person. +- Modified the ``current_route_url`` method in pyramid.Request. The method previously returned the URL without the query string by default, it now does attach the query string unless it is overriden. + 1.4b1 (2012-11-21) ================== -- cgit v1.2.3 From 33e0fe18037d99312d8d4d966a8e01baffc2e62d Mon Sep 17 00:00:00 2001 From: Jonathan Villemaire-Krajden Date: Tue, 13 Aug 2013 13:25:17 -0400 Subject: Fixes to documentation, added change to what's new. --- CHANGES.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 1b4c3492c..42b3e7546 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -168,9 +168,14 @@ Bug Fixes - The ``alchemy`` scaffold would break when the database was MySQL during tables creation. See https://github.com/Pylons/pyramid/pull/1049 -- The route ``current_route_url`` method now attaches the query string to the URL by default. See +- The ``current_route_url`` method now attaches the query string to the URL by default. See https://github.com/Pylons/pyramid/issues/1040 +Backwards Incompatibilities +--------------------------- + +- Modified the ``current_route_url`` method in pyramid.Request. The method previously returned the URL without the query string by default, it now does attach the query string unless it is overriden. + 1.4 (2012-12-18) ================ @@ -208,8 +213,6 @@ Backwards Incompatibilities similar way to the changes described to ``_depth`` above. This argument remains undocumented, but might be used in the wild by some insane person. -- Modified the ``current_route_url`` method in pyramid.Request. The method previously returned the URL without the query string by default, it now does attach the query string unless it is overriden. - 1.4b1 (2012-11-21) ================== -- cgit v1.2.3 From 6a4a3413756a94f5e7ebbe7720788f28ca280a72 Mon Sep 17 00:00:00 2001 From: Jonathan Villemaire-Krajden Date: Tue, 13 Aug 2013 14:01:25 -0400 Subject: Fixed documentation width, signed contributors agreement and added a test for duplicate query strings. --- CHANGES.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 42b3e7546..0479e3011 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -168,13 +168,16 @@ Bug Fixes - The ``alchemy`` scaffold would break when the database was MySQL during tables creation. See https://github.com/Pylons/pyramid/pull/1049 -- The ``current_route_url`` method now attaches the query string to the URL by default. See +- The ``current_route_url`` method now attaches the query string to the URL by + default. See https://github.com/Pylons/pyramid/issues/1040 Backwards Incompatibilities --------------------------- -- Modified the ``current_route_url`` method in pyramid.Request. The method previously returned the URL without the query string by default, it now does attach the query string unless it is overriden. +- Modified the ``current_route_url`` method in pyramid.Request. The method + previously returned the URL without the query string by default, it now does + attach the query string unless it is overriden. 1.4 (2012-12-18) ================ -- cgit v1.2.3 From 24c932646ace774d39341bc52cfa01ef84eeede5 Mon Sep 17 00:00:00 2001 From: Blaise Laflamme Date: Wed, 14 Aug 2013 00:04:46 -0400 Subject: added bug fix to changes --- CHANGES.txt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 0479e3011..84f3aaf54 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -133,6 +133,10 @@ Features Bug Fixes --------- +- Fixed a Mako renderer bug returning a tuple with a previous defname value +in some circumstances. See https://github.com/Pylons/pyramid/issues/1037 for +more information. + - Make the ``pyramid.config.assets.PackageOverrides`` object implement the API for ``__loader__`` objects specified in PEP 302. Proxies to the ``__loader__`` set by the importer, if present; otherwise, raises @@ -270,7 +274,7 @@ Features @subscriber(SomeOtherEvent) def asubscriber(event): pass - + And you wanted to use a subscriber predicate:: @subscriber([SomeEvent, SomeContextType], mypredicate=True) @@ -344,7 +348,7 @@ Features @subscriber([SomeContextType, SomeEvent]) def asubscriber(event): - # bzzt! you'll be getting the context here as ``event``, and it'll + # bzzt! you'll be getting the context here as ``event``, and it'll # be useless Existing multiple-argument subscribers continue to work without issue, so you @@ -614,7 +618,7 @@ Bug Fixes https://github.com/Pylons/pyramid/issues/606 https://github.com/Pylons/pyramid/issues/607 -- In Mako Templates lookup, check for absolute uri (using mako directories) +- In Mako Templates lookup, check for absolute uri (using mako directories) when mixing up inheritance with asset specs. https://github.com/Pylons/pyramid/issues/662 @@ -833,13 +837,13 @@ Backwards Incompatibilities * ``registerAdapter``, use ``pyramid.config.Configurator.registry.registerAdapter`` instead. - * ``registerSubscriber``, use + * ``registerSubscriber``, use ``pyramid.config.Configurator.add_subscriber`` instead. - * ``registerRoute``, use + * ``registerRoute``, use ``pyramid.config.Configurator.add_route`` instead. - * ``registerSettings``, use + * ``registerSettings``, use ``pyramid.config.Configurator.add_settings`` instead. - In Pyramid 1.3 and previous, the ``__call__`` method of a Response object -- cgit v1.2.3 From 3de54e3009f624f3c3dabe531fbcc25483368fe4 Mon Sep 17 00:00:00 2001 From: Blaise Laflamme Date: Wed, 14 Aug 2013 00:10:03 -0400 Subject: fixed line indentation --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 84f3aaf54..76522695a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -134,8 +134,8 @@ Bug Fixes --------- - Fixed a Mako renderer bug returning a tuple with a previous defname value -in some circumstances. See https://github.com/Pylons/pyramid/issues/1037 for -more information. + in some circumstances. See https://github.com/Pylons/pyramid/issues/1037 + for more information. - Make the ``pyramid.config.assets.PackageOverrides`` object implement the API for ``__loader__`` objects specified in PEP 302. Proxies to the -- cgit v1.2.3 From 3ea7883a5822fb1279aa2dbad54ba77fa2c6db8f Mon Sep 17 00:00:00 2001 From: Tom Lazar Date: Thu, 15 Aug 2013 12:12:49 +0200 Subject: Add reference to the pull requests Conflicts: CHANGES.txt --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index f98de6c29..53724fdcb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -56,6 +56,9 @@ Features same domain. * ``domain``: if provided the cookie is always set for this domain, bypassing all usual logic. + See https://github.com/Pylons/pyramid/pull/1028, + https://github.com/Pylons/pyramid/pull/1072 and + https://github.com/Pylons/pyramid/pull/1078. - The ``AuthTktAuthenticationPolicy`` now supports IPv6 addresses when using the ``include_ip=True`` option. This is possibly incompatible with -- cgit v1.2.3 From d6e8b86723d8601df924ec31205f016b86778b98 Mon Sep 17 00:00:00 2001 From: Tom Lazar Date: Thu, 15 Aug 2013 16:43:46 +0200 Subject: Make ``pserve.cherrypy_server_runner`` Python 3 compatible. Closes https://github.com/Pylons/pyramid/issues/718 --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 53724fdcb..679f8ed4a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -183,6 +183,9 @@ Bug Fixes default. See https://github.com/Pylons/pyramid/issues/1040 +- Make ``pserve.cherrypy_server_runner`` Python 3 compatible. See + https://github.com/Pylons/pyramid/issues/718 + Backwards Incompatibilities --------------------------- -- cgit v1.2.3 From 58c5fefd37109fe7f27ca77a3d0896cc4b8e0470 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Thu, 15 Aug 2013 21:57:48 +0200 Subject: fix some rST issues --- CHANGES.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 679f8ed4a..48efad6d4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -51,11 +51,13 @@ Features - The ``AuthTktAuthenticationPolicy`` has two new options to configure its domain usage: + * ``parent_domain``: if set the authentication cookie is set on the parent domain. This is useful if you have multiple sites sharing the same domain. * ``domain``: if provided the cookie is always set for this domain, bypassing - all usual logic. + all usual logic. + See https://github.com/Pylons/pyramid/pull/1028, https://github.com/Pylons/pyramid/pull/1072 and https://github.com/Pylons/pyramid/pull/1078. -- cgit v1.2.3 From c614ffc153135eb14d77472a46c20af7c6f6ed91 Mon Sep 17 00:00:00 2001 From: Andreas Zeidler Date: Sat, 17 Aug 2013 11:48:58 +0200 Subject: add ``localizer`` property to the request (refs #508) --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 48efad6d4..b805a12a0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,9 @@ Next Release Features -------- +- Add ``localizer`` property (reified) to the request. + See https://github.com/Pylons/pyramid/issues/508. + - Add ``pdistreport`` script, which prints the Python version in use, the Pyramid version in use, and the version number and location of all Python distributions currently installed. -- cgit v1.2.3 From 8a8eff5c12e161edf3fcf6942e784ef8126d696d Mon Sep 17 00:00:00 2001 From: Tom Lazar Date: Sat, 17 Aug 2013 15:48:38 +0200 Subject: update changelog --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 48efad6d4..83bf0bb64 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -139,6 +139,10 @@ Features - The ``alchemy`` scaffold tests now provide better coverage. See https://github.com/Pylons/pyramid/pull/1029 +- The ``pyramid.config.Configurator.add_route`` method now supports being called + with an external URL as pattern. See https://github.com/Pylons/pyramid/issues/611 + for more information. + Bug Fixes --------- -- cgit v1.2.3 From d07d167f6dcdc5ef03e8aaca3c953e984a5a5f1a Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 20 Aug 2013 10:13:55 -0400 Subject: raise ValueError instead of generating just path when _app_url is provided to request.route_url and the route has an external pattern --- CHANGES.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index b4fe60085..1eeb0ce7b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -142,9 +142,9 @@ Features - The ``alchemy`` scaffold tests now provide better coverage. See https://github.com/Pylons/pyramid/pull/1029 -- The ``pyramid.config.Configurator.add_route`` method now supports being called - with an external URL as pattern. See https://github.com/Pylons/pyramid/issues/611 - for more information. +- The ``pyramid.config.Configurator.add_route`` method now supports being + called with an external URL as pattern. See + https://github.com/Pylons/pyramid/issues/611 for more information. Bug Fixes --------- -- cgit v1.2.3 From ece96f658c631cae662d3849b35ee2723c368abe Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 27 Aug 2013 17:37:48 -0400 Subject: - Fix an obscure problem when combining a virtual root with a route with a ``*traverse`` in its pattern. Now the traversal path generated in such a configuration will be correct, instead of an element missing a leading slash. --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 1eeb0ce7b..0db274a19 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -149,6 +149,11 @@ Features Bug Fixes --------- +- Fix an obscure problem when combining a virtual root with a route with a + ``*traverse`` in its pattern. Now the traversal path generated in + such a configuration will be correct, instead of an element missing + a leading slash. + - Fixed a Mako renderer bug returning a tuple with a previous defname value in some circumstances. See https://github.com/Pylons/pyramid/issues/1037 for more information. -- cgit v1.2.3 From 58951c0a9a4fc2a2122d88170b0761b1d89ea91c Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 28 Aug 2013 03:39:02 -0400 Subject: - The ``route_url`` and ``route_path`` APIs no longer quote ``/`` to ``%2F`` when a replacement value contains a ``/``. This was pointless, as WSGI servers always unquote the slash anyway, and Pyramid never sees the quoted value. --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 0db274a19..a527f7c1e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -207,6 +207,11 @@ Backwards Incompatibilities previously returned the URL without the query string by default, it now does attach the query string unless it is overriden. +- The ``route_url`` and ``route_path`` APIs no longer quote ``/`` + to ``%2F`` when a replacement value contains a ``/``. This was pointless, + as WSGI servers always unquote the slash anyway, and Pyramid never sees the + quoted value. + 1.4 (2012-12-18) ================ -- cgit v1.2.3 From 8a7e80dc64947691fa72925d701d35c3e1d8c87a Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 29 Aug 2013 03:49:18 -0400 Subject: - When the ``pyramid.reload_templates`` setting was true, and a Chameleon template was reloaded, and the renderer specification named a macro (e.g. ``foo#macroname.pt``), renderings of the template after the template was reloaded due to a file change would produce the entire template body instead of just a rendering of the macro. See https://github.com/Pylons/pyramid/issues/1013. Closes #1013 --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 41ecbde0f..6cb2932fa 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -154,6 +154,13 @@ Features Bug Fixes --------- +- When the ``pyramid.reload_templates`` setting was true, and a Chameleon + template was reloaded, and the renderer specification named a macro + (e.g. ``foo#macroname.pt``), renderings of the template after the template + was reloaded due to a file change would produce the entire template body + instead of just a rendering of the macro. See + https://github.com/Pylons/pyramid/issues/1013. + - Fix an obscure problem when combining a virtual root with a route with a ``*traverse`` in its pattern. Now the traversal path generated in such a configuration will be correct, instead of an element missing -- cgit v1.2.3 From 330164c3190d92a3e1df89baafba12570d03bd32 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 29 Aug 2013 05:08:53 -0400 Subject: make local_name an attribute of Request, move logic from get_localizer into Request.localizer, fix docs; closes #1099 --- CHANGES.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 6cb2932fa..93349abe6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,8 +9,10 @@ Features represent a "bare" ``{{a}}``. See https://github.com/Pylons/pyramid/pull/862 -- Add ``localizer`` property (reified) to the request. - See https://github.com/Pylons/pyramid/issues/508. +- Add ``localizer`` and ``locale_name`` properties (reified) to the request. + See https://github.com/Pylons/pyramid/issues/508. Note that the + ``pyramid.i18n.get_localizer`` and ``pyramid.i18n.get_locale_name`` functions + now simply look up these properties on the request. - Add ``pdistreport`` script, which prints the Python version in use, the Pyramid version in use, and the version number and location of all Python @@ -224,6 +226,12 @@ Backwards Incompatibilities as WSGI servers always unquote the slash anyway, and Pyramid never sees the quoted value. +- It is no longer possible to set a ``locale_name`` attribute of the request, + nor is it possible to set a ``localizer`` attribute of the request. These + are now "reified" properties that look up a locale name and localizer + respectively using the machinery described in the "Internationalization" + chapter of the documentation. + 1.4 (2012-12-18) ================ -- cgit v1.2.3 From db0185ff8516b852aad0a1bdb0cbcee63d28c4d2 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 29 Aug 2013 18:07:04 -0400 Subject: first cut at hybrid url generation; still needs tests for resource_url logic --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 93349abe6..657c50009 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -232,6 +232,16 @@ Backwards Incompatibilities respectively using the machinery described in the "Internationalization" chapter of the documentation. +- If you send an ``X-Vhm-Root`` header with a value that ends with a slash (or + any number of slashes), the trailing slash(es) will be removed before a URL + is generated when you use use ``request.resource_url`` or + ``request.resource_path``. Previously the virtual root path would not have + trailing slashes stripped, which would influence URL generation. + +- The ``pyramid.interfaces.IResourceURL`` interface has now grown two new + attributes: ``virtual_path_tuple`` and ``physical_path_tuple``. These should + be the tuple form of the resource's path (physical and virtual). + 1.4 (2012-12-18) ================ -- cgit v1.2.3 From 0a4aed1c8e0a6da9219cccb6f55882d916f49916 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 29 Aug 2013 21:58:48 -0400 Subject: documentation for hybrid url generation --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 657c50009..cfa77283f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,12 @@ Next Release Features -------- +- You can now generate "hybrid" urldispatch/traversal URLs more easily + by using the new ``route_name`` and ``route_kw`` arguments to + ``request.resource_url`` and ``request.resource_path``. See the new section + of the "Combining Traversal and URL Dispatch" documentation chapter entitled + "Hybrid URL Generation". + - It is now possible to escape double braces in Pyramid scaffolds (unescaped, these represent replacement values). You can use ``\{\{a\}\}`` to represent a "bare" ``{{a}}``. See -- cgit v1.2.3 From 67674f9609514dc80c15d617f71ef523a2377cfd Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 29 Aug 2013 22:23:49 -0400 Subject: point at docs section --- CHANGES.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index cfa77283f..70bc31840 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -157,7 +157,8 @@ Features - The ``pyramid.config.Configurator.add_route`` method now supports being called with an external URL as pattern. See - https://github.com/Pylons/pyramid/issues/611 for more information. + https://github.com/Pylons/pyramid/issues/611 and the documentation section + in the "URL Dispatch" chapter entitled "External Routes" for more information. Bug Fixes --------- -- cgit v1.2.3 From c29603ed0d8fd0b55789eb8f975c901961864d66 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 29 Aug 2013 23:55:36 -0400 Subject: get rid of remainder_name on route, and just default to passing traverse; add route_remainder_name argument to resource_url --- CHANGES.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 70bc31840..d3d3f64ce 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -5,10 +5,10 @@ Features -------- - You can now generate "hybrid" urldispatch/traversal URLs more easily - by using the new ``route_name`` and ``route_kw`` arguments to - ``request.resource_url`` and ``request.resource_path``. See the new section - of the "Combining Traversal and URL Dispatch" documentation chapter entitled - "Hybrid URL Generation". + by using the new ``route_name``, ``route_kw`` and ``route_remainder_name`` + arguments to ``request.resource_url`` and ``request.resource_path``. See + the new section of the "Combining Traversal and URL Dispatch" documentation + chapter entitled "Hybrid URL Generation". - It is now possible to escape double braces in Pyramid scaffolds (unescaped, these represent replacement values). You can use ``\{\{a\}\}`` to -- cgit v1.2.3 From 97ed56d766298ee042305ff8712df5f1fc3fbe3a Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 30 Aug 2013 11:48:56 -0400 Subject: allow exception view registrations for HTTPException to override default exception view; closes #985 --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index d3d3f64ce..334785424 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -163,6 +163,11 @@ Features Bug Fixes --------- +- It was not possible to use ``pyramid.httpexceptions.HTTPException`` as + the ``context`` of an exception view as very general catchall for + http-related exceptions when you wanted that exception view to override the + default exception view. See https://github.com/Pylons/pyramid/issues/985 + - When the ``pyramid.reload_templates`` setting was true, and a Chameleon template was reloaded, and the renderer specification named a macro (e.g. ``foo#macroname.pt``), renderings of the template after the template -- cgit v1.2.3 From c5ed5491e8a6d736bedba45b2cb944799f36a5e4 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 30 Aug 2013 12:18:57 -0400 Subject: add HTTPSuccessful base class, allowing HTTPOk to be caught independently; closes #986 --- CHANGES.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 334785424..b3c4e6a60 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,13 @@ Next Release Features -------- +- A new http exception subclass named ``pyramid.httpexceptions.HTTPSuccessful`` + was added. You can use this class as the ``context`` of an exception + view to catch all 200-series "exceptions" (e.g. "raise HTTPOk"). This + also allows you to catch *only* the ``HTTPOk`` exception itself; previously + this was impossible because a number of other exceptions + (such as ``HTTPNoContent``) inherited from ``HTTPOk``, but now they do not. + - You can now generate "hybrid" urldispatch/traversal URLs more easily by using the new ``route_name``, ``route_kw`` and ``route_remainder_name`` arguments to ``request.resource_url`` and ``request.resource_path``. See @@ -923,6 +930,14 @@ Backwards Incompatibilities finished callbacks are executed. This is in support of the ``request.invoke_subrequest`` feature. +- The 200-series exception responses named ``HTTPCreated``, ``HTTPAccepted``, + ``HTTPNonAuthoritativeInformation``, ``HTTPNoContent``, ``HTTPResetContent``, + and ``HTTPPartialContent`` in ``pyramid.httpexceptions`` no longer inherit + from ``HTTPOk``. Instead they inherit from a new base class named + ``HTTPSuccessful``. This will have no effect on you unless you've registered + an exception view for ``HTTPOk`` and expect that exception view to + catch all the aforementioned exceptions. + Documentation ------------- -- cgit v1.2.3 From 4a86b2e72bf00a5470f267aa9caf21881e8d65c3 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 30 Aug 2013 14:08:51 -0400 Subject: move 1.4 stuff to HISTORY.txt --- CHANGES.txt | 695 ------------------------------------------------------------ 1 file changed, 695 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index b3c4e6a60..269dd7923 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -261,698 +261,3 @@ Backwards Incompatibilities attributes: ``virtual_path_tuple`` and ``physical_path_tuple``. These should be the tuple form of the resource's path (physical and virtual). -1.4 (2012-12-18) -================ - -Docs ----- - -- Fix functional tests in the ZODB tutorial - -1.4b3 (2012-12-10) -================== - -- Packaging release only, no code changes. 1.4b2 was a brownbag release due to - missing directories in the tarball. - -1.4b2 (2012-12-10) -================== - -Docs ----- - -- Scaffolding is now PEP-8 compliant (at least for a brief shining moment). - -- Tutorial improvements. - -Backwards Incompatibilities ---------------------------- - -- Modified the ``_depth`` argument to ``pyramid.view.view_config`` to accept - a value relative to the invocation of ``view_config`` itself. Thus, when it - was previously expecting a value of ``1`` or greater, to reflect that - the caller of ``view_config`` is 1 stack frame away from ``venusian.attach``, - this implementation detail is now hidden. - -- Modified the ``_backframes`` argument to ``pyramid.util.action_method`` in a - similar way to the changes described to ``_depth`` above. This argument - remains undocumented, but might be used in the wild by some insane person. - -1.4b1 (2012-11-21) -================== - -Features --------- - -- Small microspeed enhancement which anticipates that a - ``pyramid.response.Response`` object is likely to be returned from a view. - Some code is shortcut if the class of the object returned by a view is this - class. A similar microoptimization was done to - ``pyramid.request.Request.is_response``. - -- Make it possible to use variable arguments on ``p*`` commands (``pserve``, - ``pshell``, ``pviews``, etc) in the form ``a=1 b=2`` so you can fill in - values in parameterized ``.ini`` file, e.g. ``pshell etc/development.ini - http_port=8080``. See https://github.com/Pylons/pyramid/pull/714 - -- A somewhat advanced and obscure feature of Pyramid event handlers is their - ability to handle "multi-interface" notifications. These notifications have - traditionally presented multiple objects to the subscriber callable. For - instance, if an event was sent by code like this:: - - registry.notify(event, context) - - In the past, in order to catch such an event, you were obligated to write and - register an event subscriber that mentioned both the event and the context in - its argument list:: - - @subscriber([SomeEvent, SomeContextType]) - def asubscriber(event, context): - pass - - In many subscriber callables registered this way, it was common for the logic - in the subscriber callable to completely ignore the second and following - arguments (e.g. ``context`` in the above example might be ignored), because - they usually existed as attributes of the event anyway. You could usually - get the same value by doing ``event.context`` or similar. - - The fact that you needed to put an extra argument which you usually ignored - in the subscriber callable body was only a minor annoyance until we added - "subscriber predicates", used to narrow the set of circumstances under which - a subscriber will be executed, in a prior 1.4 alpha release. Once those were - added, the annoyance was escalated, because subscriber predicates needed to - accept the same argument list and arity as the subscriber callables that they - were configured against. So, for example, if you had these two subscriber - registrations in your code:: - - @subscriber([SomeEvent, SomeContextType]) - def asubscriber(event, context): - pass - - @subscriber(SomeOtherEvent) - def asubscriber(event): - pass - - And you wanted to use a subscriber predicate:: - - @subscriber([SomeEvent, SomeContextType], mypredicate=True) - def asubscriber1(event, context): - pass - - @subscriber(SomeOtherEvent, mypredicate=True) - def asubscriber2(event): - pass - - If an existing ``mypredicate`` subscriber predicate had been written in such - a way that it accepted only one argument in its ``__call__``, you could not - use it against a subscription which named more than one interface in its - subscriber interface list. Similarly, if you had written a subscriber - predicate that accepted two arguments, you couldn't use it against a - registration that named only a single interface type. - - For example, if you created this predicate:: - - class MyPredicate(object): - # portions elided... - def __call__(self, event): - return self.val == event.context.foo - - It would not work against a multi-interface-registered subscription, so in - the above example, when you attempted to use it against ``asubscriber1``, it - would fail at runtime with a TypeError, claiming something was attempting to - call it with too many arguments. - - To hack around this limitation, you were obligated to design the - ``mypredicate`` predicate to expect to receive in its ``__call__`` either a - single ``event`` argument (a SomeOtherEvent object) *or* a pair of arguments - (a SomeEvent object and a SomeContextType object), presumably by doing - something like this:: - - class MyPredicate(object): - # portions elided... - def __call__(self, event, context=None): - return self.val == event.context.foo - - This was confusing and bad. - - In order to allow people to ignore unused arguments to subscriber callables - and to normalize the relationship between event subscribers and subscriber - predicates, we now allow both subscribers and subscriber predicates to accept - only a single ``event`` argument even if they've been subscribed for - notifications that involve multiple interfaces. Subscribers and subscriber - predicates that accept only one argument will receive the first object passed - to ``notify``; this is typically (but not always) the event object. The - other objects involved in the subscription lookup will be discarded. You can - now write an event subscriber that accepts only ``event`` even if it - subscribes to multiple interfaces:: - - @subscriber([SomeEvent, SomeContextType]) - def asubscriber(event): - # this will work! - - This prevents you from needing to match the subscriber callable parameters to - the subscription type unnecessarily, especially when you don't make use of - any argument in your subscribers except for the event object itself. - - Note, however, that if the event object is not the first - object in the call to ``notify``, you'll run into trouble. For example, if - notify is called with the context argument first:: - - registry.notify(context, event) - - You won't be able to take advantage of the event-only feature. It will - "work", but the object received by your event handler won't be the event - object, it will be the context object, which won't be very useful:: - - @subscriber([SomeContextType, SomeEvent]) - def asubscriber(event): - # bzzt! you'll be getting the context here as ``event``, and it'll - # be useless - - Existing multiple-argument subscribers continue to work without issue, so you - should continue use those if your system notifies using multiple interfaces - and the first interface is not the event interface. For example:: - - @subscriber([SomeContextType, SomeEvent]) - def asubscriber(context, event): - # this will still work! - - The event-only feature makes it possible to use a subscriber predicate that - accepts only a request argument within both multiple-interface subscriber - registrations and single-interface subscriber registrations. You needn't - make slightly different variations of predicates depending on the - subscription type arguments. Instead, just write all your subscriber - predicates so they only accept ``event`` in their ``__call__`` and they'll be - useful across all registrations for subscriptions that use an event as their - first argument, even ones which accept more than just ``event``. - - However, the same caveat applies to predicates as to subscriber callables: if - you're subscribing to a multi-interface event, and the first interface is not - the event interface, the predicate won't work properly. In such a case, - you'll need to match the predicate ``__call__`` argument ordering and - composition to the ordering of the interfaces. For example, if the - registration for the subscription uses ``[SomeContext, SomeEvent]``, you'll - need to reflect that in the ordering of the parameters of the predicate's - ``__call__`` method:: - - def __call__(self, context, event): - return event.request.path.startswith(self.val) - - tl;dr: 1) When using multi-interface subscriptions, always use the event type - as the first subscription registration argument and 2) When 1 is true, use - only ``event`` in your subscriber and subscriber predicate parameter lists, - no matter how many interfaces the subscriber is notified with. This - combination will result in the maximum amount of reusability of subscriber - predicates and the least amount of thought on your part. Drink responsibly. - -Bug Fixes ---------- - -- A failure when trying to locate the attribute ``__text__`` on route and view - predicates existed when the ``debug_routematch`` setting was true or when the - ``pviews`` command was used. See https://github.com/Pylons/pyramid/pull/727 - -Documentation -------------- - -- Sync up tutorial source files with the files that are rendered by the - scaffold that each uses. - -1.4a4 (2012-11-14) -================== - -Features --------- - -- ``pyramid.authentication.AuthTktAuthenticationPolicy`` has been updated to - support newer hashing algorithms such as ``sha512``. Existing applications - should consider updating if possible for improved security over the default - md5 hashing. - -- Added an ``effective_principals`` route and view predicate. - -- Do not allow the userid returned from the ``authenticated_userid`` or the - userid that is one of the list of principals returned by - ``effective_principals`` to be either of the strings ``system.Everyone`` or - ``system.Authenticated`` when any of the built-in authorization policies that - live in ``pyramid.authentication`` are in use. These two strings are - reserved for internal usage by Pyramid and they will not be accepted as valid - userids. - -- Slightly better debug logging from - ``pyramid.authentication.RepozeWho1AuthenticationPolicy``. - -- ``pyramid.security.view_execution_permitted`` used to return ``True`` if no - view could be found. It now raises a ``TypeError`` exception in that case, as - it doesn't make sense to assert that a nonexistent view is - execution-permitted. See https://github.com/Pylons/pyramid/issues/299. - -- Allow a ``_depth`` argument to ``pyramid.view.view_config``, which will - permit limited composition reuse of the decorator by other software that - wants to provide custom decorators that are much like view_config. - -- Allow an iterable of decorators to be passed to - ``pyramid.config.Configurator.add_view``. This allows views to be wrapped - by more than one decorator without requiring combining the decorators - yourself. - -Bug Fixes ---------- - -- In the past if a renderer returned ``None``, the body of the resulting - response would be set explicitly to the empty string. Instead, now, the body - is left unchanged, which allows the renderer to set a body itself by using - e.g. ``request.response.body = b'foo'``. The body set by the renderer will - be unmolested on the way out. See - https://github.com/Pylons/pyramid/issues/709 - -- In uncommon cases, the ``pyramid_excview_tween_factory`` might have - inadvertently raised a ``KeyError`` looking for ``request_iface`` as an - attribute of the request. It no longer fails in this case. See - https://github.com/Pylons/pyramid/issues/700 - -- Be more tolerant of potential error conditions in ``match_param`` and - ``physical_path`` predicate implementations; instead of raising an exception, - return False. - -- ``pyramid.view.render_view`` was not functioning properly under Python 3.x - due to a byte/unicode discrepancy. See - https://github.com/Pylons/pyramid/issues/721 - -Deprecations ------------- - -- ``pyramid.authentication.AuthTktAuthenticationPolicy`` will emit a warning if - an application is using the policy without explicitly passing a ``hashalg`` - argument. This is because the default is "md5" which is considered - theoretically subject to collision attacks. If you really want "md5" then you - must specify it explicitly to get rid of the warning. - -Documentation -------------- - -- All of the tutorials that use - ``pyramid.authentication.AuthTktAuthenticationPolicy`` now explicitly pass - ``sha512`` as a ``hashalg`` argument. - - -Internals ---------- - -- Move ``TopologicalSorter`` from ``pyramid.config.util`` to ``pyramid.util``, - move ``CyclicDependencyError`` from ``pyramid.config.util`` to - ``pyramid.exceptions``, rename ``Singleton`` to ``Sentinel`` and move from - ``pyramid.config.util`` to ``pyramid.util``; this is in an effort to - move that stuff that may be an API one day out of ``pyramid.config.util``, - because that package should never be imported from non-Pyramid code. - TopologicalSorter is still not an API, but may become one. - -- Get rid of shady monkeypatching of ``pyramid.request.Request`` and - ``pyramid.response.Response`` done within the ``__init__.py`` of Pyramid. - Webob no longer relies on this being done. Instead, the ResponseClass - attribute of the Pyramid Request class is assigned to the Pyramid response - class; that's enough to satisfy WebOb and behave as it did before with the - monkeypatching. - -1.4a3 (2012-10-26) -================== - -Bug Fixes ---------- - -- The match_param predicate's text method was fixed to sort its values. - Part of https://github.com/Pylons/pyramid/pull/705 - -- 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). - -- 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 in 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. - -Features --------- - -- Allow multiple values to be specified to the ``request_param`` view/route - predicate as a sequence. Previously only a single string value was allowed. - See https://github.com/Pylons/pyramid/pull/705 - -- Comments with references to documentation sections placed in scaffold - ``.ini`` files. - -- Added an HTTP Basic authentication policy - at ``pyramid.authentication.BasicAuthAuthenticationPolicy``. - -- 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. - -- New ``physical_path`` view predicate. If specified, this value should be a - string or a tuple representing the physical traversal path of the context - found via traversal for this predicate to match as true. For example: - ``physical_path='/'`` or ``physical_path='/a/b/c'`` or ``physical_path=('', - 'a', 'b', 'c')``. This is not a path prefix match or a regex, it's a - whole-path match. It's useful when you want to always potentially show a - view when some object is traversed to, but you can't be sure about what kind - of object it will be, so you can't use the ``context`` predicate. The - individual path elements inbetween slash characters or in tuple elements - should be the Unicode representation of the name of the resource and should - not be encoded in any way. - -1.4a2 (2012-09-27) -================== - -Bug Fixes ---------- - -- 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 --------- - -- 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. - -- 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) -================== - -Bug Fixes ---------- - -- Forward port from 1.3 branch: When no authentication policy was configured, - a call to ``pyramid.security.effective_principals`` would unconditionally - return the empty list. This was incorrect, it should have unconditionally - returned ``[Everyone]``, and now does. - -- Explicit url dispatch regexes can now contain colons. - https://github.com/Pylons/pyramid/issues/629 - -- On at least one 64-bit Ubuntu system under Python 3.2, using the - ``view_config`` decorator caused a ``RuntimeError: dictionary changed size - during iteration`` exception. It no longer does. See - https://github.com/Pylons/pyramid/issues/635 for more information. - -- In Mako Templates lookup, check if the uri is already adjusted and bring - it back to an asset spec. Normally occurs with inherited templates or - included components. - https://github.com/Pylons/pyramid/issues/606 - https://github.com/Pylons/pyramid/issues/607 - -- In Mako Templates lookup, check for absolute uri (using mako directories) - when mixing up inheritance with asset specs. - https://github.com/Pylons/pyramid/issues/662 - -- HTTP Accept headers were not being normalized causing potentially - conflicting view registrations to go unnoticed. Two views that only - differ in the case ('text/html' vs. 'text/HTML') will now raise an error. - https://github.com/Pylons/pyramid/pull/620 - -- 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() < - function()`` exception. - -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``, - ``pyramid.config.Configurator.add_route_predicate`` and - ``pyramid.config.Configurator.add_subscriber_predicate``. So, for example, - doing this:: - - config.add_view_predicate('abc', my.package.ABCPredicate) - - Might allow a view author to do this in an application that configured that - predicate:: - - @view_config(abc=1) - - Similar features exist for ``add_route``, and ``add_subscriber``. See - "Adding A Third Party View, Route, or Subscriber Predicate" in the Hooks - chapter for more information. - - Note that changes made to support the above feature now means that only - actions registered using the same "order" can conflict with one another. - It used to be the case that actions registered at different orders could - potentially conflict, but to my knowledge nothing ever depended on this - behavior (it was a bit silly). - -- Custom objects can be made easily JSON-serializable in Pyramid by defining - a ``__json__`` method on the object's class. This method should return - values natively serializable by ``json.dumps`` (such as ints, lists, - dictionaries, strings, and so forth). - -- The JSON renderer now allows for the definition of custom type adapters to - convert unknown objects to JSON serializations. - -- As of this release, the ``request_method`` predicate, when used, will also - imply that ``HEAD`` is implied when you use ``GET``. For example, using - ``@view_config(request_method='GET')`` is equivalent to using - ``@view_config(request_method=('GET', 'HEAD'))``. Using - ``@view_config(request_method=('GET', 'POST')`` is equivalent to using - ``@view_config(request_method=('GET', 'HEAD', 'POST')``. This is because - HEAD is a variant of GET that omits the body, and WebOb has special support - to return an empty body when a HEAD is used. - -- ``config.add_request_method`` has been introduced to support extending - request objects with arbitrary callables. This method expands on the - previous ``config.set_request_property`` by supporting methods as well as - properties. This method now causes less code to be executed at - request construction time than ``config.set_request_property`` in - version 1.3. - -- Don't add a ``?`` to URLs generated by ``request.resource_url`` if the - ``query`` argument is provided but empty. - -- Don't add a ``?`` to URLs generated by ``request.route_url`` if the - ``_query`` argument is provided but empty. - -- The static view machinery now raises (rather than returns) ``HTTPNotFound`` - and ``HTTPMovedPermanently`` exceptions, so these can be caught by the - Not Found View (and other exception views). - -- 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.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 - macro listed as a ``define-macro`` and return the result instead of - rendering the entire template. An example asset spec: - ``package:path/to/template#macroname.pt``. This will render the macro - defined as ``macroname`` within the ``template.pt`` template instead of the - entire templae. - -- When there is a predicate mismatch exception (seen when no view matches for - a given request due to predicates not working), the exception now contains - a textual description of the predicate which didn't match. - -- An ``add_permission`` directive method was added to the Configurator. This - directive registers a free-standing permission introspectable into the - Pyramid introspection system. Frameworks built atop Pyramid can thus use - the ``permissions`` introspectable category data to build a - comprehensive list of permissions supported by a running system. Before - this method was added, permissions were already registered in this - introspectable category as a side effect of naming them in an ``add_view`` - call, this method just makes it possible to arrange for a permission to be - put into the ``permissions`` introspectable category without naming it - along with an associated view. Here's an example of usage of - ``add_permission``:: - - config = Configurator() - config.add_permission('view') - -- The ``UnencryptedCookieSessionFactoryConfig`` now accepts - ``signed_serialize`` and ``signed_deserialize`` hooks which may be used - to influence how the sessions are marshalled (by default this is done - with HMAC+pickle). - -- ``pyramid.testing.DummyRequest`` now supports methods supplied by the - ``pyramid.util.InstancePropertyMixin`` class such as ``set_property``. - -- 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``. - -- ``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. - -- 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 a new - ``request.invoke_subrequest`` API. - -Deprecations ------------- - -- The ``pyramid.config.Configurator.set_request_property`` has been - documentation-deprecated. The method remains usable but the more - featureful ``pyramid.config.Configurator.add_request_method`` should be - used in its place (it has all of the same capabilities but can also extend - the request object with methods). - -Backwards Incompatibilities ---------------------------- - -- The Pyramid router no longer adds the values ``bfg.routes.route`` or - ``bfg.routes.matchdict`` to the request's WSGI environment dictionary. - These values were docs-deprecated in ``repoze.bfg`` 1.0 (effectively seven - minor releases ago). If your code depended on these values, use - request.matched_route and request.matchdict instead. - -- It is no longer possible to pass an environ dictionary directly to - ``pyramid.traversal.ResourceTreeTraverser.__call__`` (aka - ``ModelGraphTraverser.__call__``). Instead, you must pass a request - object. Passing an environment instead of a request has generated a - deprecation warning since Pyramid 1.1. - -- Pyramid will no longer work properly if you use the - ``webob.request.LegacyRequest`` as a request factory. Instances of the - LegacyRequest class have a ``request.path_info`` which return a string. - This Pyramid release assumes that ``request.path_info`` will - unconditionally be Unicode. - -- The functions from ``pyramid.chameleon_zpt`` and ``pyramid.chameleon_text`` - named ``get_renderer``, ``get_template``, ``render_template``, and - ``render_template_to_response`` have been removed. These have issued a - deprecation warning upon import since Pyramid 1.0. Use - ``pyramid.renderers.get_renderer()``, - ``pyramid.renderers.get_renderer().implementation()``, - ``pyramid.renderers.render()`` or ``pyramid.renderers.render_to_response`` - respectively instead of these functions. - -- The ``pyramid.configuration`` module was removed. It had been deprecated - since Pyramid 1.0 and printed a deprecation warning upon its use. Use - ``pyramid.config`` instead. - -- The ``pyramid.paster.PyramidTemplate`` API was removed. It had been - deprecated since Pyramid 1.1 and issued a warning on import. If your code - depended on this, adjust your code to import - ``pyramid.scaffolds.PyramidTemplate`` instead. - -- The ``pyramid.settings.get_settings()`` API was removed. It had been - printing a deprecation warning since Pyramid 1.0. If your code depended on - this API, use ``pyramid.threadlocal.get_current_registry().settings`` - instead or use the ``settings`` attribute of the registry available from - the request (``request.registry.settings``). - -- These APIs from the ``pyramid.testing`` module were removed. They have - been printing deprecation warnings since Pyramid 1.0: - - * ``registerDummySecurityPolicy``, use - ``pyramid.config.Configurator.testing_securitypolicy`` instead. - - * ``registerResources`` (aka ``registerModels``, use - ``pyramid.config.Configurator.testing_resources`` instead. - - * ``registerEventListener``, use - ``pyramid.config.Configurator.testing_add_subscriber`` instead. - - * ``registerTemplateRenderer`` (aka `registerDummyRenderer``), use - ``pyramid.config.Configurator.testing_add_template`` instead. - - * ``registerView``, use ``pyramid.config.Configurator.add_view`` instead. - - * ``registerUtility``, use - ``pyramid.config.Configurator.registry.registerUtility`` instead. - - * ``registerAdapter``, use - ``pyramid.config.Configurator.registry.registerAdapter`` instead. - - * ``registerSubscriber``, use - ``pyramid.config.Configurator.add_subscriber`` instead. - - * ``registerRoute``, use - ``pyramid.config.Configurator.add_route`` instead. - - * ``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. - -- The 200-series exception responses named ``HTTPCreated``, ``HTTPAccepted``, - ``HTTPNonAuthoritativeInformation``, ``HTTPNoContent``, ``HTTPResetContent``, - and ``HTTPPartialContent`` in ``pyramid.httpexceptions`` no longer inherit - from ``HTTPOk``. Instead they inherit from a new base class named - ``HTTPSuccessful``. This will have no effect on you unless you've registered - an exception view for ``HTTPOk`` and expect that exception view to - catch all the aforementioned exceptions. - -Documentation -------------- - -- Added an "Upgrading Pyramid" chapter to the narrative documentation. It - 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. - -- Added a "Invoking a Subrequest" chapter to the documentation. It describes - how to use the new ``request.invoke_subrequest`` API. - -Dependencies ------------- - -- Pyramid now requires WebOb 1.2b3+ (the prior Pyramid release only relied on - 1.2dev+). This is to ensure that we obtain a version of WebOb that returns - ``request.path_info`` as text. - -- cgit v1.2.3 From e01b1caa07080eea690ba73d1cdfc7bc9ac3dccb Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 30 Aug 2013 14:43:51 -0400 Subject: update whatsnew --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 269dd7923..f7f7aa571 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -134,7 +134,7 @@ Features ... - @implementor(IResource) + @implementer(IResource) class MyResource: ... -- cgit v1.2.3 From 00bb95f513ddcedcaf025bb528e4d7f20b1f7a4b Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 30 Aug 2013 15:04:21 -0400 Subject: prep for 1.5a1 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index f7f7aa571..cdaad5a90 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next Release -============ +1.5a1 (2013-08-30) +================== Features -------- -- cgit v1.2.3 From 82f9702c9cd8bb16b15d658e6d64c9c31b9fdc57 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Wed, 4 Sep 2013 22:34:37 -0500 Subject: update changelog --- CHANGES.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index cdaad5a90..dbf27900f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,25 @@ +Next Release +============ + +Major Backward Incompatibilities +-------------------------------- + +- Pyramid has dropped native support for the Mako and Chameleon renderers. To + re-add support for these renderers into existing projects there are 3 steps: + + - Add `pyramid_mako` and/or `pyramid_chameleon` as dependencies by + adding them to the `install_requires` section of the package's `setup.py`. + + - Update instances of the `Configurator` to include the required addons: + + config.include('pyramid_chameleon') + config.include('pyramid_mako') + + - If any unit tests are invoking either `pyramid.renderers.render()` or + `pyramid.renderers.render_to_response()`, then the `Configurator` instance + at the root of the unit test should be also be updated to include the + addons, as shown above. + 1.5a1 (2013-08-30) ================== -- cgit v1.2.3 From 4315c0d5cf3224b8622c9b00cb6c72c86f1a9518 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Wed, 4 Sep 2013 22:38:03 -0500 Subject: fix markup --- CHANGES.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index dbf27900f..5768ae2ea 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,15 +10,16 @@ Major Backward Incompatibilities - Add `pyramid_mako` and/or `pyramid_chameleon` as dependencies by adding them to the `install_requires` section of the package's `setup.py`. - - Update instances of the `Configurator` to include the required addons: + - Update instances of the ``pyramid.config.Configurator`` to include the + required addons: config.include('pyramid_chameleon') config.include('pyramid_mako') - - If any unit tests are invoking either `pyramid.renderers.render()` or - `pyramid.renderers.render_to_response()`, then the `Configurator` instance - at the root of the unit test should be also be updated to include the - addons, as shown above. + - If any unit tests are invoking either ``pyramid.renderers.render()`` or + ``pyramid.renderers.render_to_response()``, then the + ``pyramid.config.Configurator`` instance at the root of the unit test + should be also be updated to include the addons, as shown above. 1.5a1 (2013-08-30) ================== -- cgit v1.2.3 From 9ed074e28c256842b902dc7ded8edb1f696e225b Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Wed, 4 Sep 2013 22:41:46 -0500 Subject: add example of rendering to the changelog --- CHANGES.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 5768ae2ea..46e6f7c8b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -17,9 +17,15 @@ Major Backward Incompatibilities config.include('pyramid_mako') - If any unit tests are invoking either ``pyramid.renderers.render()`` or - ``pyramid.renderers.render_to_response()``, then the - ``pyramid.config.Configurator`` instance at the root of the unit test - should be also be updated to include the addons, as shown above. + ``pyramid.renderers.render_to_response()`` with either Mako or Chameleon + templates then the ``pyramid.config.Configurator`` instance at the root of + the unit test should be also be updated to include the addons, as shown + above. For example: + + config = pyramid.testing.setUp() + config.include('pyramid_mako') + + result = pyramid.renderers.render('mypkg:templates/home.mako', {}) 1.5a1 (2013-08-30) ================== -- cgit v1.2.3 From ce138c89d9f9aff3f7d949b7f1b909c273e7f0ac Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Wed, 4 Sep 2013 22:47:37 -0500 Subject: add install_requires example as well --- CHANGES.txt | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 46e6f7c8b..d8d606530 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,10 +8,20 @@ Major Backward Incompatibilities re-add support for these renderers into existing projects there are 3 steps: - Add `pyramid_mako` and/or `pyramid_chameleon` as dependencies by - adding them to the `install_requires` section of the package's `setup.py`. + adding them to the `install_requires` section of the package's `setup.py`:: + + setup( + #... + install_requires=[ + 'pyramid_mako', # new dependency + 'pyramid_chameleon', # new dependency + 'pyramid', + #... + ], + ) - Update instances of the ``pyramid.config.Configurator`` to include the - required addons: + required addons:: config.include('pyramid_chameleon') config.include('pyramid_mako') @@ -20,7 +30,7 @@ Major Backward Incompatibilities ``pyramid.renderers.render_to_response()`` with either Mako or Chameleon templates then the ``pyramid.config.Configurator`` instance at the root of the unit test should be also be updated to include the addons, as shown - above. For example: + above. For example:: config = pyramid.testing.setUp() config.include('pyramid_mako') -- cgit v1.2.3 From 3803d92fc0da5282656d4229e063a1908ec5522a Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Thu, 5 Sep 2013 02:26:42 -0500 Subject: update render() to preserve the original response object --- CHANGES.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index cdaad5a90..3c953e728 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,15 @@ +Next Release +============ + +Backwards Incompatibilities +--------------------------- + +- Almost all renderers affect properties on the ``request.response`` response + object. For example, setting the content-type in the JSON renderer to + 'application/json'. These mutations will no longer affect + ``request.response`` when using the ``pyramid.renderers.render()`` API as + its only expected output is a rendered string object. + 1.5a1 (2013-08-30) ================== -- cgit v1.2.3 From f6f1d1685f09f1ecd3717c90e687a6e3652b4fdc Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Thu, 5 Sep 2013 02:32:41 -0500 Subject: remove the deprecated request.response_* attributes --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index cdaad5a90..80578d539 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,13 @@ +Next Release +============ + +Backwards Incompatibilities +--------------------------- + +- Removed the ``request.response_*`` varying attributes. These attributes + have been deprecated since Pyramid 1.1, and as per the deprecation policy, + have now been removed. + 1.5a1 (2013-08-30) ================== -- cgit v1.2.3 From fbdc3a01842e9067478dbf95ba8cde4e31bbb174 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Thu, 5 Sep 2013 23:22:35 -0500 Subject: s/view execution machinery/generating a response/ --- CHANGES.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 7d06999d6..6392c7b3b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,11 +10,10 @@ Backwards Incompatibilities - ``request.response`` will no longer be mutated when using the ``pyramid.renderers.render()`` API. Almost all renderers mutate the - ``request.response`` response object (for - example, the JSON renderer sets ``request.response.content_type`` to - ``application/json``), but this is only necessary when the renderer - is called by the view execution machinery; it was a bug when it was - done as a side effect of calling ``pyramid.renderers.render()``. + ``request.response`` response object (for example, the JSON renderer sets + ``request.response.content_type`` to ``application/json``), but this is + only necessary when the renderer is generating a response; it was a bug + when it was done as a side effect of calling ``pyramid.renderers.render()``. 1.5a1 (2013-08-30) ================== -- cgit v1.2.3 From c062d5ace6adedcf0f6434cffc07fb24cc608733 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Thu, 5 Sep 2013 18:09:31 -0400 Subject: Update package_name() to work with namespace pkgs The logic in pyramid.path.package_name() should take into account the fact that namespace packages created by setuptools do not have __init__.py[c] files, and so they have no __file__ attribute. This resolves an issue with WSME (https://bugs.launchpad.net/wsme/+bug/1221201) Change-Id: I39bc32a9c38fa11c4cef22a041077ed9001091be --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 6392c7b3b..5c058a9c5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,12 @@ Next Release ============ +Bug Fixes +--------- + +- Fix an exception in ``package_name()`` when resolving the package + name for namespace packages. + Backwards Incompatibilities --------------------------- -- cgit v1.2.3 From f504ccc216a6d6058ed9228b07f7d1d9a9e5945e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 7 Sep 2013 01:54:10 -0400 Subject: add change notes --- CHANGES.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 5c058a9c5..668a696f1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,8 +4,8 @@ Next Release Bug Fixes --------- -- Fix an exception in ``package_name()`` when resolving the package - name for namespace packages. +- Fix an exception in ``pyramid.path.package_name`` when resolving the package + name for namespace packages that had no ``__file__`` attribute. Backwards Incompatibilities --------------------------- @@ -21,6 +21,12 @@ Backwards Incompatibilities only necessary when the renderer is generating a response; it was a bug when it was done as a side effect of calling ``pyramid.renderers.render()``. +- The Mako and Chameleon renderers have been removed from Pyramid. Their + functionality has been moved to the ``pyramid_mako`` and + ``pyramid_chameleon`` distributions respectively. + +- Removed the ``bfg2pyramid`` fixer script. + 1.5a1 (2013-08-30) ================== -- cgit v1.2.3 From fc477b2e4b20ae2788e468e45b2831e774be8ced Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 7 Sep 2013 21:59:41 -0400 Subject: - The ``pyramid.events.NewResponse`` event is now sent **after** response callbacks are executed. It previously executed before response callbacks were executed. Rationale: it's more useful to be able to inspect the response after response callbacks have done their jobs instead of before. Closes #1116. --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 668a696f1..64b269f80 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -27,6 +27,11 @@ Backwards Incompatibilities - Removed the ``bfg2pyramid`` fixer script. +- The ``pyramid.events.NewResponse`` event is now sent **after** response + callbacks are executed. It previously executed before response callbacks + were executed. Rationale: it's more useful to be able to inspect the response + after response callbacks have done their jobs instead of before. + 1.5a1 (2013-08-30) ================== -- cgit v1.2.3 From c390f4bcae4751b406a8467fecdbdecc242f3a25 Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Sun, 8 Sep 2013 15:22:26 -0600 Subject: Add feature update to CHANGES.txt --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 9d34786e2..3a78f6950 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,13 @@ Next Release ============ +Features +-------- + +- Users can now provide dotted Python names to + ``add_{view,route,subscriber}_predicates`` instead of the predicate factory + directly. + Bug Fixes --------- -- cgit v1.2.3 From cbcd4d2dc8f948d43fffd6f403cee3bec93f87f8 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 8 Sep 2013 17:28:39 -0400 Subject: wording --- CHANGES.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 3a78f6950..a26336a00 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,9 +4,10 @@ Next Release Features -------- -- Users can now provide dotted Python names to - ``add_{view,route,subscriber}_predicates`` instead of the predicate factory - directly. +- Users can now provide dotted Python names to as the ``factory`` argument + the Configurator methods named ``add_{view,route,subscriber}_predicate`` + (instead of passing the predicate factory directly, you can pass a + dotted name which refers to the factory). Bug Fixes --------- -- cgit v1.2.3 From 2c4f4e3cbd1b5b56bb17d2348df3c397efd0a8e4 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 8 Sep 2013 20:39:39 -0400 Subject: - Removed the class named ``pyramid.view.static`` that had been deprecated since Pyramid 1.1. Instead use ``pyramid.static.static_view`` with ``use_subpath=True`` argument. --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index a26336a00..42ba8b3ce 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -73,6 +73,10 @@ Backwards Incompatibilities were executed. Rationale: it's more useful to be able to inspect the response after response callbacks have done their jobs instead of before. +- Removed the class named ``pyramid.view.static`` that had been deprecated + since Pyramid 1.1. Instead use ``pyramid.static.static_view`` with + ``use_subpath=True`` argument. + 1.5a1 (2013-08-30) ================== -- cgit v1.2.3 From 780bbf9998fd805df55499ef4a78f41cbf99c7de Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 8 Sep 2013 20:45:33 -0400 Subject: - Removed the ``pyramid.view.is_response`` function that had been deprecated since Pyramid 1.1. Use the ``pyramid.request.Request.is_response`` method instead. --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 42ba8b3ce..989d1bca1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -77,6 +77,10 @@ Backwards Incompatibilities since Pyramid 1.1. Instead use ``pyramid.static.static_view`` with ``use_subpath=True`` argument. +- Removed the ``pyramid.view.is_response`` function that had been deprecated + since Pyramid 1.1. Use the ``pyramid.request.Request.is_response`` method + instead. + 1.5a1 (2013-08-30) ================== -- cgit v1.2.3 From fdf30b3bb6f47d93d2f255a09e75be0c33d54789 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 8 Sep 2013 21:12:10 -0400 Subject: - Removed the ability to pass the following arguments to ``pyramid.config.Configurator.add_route``: `view``, ``view_context``. ``view_for``, ``view_permission``, ``view_renderer``, and ``view_attr``. Using these arguments had been deprecated since Pyramid 1.1. Instead of passing view-related arguments to ``add_route``, use a separate call to ``pyramid.config.Configurator.add_view`` to associate a view with a route using its ``route_name`` argument. Note that this impacts the ``pyramid.config.Configurator.add_static_view`` function too, because it delegates to ``add_route``. --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 989d1bca1..69547ad46 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -81,6 +81,16 @@ Backwards Incompatibilities since Pyramid 1.1. Use the ``pyramid.request.Request.is_response`` method instead. +- Removed the ability to pass the following arguments to + ``pyramid.config.Configurator.add_route``: `view``, ``view_context``. + ``view_for``, ``view_permission``, ``view_renderer``, and ``view_attr``. + Using these arguments had been deprecated since Pyramid 1.1. Instead of + passing view-related arguments to ``add_route``, use a separate call to + ``pyramid.config.Configurator.add_view`` to associate a view with a route + using its ``route_name`` argument. Note that this impacts the + ``pyramid.config.Configurator.add_static_view`` function too, because it + delegates to ``add_route``. + 1.5a1 (2013-08-30) ================== -- cgit v1.2.3 From 8fe57d871af1321b0e2b853c559d8e5c127db5fa Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 8 Sep 2013 21:24:04 -0400 Subject: - Removed the ability to influence and query a ``pyramid.request.Request`` object as if it were a dictionary. Previously it was possible to use methods like ``__getitem__``, ``get``, ``items``, and other dictlike methods to access values in the WSGI environment. This behavior had been deprecated since Pyramid 1.1. Use methods of ``request.environ`` (a real dictionary) instead. --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 69547ad46..641219a8b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -91,6 +91,13 @@ Backwards Incompatibilities ``pyramid.config.Configurator.add_static_view`` function too, because it delegates to ``add_route``. +- Removed the ability to influence and query a ``pyramid.request.Request`` + object as if it were a dictionary. Previously it was possible to use methods + like ``__getitem__``, ``get``, ``items``, and other dictlike methods to + access values in the WSGI environment. This behavior had been deprecated + since Pyramid 1.1. Use methods of ``request.environ`` (a real dictionary) + instead. + 1.5a1 (2013-08-30) ================== -- cgit v1.2.3 From 95e97113b3fe108a1dbf908ae6716b89e786c91d Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 8 Sep 2013 22:34:08 -0400 Subject: - Removed ancient backwards compatibily hack in ``pyramid.traversal.DefaultRootFactory`` which populated the ``__dict__`` of the factory with the matchdict values for compatibility with BFG 0.9. --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 641219a8b..6abef1e6b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -98,6 +98,10 @@ Backwards Incompatibilities since Pyramid 1.1. Use methods of ``request.environ`` (a real dictionary) instead. +- Removed ancient backwards compatibily hack in + ``pyramid.traversal.DefaultRootFactory`` which populated the ``__dict__`` of + the factory with the matchdict values for compatibility with BFG 0.9. + 1.5a1 (2013-08-30) ================== -- cgit v1.2.3 From c6601f77f91dc933ca429d1448f4c6b27857b608 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 8 Sep 2013 22:52:54 -0400 Subject: - The ``renderer_globals_factory`` argument to the ``pyramid.config.Configurator` constructor and its ``setup_registry`` method has been removed. The ``set_renderer_globals_factory`` method of ``pyramid.config.Configurator`` has also been removed. The (internal) ``pyramid.interfaces.IRendererGlobals`` interface was also removed. These arguments, methods and interfaces had been deprecated since 1.1. Use a ``BeforeRender`` event subscriber as documented in the "Hooks" chapter of the Pyramid narrative documentation instead of providing renderer globals values to the configurator. --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 6abef1e6b..5cfd5e70d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -102,6 +102,16 @@ Backwards Incompatibilities ``pyramid.traversal.DefaultRootFactory`` which populated the ``__dict__`` of the factory with the matchdict values for compatibility with BFG 0.9. +- The ``renderer_globals_factory`` argument to the + ``pyramid.config.Configurator` constructor and its ``setup_registry`` method + has been removed. The ``set_renderer_globals_factory`` method of + ``pyramid.config.Configurator`` has also been removed. The (internal) + ``pyramid.interfaces.IRendererGlobals`` interface was also removed. These + arguments, methods and interfaces had been deprecated since 1.1. Use a + ``BeforeRender`` event subscriber as documented in the "Hooks" chapter of the + Pyramid narrative documentation instead of providing renderer globals values + to the configurator. + 1.5a1 (2013-08-30) ================== -- cgit v1.2.3 From ec0c5cae96a57b8f3b57f18a870c8d91adc56cd8 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 9 Sep 2013 19:44:40 -0400 Subject: add note about requiring a later pyramid_debugtoolbar package if you use 1.5a2+ --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 5cfd5e70d..cdbeeffa3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -51,6 +51,11 @@ Backwards Incompatibilities result = pyramid.renderers.render('mypkg:templates/home.mako', {}) + Note that if you're using the Pyramid debug toolbar, when you upgrade + Pyramid, you'll also need to upgrade the ``pyramid_debugtoolbar`` package to + at least version 1.0.8, as older versions are not compatible with Pyramid + 1.5a2+. + - Removed the ``request.response_*`` varying attributes. These attributes have been deprecated since Pyramid 1.1, and as per the deprecation policy, have now been removed. -- cgit v1.2.3 From f8be30b706e7b735b1ea419fbd9899dd2b5c7d27 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 9 Sep 2013 20:04:29 -0400 Subject: wording --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index cdbeeffa3..41549fbe5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -54,7 +54,7 @@ Backwards Incompatibilities Note that if you're using the Pyramid debug toolbar, when you upgrade Pyramid, you'll also need to upgrade the ``pyramid_debugtoolbar`` package to at least version 1.0.8, as older versions are not compatible with Pyramid - 1.5a2+. + 1.5a2+ due to this change. - Removed the ``request.response_*`` varying attributes. These attributes have been deprecated since Pyramid 1.1, and as per the deprecation policy, -- cgit v1.2.3 From 75f3857c811c61b9461c6ba31e8147e403bf80e6 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 9 Sep 2013 21:54:41 -0400 Subject: - The ``pyramid.config.Configurator.set_request_property`` method now issues a deprecation warning when used. It had been docs-deprecated in 1.4 but did not issue a deprecation warning when used. --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 41549fbe5..5976a326f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -117,6 +117,13 @@ Backwards Incompatibilities Pyramid narrative documentation instead of providing renderer globals values to the configurator. +Deprecations +------------ + +- The ``pyramid.config.Configurator.set_request_property`` method now issues + a deprecation warning when used. It had been docs-deprecated in 1.4 + but did not issue a deprecation warning when used. + 1.5a1 (2013-08-30) ================== -- cgit v1.2.3 From bb6e929288eb7e36173adbf9b28a2062caf9af71 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 11 Sep 2013 00:55:39 -0400 Subject: wording --- CHANGES.txt | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 5976a326f..0f04587ee 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -18,11 +18,12 @@ Bug Fixes Backwards Incompatibilities --------------------------- -- Pyramid has dropped native support for the Mako and Chameleon renderers. To - re-add support for these renderers into existing projects there are 3 steps: +- Pyramid has dropped native support for the Mako and Chameleon templating + system renderers. To re-add support for these renderers into your existing + projects, there are 3 steps: - - Add `pyramid_mako` and/or `pyramid_chameleon` as dependencies by - adding them to the `install_requires` section of the package's `setup.py`:: + - Add ``pyramid_mako`` and/or ``pyramid_chameleon`` as dependencies by + adding them to the `install_requires` section of your package's `setup.py`:: setup( #... @@ -34,8 +35,8 @@ Backwards Incompatibilities ], ) - - Update instances of the ``pyramid.config.Configurator`` to include the - required addons:: + - Update instances of the ``pyramid.config.Configurator`` to ``include`` the + one or the other (or both) required addons:: config.include('pyramid_chameleon') config.include('pyramid_mako') @@ -67,10 +68,6 @@ Backwards Incompatibilities only necessary when the renderer is generating a response; it was a bug when it was done as a side effect of calling ``pyramid.renderers.render()``. -- The Mako and Chameleon renderers have been removed from Pyramid. Their - functionality has been moved to the ``pyramid_mako`` and - ``pyramid_chameleon`` distributions respectively. - - Removed the ``bfg2pyramid`` fixer script. - The ``pyramid.events.NewResponse`` event is now sent **after** response -- cgit v1.2.3 From 6c42933074f9d2be3be10e9408d7c934541b337a Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 22 Sep 2013 13:30:54 -0400 Subject: typo --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 0f04587ee..bc094bdd8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -84,7 +84,7 @@ Backwards Incompatibilities instead. - Removed the ability to pass the following arguments to - ``pyramid.config.Configurator.add_route``: `view``, ``view_context``. + ``pyramid.config.Configurator.add_route``: ``view``, ``view_context``. ``view_for``, ``view_permission``, ``view_renderer``, and ``view_attr``. Using these arguments had been deprecated since Pyramid 1.1. Instead of passing view-related arguments to ``add_route``, use a separate call to -- cgit v1.2.3 From 0778eeab0d758deba3876db9026536863218bda8 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 22 Sep 2013 13:42:34 -0400 Subject: better description of mako/chameleon bw incompat in changelog, update whatsnew for 1.5 --- CHANGES.txt | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 103 insertions(+), 21 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index bc094bdd8..add6df7bd 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -18,44 +18,126 @@ Bug Fixes Backwards Incompatibilities --------------------------- -- Pyramid has dropped native support for the Mako and Chameleon templating - system renderers. To re-add support for these renderers into your existing - projects, there are 3 steps: +- Pyramid no longer depends on or configures the Mako and Chameleon templating + system renderers by default. Disincluding these templating systems by + default means that the Pyramid core has fewer dependencies and can run on + future platforms without immediate concern for the compatibility of its + templating add-ons. It also makes maintenance slightly more effective, as + different people can maintain the templating system add-ons that they + understand and care about without needing commit access to the Pyramid core, + and it allows users who just don't want to see any packages they don't use + come along for the ride when they install Pyramid. - - Add ``pyramid_mako`` and/or ``pyramid_chameleon`` as dependencies by - adding them to the `install_requires` section of your package's `setup.py`:: + This means that upon upgrading to Pyramid 1.5a2+, projects that use either + of these templating systems will see a traceback that ends something like + this when their application attempts to render a Chameleon or Mako template:: + + ValueError: No such renderer factory .pt + + Or:: + + ValueError: No such renderer factory .mako + + Or:: + + ValueError: No such renderer factory .mak + + Support for Mako templating has been moved into an add-on package named + ``pyramid_mako``, and support for Chameleon templating has been moved into + an add-on package named ``pyramid_chameleon``. These packages are drop-in + replacements for the old built-in support for these templating langauges. + All you have to do is install them and make them active in your configuration + to register renderer factories for ``.pt`` and/or ``.mako`` (or ``.mak``) to + make your application work again. + + To re-add support for Chameleon and/or Mako template renderers into your + existing projects, follow the below steps. + + If you depend on Mako templates: + + * Make sure the ``pyramid_mako`` package is installed. One way to do this + is by adding ``pyramid_mako`` to the ``install_requires`` section of your + package's ``setup.py`` file and afterwards rerunning ``setup.py develop``:: setup( #... install_requires=[ 'pyramid_mako', # new dependency - 'pyramid_chameleon', # new dependency 'pyramid', #... ], ) - - Update instances of the ``pyramid.config.Configurator`` to ``include`` the - one or the other (or both) required addons:: + * Within the portion of your application which instantiates a Pyramid + ``pyramid.config.Configurator`` (often the ``main()`` function in + your project's ``__init__.py`` file), tell Pyramid to include the + ``pyramid_mako`` includeme:: - config.include('pyramid_chameleon') + config = Configurator(.....) config.include('pyramid_mako') - - If any unit tests are invoking either ``pyramid.renderers.render()`` or - ``pyramid.renderers.render_to_response()`` with either Mako or Chameleon - templates then the ``pyramid.config.Configurator`` instance at the root of - the unit test should be also be updated to include the addons, as shown - above. For example:: + If you depend on Chameleon templates: - config = pyramid.testing.setUp() - config.include('pyramid_mako') + * Make sure the ``pyramid_chameleon`` package is installed. One way to do + this is by adding ``pyramid_chameleon`` to the ``install_requires`` section + of your package's ``setup.py`` file and afterwards rerunning + ``setup.py develop``:: - result = pyramid.renderers.render('mypkg:templates/home.mako', {}) + setup( + #... + install_requires=[ + 'pyramid_chameleon', # new dependency + 'pyramid', + #... + ], + ) + + * Within the portion of your application which instantiates a Pyramid + ``~pyramid.config.Configurator`` (often the ``main()`` function in + your project's ``__init__.py`` file), tell Pyramid to include the + ``pyramid_chameleon`` includeme:: + + config = Configurator(.....) + config.include('pyramid_chameleon') - Note that if you're using the Pyramid debug toolbar, when you upgrade - Pyramid, you'll also need to upgrade the ``pyramid_debugtoolbar`` package to - at least version 1.0.8, as older versions are not compatible with Pyramid - 1.5a2+ due to this change. + Note that it's also fine to install these packages into *older* Pyramids for + forward compatibility purposes. Even if you don't upgrade to Pyramid 1.5 + immediately, performing the above steps in a Pyramid 1.4 installation is + perfectly fine, won't cause any difference, and will give you forward + compatibility when you eventually do upgrade to Pyramid 1.5. + + With the removal of Mako and Chameleon support from the core, some + unit tests that use the ``pyramid.renderers.render*`` methods may begin to + fail. If any of your unit tests are invoking either + ``pyramid.renderers.render()`` or ``pyramid.renderers.render_to_response()`` + with either Mako or Chameleon templates then the + ``pyramid.config.Configurator`` instance in effect during + the unit test should be also be updated to include the addons, as shown + above. For example:: + + class ATest(unittest.TestCase): + def setUp(self): + self.config = pyramid.testing.setUp() + self.config.include('pyramid_mako') + + def test_it(self): + result = pyramid.renderers.render('mypkg:templates/home.mako', {}) + + Or:: + + class ATest(unittest.TestCase): + def setUp(self): + self.config = pyramid.testing.setUp() + self.config.include('pyramid_chameleon') + + def test_it(self): + result = pyramid.renderers.render('mypkg:templates/home.pt', {}) + +- If you're using the Pyramid debug toolbar, when you upgrade Pyramid to + 1.5a2+, you'll also need to upgrade the ``pyramid_debugtoolbar`` package to + at least version 1.0.8, as older toolbar versions are not compatible with + Pyramid 1.5a2+ due to the removal of Mako support from the core. It's + fine to use this newer version of the toolbar code with older Pyramids too. - Removed the ``request.response_*`` varying attributes. These attributes have been deprecated since Pyramid 1.1, and as per the deprecation policy, -- cgit v1.2.3 From 78b41e570f69f054a51cd3f32432b92b261ed268 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 22 Sep 2013 14:11:45 -0400 Subject: prep for 1.5a2 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index add6df7bd..8295a98c9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next Release -============ +1.5a2 (2013-09-22) +================== Features -------- -- cgit v1.2.3 From 5e8eadb86aeede3c7c27d77a1be4c4d23c951252 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 22 Sep 2013 14:34:10 -0400 Subject: fix rst rendering of changes --- CHANGES.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 8295a98c9..4c9ba4863 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -247,7 +247,7 @@ Features The above example will ensure that the view is called if the request method is not POST (at least if no other view is more specific). - The :class:`pyramid.config.not_` class can be used against any value that is + The ``pyramid.config.not_`` class can be used against any value that is a predicate value passed in any of these contexts: - ``pyramid.config.Configurator.add_view`` @@ -316,9 +316,7 @@ Features In the past, only the most specific type containing views would be checked and if no matching view could be found then a PredicateMismatch would be raised. Now predicate mismatches don't hide valid views registered on - super-types. Here's an example that now works: - - .. code-block:: python + super-types. Here's an example that now works:: class IResource(Interface): -- cgit v1.2.3 From 5065a519d9e2cd59577840ceb9bf35987c3d99fd Mon Sep 17 00:00:00 2001 From: Paul Everitt Date: Tue, 24 Sep 2013 07:37:40 -0400 Subject: Added a note to CHANGES.txt, push the quick tutorial. --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 4c9ba4863..8b2210a99 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,11 @@ +Unreleased +========== + +Documentation +------------- + +- Added a "Quick Tutorial" to go with the Quick Tour + 1.5a2 (2013-09-22) ================== -- cgit v1.2.3 From af5fa07ca2fcc48ab357c0db4e1301bb960addca Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Fri, 27 Sep 2013 23:45:41 -0500 Subject: support a None value in query string parameters --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 8b2210a99..e972c08c3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,16 @@ Documentation - Added a "Quick Tutorial" to go with the Quick Tour +Backwards Incompatibilities +--------------------------- + +- The key/values in the ``_query`` parameter of ``request.route_url`` and the + ``query`` parameter of ``request.resource_url`` (and their variants), used + to encode a value of ``None`` as the string ``'None'``, leaving the resulting + query string to be ``a=b&key=None``. The value is now dropped in this + situation, leaving a query string of ``a=b&key``. + See https://github.com/Pylons/pyramid/issues/1119 + 1.5a2 (2013-09-22) ================== -- cgit v1.2.3 From 97f366094b3e31f43d6fe63bd16c86542b7e90e3 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sat, 28 Sep 2013 02:56:50 -0500 Subject: set custom request methods when doing a pview lookup --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 8b2210a99..550dd0a39 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,16 @@ Documentation - Added a "Quick Tutorial" to go with the Quick Tour +Bug Fixes +--------- + +- The ``pviews`` script did not work when a url required custom request + methods in order to perform traversal. Custom methods and descriptors added + via ``pyramid.config.Configurator.add_request_method`` will now be present, + allowing traversal to continue. + See https://github.com/Pylons/pyramid/issues/1104 + + 1.5a2 (2013-09-22) ================== -- cgit v1.2.3 From 073e5247f4adf68fe96423d6669b437dc6f337a8 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 1 Oct 2013 21:43:36 -0400 Subject: - Fix the ``pcreate`` script so that when the target directory name ends with a slash it does not produce a non-working project directory structure. Previously saying ``pcreate -s starter /foo/bar/`` produced different output than saying ``pcreate -s starter /foo/bar``. The former did not work properly. --- CHANGES.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 8b2210a99..34e722fd6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,15 @@ Unreleased ========== +Bug Fixes +--------- + +- Fix the ``pcreate`` script so that when the target directory name ends with a + slash it does not produce a non-working project directory structure. + Previously saying ``pcreate -s starter /foo/bar/`` produced different output + than saying ``pcreate -s starter /foo/bar``. The former did not work + properly. + Documentation ------------- -- cgit v1.2.3 From 678f49d2e08b128785e32ed6fc9e12df4713ad7c Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 1 Oct 2013 22:10:36 -0400 Subject: - Fix the ``principals_allowed_by_permission`` method of ``ACLAuthorizationPolicy`` so it anticipates a callable ``__acl__`` on resources. Previously it did not try to call the ``__acl__`` if it was callable. --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 34e722fd6..880f7a3f3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,6 +10,11 @@ Bug Fixes than saying ``pcreate -s starter /foo/bar``. The former did not work properly. +- Fix the ``principals_allowed_by_permission`` method of + ``ACLAuthorizationPolicy`` so it anticipates a callable ``__acl__`` + on resources. Previously it did not try to call the ``__acl__`` + if it was callable. + Documentation ------------- -- cgit v1.2.3 From 66be39bf656a2840931603bc959e38ff95e53164 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 2 Oct 2013 15:35:24 -0400 Subject: - Removed mention of ``pyramid_beaker`` from docs. Beaker is no longer maintained. Point people at ``pyramid_redis_sessions`` instead. --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 880f7a3f3..cb28d880b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -20,6 +20,9 @@ Documentation - Added a "Quick Tutorial" to go with the Quick Tour +- Removed mention of ``pyramid_beaker`` from docs. Beaker is no longer + maintained. Point people at ``pyramid_redis_sessions`` instead. + 1.5a2 (2013-09-22) ================== -- cgit v1.2.3 From 79d9d6862ff906aa0bf26968e0ba763c54775b5c Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 2 Oct 2013 18:12:29 -0400 Subject: correct the explanation of the behavior change --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index c8b79d65f..051328a02 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -36,7 +36,7 @@ Backwards Incompatibilities ``query`` parameter of ``request.resource_url`` (and their variants), used to encode a value of ``None`` as the string ``'None'``, leaving the resulting query string to be ``a=b&key=None``. The value is now dropped in this - situation, leaving a query string of ``a=b&key``. + situation, leaving a query string of ``a=b&key=``. See https://github.com/Pylons/pyramid/issues/1119 1.5a2 (2013-09-22) -- cgit v1.2.3 From 4223668ee4c0d0ac0e981f3241d56ffa805ba6d1 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 8 Oct 2013 12:46:21 +0200 Subject: remove unused renderer arg --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 051328a02..6e73de823 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -21,6 +21,8 @@ Bug Fixes allowing traversal to continue. See https://github.com/Pylons/pyramid/issues/1104 +- Remove unused ``renderer`` argument from ``Configurator.add_route``. + Documentation ------------- -- cgit v1.2.3 From ba419e5b6366fae8e129e0c0e8a631b4bf508845 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Wed, 9 Oct 2013 11:02:26 -0500 Subject: update changelog --- CHANGES.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 6e73de823..a228fbb3a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,15 @@ Unreleased ========== +Features +-------- + +- Pyramid's console scripts (``pserve``, ``pviews``, etc) can now be run + directly, allowing custom arguments to be sent to the python interpreter + at runtime. For example:: + + python -3 -m pyramid.scripts.pserve development.ini + Bug Fixes --------- -- cgit v1.2.3 From 10c6857185e299b4c6932c2a378ad3adb14867d8 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sat, 19 Oct 2013 01:12:20 -0500 Subject: add deprecation for old cookie factory --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 550dd0a39..feea11def 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -15,6 +15,12 @@ Bug Fixes allowing traversal to continue. See https://github.com/Pylons/pyramid/issues/1104 +Deprecations +------------ + +- The ``UnencryptedCookieSessionFactoryConfig`` has been deprecated and will + be replaced by the ``SignedCookieSessionFactory``. + 1.5a2 (2013-09-22) ================== -- cgit v1.2.3 From 63bf0587066216f9879ab188691579c9565f0340 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sat, 19 Oct 2013 01:22:35 -0500 Subject: updated changelog --- CHANGES.txt | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index feea11def..a9b9814f3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,21 @@ Documentation - Added a "Quick Tutorial" to go with the Quick Tour +Features +-------- + +- Added a new ``SignedCookieSessionFactory`` which is very similar to the + ``UnencryptedCookieSessionFactoryConfig`` but with a clearer focus on + signing content. The custom serializer arguments to this function should + only focus on serializing, unlike its predecessor which required the + serializer to also perform signing. + +- Added a new ``BaseCookieSessionFactory`` which acts as a generic cookie + factory that can be used by framework implementors to create their own + session implementations. It provides a reusable API which focuses strictly + on providing a dictionary-like object that properly handles renewals, + timeouts, and conformance with the ``ISession`` API. + Bug Fixes --------- @@ -18,9 +33,9 @@ Bug Fixes Deprecations ------------ -- The ``UnencryptedCookieSessionFactoryConfig`` has been deprecated and will - be replaced by the ``SignedCookieSessionFactory``. - +- The ``UnencryptedCookieSessionFactoryConfig`` has been deprecated and is + superceded by the ``SignedCookieSessionFactory``. Cookies generated by + the two factories are not compatible. 1.5a2 (2013-09-22) ================== -- cgit v1.2.3 From 6b0889cc8f3711d5f77cb663f8f2fa432eb3ad06 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sat, 19 Oct 2013 01:52:11 -0500 Subject: update doc references --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index a228fbb3a..fcfb83e4f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,6 +10,11 @@ Features python -3 -m pyramid.scripts.pserve development.ini +- Added a specific subclass of ``HTTPBadRequest`` named + ``pyramid.exceptions.BadCSRFToken`` which will now be raised in response + to failures in ``check_csrf_token``. + See https://github.com/Pylons/pyramid/pull/1149 + Bug Fixes --------- -- cgit v1.2.3 From 8385569b371a2586acf1680937ca656136c2502c Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sat, 19 Oct 2013 02:02:19 -0500 Subject: reference github issues --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index a9b9814f3..f67291ca5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,12 +14,14 @@ Features signing content. The custom serializer arguments to this function should only focus on serializing, unlike its predecessor which required the serializer to also perform signing. + See https://github.com/Pylons/pyramid/pull/1142 - Added a new ``BaseCookieSessionFactory`` which acts as a generic cookie factory that can be used by framework implementors to create their own session implementations. It provides a reusable API which focuses strictly on providing a dictionary-like object that properly handles renewals, timeouts, and conformance with the ``ISession`` API. + See https://github.com/Pylons/pyramid/pull/1142 Bug Fixes --------- @@ -36,6 +38,7 @@ Deprecations - The ``UnencryptedCookieSessionFactoryConfig`` has been deprecated and is superceded by the ``SignedCookieSessionFactory``. Cookies generated by the two factories are not compatible. + See https://github.com/Pylons/pyramid/pull/1142 1.5a2 (2013-09-22) ================== -- cgit v1.2.3 From 42f0cb2923200f07c89e011f80fe15e3c65caf03 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sat, 19 Oct 2013 03:18:05 -0500 Subject: update changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index a228fbb3a..f170308b0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -32,6 +32,12 @@ Bug Fixes - Remove unused ``renderer`` argument from ``Configurator.add_route``. +- Allow the ``BasicAuthenticationPolicy`` to work with non-ascii usernames + and passwords. The charset is not passed as part of the header and different + browsers alternate between UTF-8 and Latin-1, so the policy now attempts + to decode with UTF-8 first, and will fallback to Latin-1. + See https://github.com/Pylons/pyramid/pull/1170 + Documentation ------------- -- cgit v1.2.3 From b04ae5ac814266eb77d4a09c749e5e0394a11a1c Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sat, 19 Oct 2013 03:43:05 -0500 Subject: modify the docs for the renderer interfaces --- CHANGES.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index a228fbb3a..10ebe33ae 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -40,6 +40,9 @@ Documentation - Removed mention of ``pyramid_beaker`` from docs. Beaker is no longer maintained. Point people at ``pyramid_redis_sessions`` instead. +- Add documentation for ``pyramid.interfaces.IRendererFactory`` and + ``pyramid.interfaces.IRenderer``. + Backwards Incompatibilities --------------------------- @@ -50,6 +53,12 @@ Backwards Incompatibilities situation, leaving a query string of ``a=b&key=``. See https://github.com/Pylons/pyramid/issues/1119 +Deprecations +------------ + +- Deprecate the ``pyraid.interfaces.ITemplateRenderer`` interface. It is no + longer used since Mako and Chameleon have been split into their own packages. + 1.5a2 (2013-09-22) ================== -- cgit v1.2.3 From d79087c78c273eec3118a23243b9b93d353b09f2 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 20 Oct 2013 13:54:16 -0400 Subject: rewording about deprecation and cookie compatibility --- CHANGES.txt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 80bd78808..6fdc08398 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -44,6 +44,8 @@ Bug Fixes allowing traversal to continue. See https://github.com/Pylons/pyramid/issues/1104 +- Remove unused ``renderer`` argument from ``Configurator.add_route``. + Documentation ------------- @@ -65,11 +67,13 @@ Backwards Incompatibilities Deprecations ------------ -- The ``UnencryptedCookieSessionFactoryConfig`` has been deprecated and is - superceded by the ``SignedCookieSessionFactory``. Cookies generated by - the two factories are not compatible. - See https://github.com/Pylons/pyramid/pull/1142 -- Remove unused ``renderer`` argument from ``Configurator.add_route``. +- The ``pyramid.session.UnencryptedCookieSessionFactoryConfig`` API has been + deprecated and is superseded by the + ``pyramid.session.SignedCookieSessionFactory``. Note that while the cookies + generated by the ``UnencryptedCookieSessionFactoryConfig`` + are compatible with cookies generated by old releases, cookies generated by + the SignedCookieSessionFactory are not. See + https://github.com/Pylons/pyramid/pull/1142 1.5a2 (2013-09-22) ================== -- cgit v1.2.3 From 64223904fd6330eb9e528311799cc4dd10e9daf1 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Tue, 22 Oct 2013 22:11:13 -0500 Subject: update changelog --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 203db1a44..895dc572f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -57,6 +57,10 @@ Bug Fixes to decode with UTF-8 first, and will fallback to Latin-1. See https://github.com/Pylons/pyramid/pull/1170 +- The ``@view_defaults`` now apply to notfound and forbidden views + that are defined as methods of a decorated class. + See https://github.com/Pylons/pyramid/issues/1173 + Documentation ------------- -- cgit v1.2.3 From 3c2f95e8049bbd45b144d454daa68005361828b2 Mon Sep 17 00:00:00 2001 From: Matt Russell Date: Thu, 24 Oct 2013 23:52:42 +0100 Subject: Security APIs on pyramid.request.Request The pyramid.security Authorization API function has_permission is made available on the request. The pyramid.security Authentication API functions are now available as properties (unauthenticated_userid, authenticated_userid, effective_principals) and methods (remember_userid, forget_userid) on pyramid.request.Request. Backwards compatibility: For each of the APIs moved to request method or property, the original API in the pyramid.security module proxies to the request. Reworked tests to check module level b/c wrappers call through to mixins for each API. Tests that check no reg on request now do the right thing. Use a response callback to set the request headers for forget_userid and remember_userid. Update docs. Attempt to improve a documentation section referencing the pyramid.security.has_permission function in docs/narr/resources.rst Ensures backwards compatiblity for `pyramid.security.forget` and `pyramid.security.remember`. --- CHANGES.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 895dc572f..61f3b63f7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,14 @@ Unreleased Features -------- +- The :mod:``pyramid.security`` authentication API methods should now be + accessed via the request. The ``pyramid.security`` authoriztion API function + :meth:`has_permission` should now be accessed via the request. + The methods :meth:``pyramid.request.Request.forget_userid``, + meth:``pyramid.request.Request.remember_userid`` now automatically + set the headers on the response, as returned by the corrosponding + method of the current request's :term:``authentication policy``. + - Pyramid's console scripts (``pserve``, ``pviews``, etc) can now be run directly, allowing custom arguments to be sent to the python interpreter at runtime. For example:: -- cgit v1.2.3 From 0184b527725cfb634e4d57a1b033450fa8b24502 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 28 Oct 2013 15:26:31 -0400 Subject: Bring change log, API docs, and deprecations in line with normal policies/processes --- CHANGES.txt | 56 +++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 49 insertions(+), 7 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 61f3b63f7..20b7726c4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,13 +4,34 @@ Unreleased Features -------- -- The :mod:``pyramid.security`` authentication API methods should now be - accessed via the request. The ``pyramid.security`` authoriztion API function - :meth:`has_permission` should now be accessed via the request. - The methods :meth:``pyramid.request.Request.forget_userid``, - meth:``pyramid.request.Request.remember_userid`` now automatically - set the headers on the response, as returned by the corrosponding - method of the current request's :term:``authentication policy``. +- Authentication and authorization APIs have been added as as methods of the + request: ``request.has_permission``, ``request.forget_userid``, and + ``request.remember_userid``. + + ``request.has_permission`` is a method-based alternative to the + ``pyramid.security.has_permission`` API and works exactly the same. The + older API is now deprecated. + + ``request.forget_userid`` and ``request.remember_userid`` are method-based + alternatives to ``pyramid.security.forget`` and + ``pyramid.security.remember``. These do not work exacly the same as their + function counterparts, however. These methods automatically set the headers + returned by the authentication policy on the response, whereas the older + function-based APIs returned a sequence of headers and required the caller to + set those headers. The older function-based API still works but is now + deprecated. + +- Property API attributes have been added to the request for easier access to + authentication data: ``request.authenticated_userid``, + ``request.unauthenticated_userid``, and ``request.effective_principals``. + + These are analogues, respectively, of + ``pyramid.security.authenticated_userid``, + ``pyramid.security.unauthenticated_userid``, and + ``pyramid.security.effective_principals``. They operate exactly the same, + except they are attributes of the request instead of functions accepting a + request. They are properties, so they cannot be assigned to. The older + function-based APIs are now deprecated. - Pyramid's console scripts (``pserve``, ``pviews``, etc) can now be run directly, allowing custom arguments to be sent to the python interpreter @@ -105,6 +126,27 @@ Deprecations the SignedCookieSessionFactory are not. See https://github.com/Pylons/pyramid/pull/1142 +- The ``pyramid.security.has_permission`` API is now deprecated. Instead, use + the newly-added ``has_permission`` method of the request object. + +- The ``pyramid.security.forget`` API is now deprecated. Instead, use + the newly-added ``forget_userid`` method of the request object. + +- The ``pyramid.security.remember`` API is now deprecated. Instead, use + the newly-added ``remember_userid`` method of the request object. + +- The ``pyramid.security.effective_principals`` API is now deprecated. + Instead, use the newly-added ``effective_principals`` attribute of the + request object. + +- The ``pyramid.security.authenticated_userid`` API is now deprecated. + Instead, use the newly-added ``authenticated_userid`` attribute of the + request object. + +- The ``pyramid.security.unauthenticated_userid`` API is now deprecated. + Instead, use the newly-added ``unauthenticated_userid`` attribute of the + request object. + 1.5a2 (2013-09-22) ================== -- cgit v1.2.3 From 0dcd56c2c30863c6683c0cf442aa73dfdcd11b13 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 9 Nov 2013 17:11:16 -0500 Subject: undeprecate remember/forget functions and remove remember_userid/forget_userid methods from request --- CHANGES.txt | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 20b7726c4..9f780fe45 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,23 +4,13 @@ Unreleased Features -------- -- Authentication and authorization APIs have been added as as methods of the - request: ``request.has_permission``, ``request.forget_userid``, and - ``request.remember_userid``. +- An authorization API has been added as a method of the + request: ``request.has_permission``. ``request.has_permission`` is a method-based alternative to the ``pyramid.security.has_permission`` API and works exactly the same. The older API is now deprecated. - ``request.forget_userid`` and ``request.remember_userid`` are method-based - alternatives to ``pyramid.security.forget`` and - ``pyramid.security.remember``. These do not work exacly the same as their - function counterparts, however. These methods automatically set the headers - returned by the authentication policy on the response, whereas the older - function-based APIs returned a sequence of headers and required the caller to - set those headers. The older function-based API still works but is now - deprecated. - - Property API attributes have been added to the request for easier access to authentication data: ``request.authenticated_userid``, ``request.unauthenticated_userid``, and ``request.effective_principals``. -- cgit v1.2.3 From a3654e4866303695478fb7bd01dcdd602a717b4e Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Tue, 12 Nov 2013 01:36:10 -0600 Subject: update docs --- CHANGES.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 895dc572f..bf1c1ea01 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -29,6 +29,17 @@ Features timeouts, and conformance with the ``ISession`` API. See https://github.com/Pylons/pyramid/pull/1142 +- Allow ``pyramid.request.Request.route_url`` and + ``pyramid.request.Request.resource_url`` to accept strings for their + query string to enable alternative encodings. Also the anchor argument + will now be escaped to ensure minimal conformance. + See https://github.com/Pylons/pyramid/pull/1183 + +- Allow sending of ``_query`` and ``_anchor`` options to + ``pyramid.request.Request.static_url`` when an external URL is being + generated. + See https://github.com/Pylons/pyramid/pull/1183 + Bug Fixes --------- -- cgit v1.2.3 From 34ea769fba7a890ac0cc69b86ccc2002de864b15 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 18 Nov 2013 07:32:30 -0500 Subject: remove lies --- CHANGES.txt | 6 ------ 1 file changed, 6 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 9f780fe45..ad51ed174 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -119,12 +119,6 @@ Deprecations - The ``pyramid.security.has_permission`` API is now deprecated. Instead, use the newly-added ``has_permission`` method of the request object. -- The ``pyramid.security.forget`` API is now deprecated. Instead, use - the newly-added ``forget_userid`` method of the request object. - -- The ``pyramid.security.remember`` API is now deprecated. Instead, use - the newly-added ``remember_userid`` method of the request object. - - The ``pyramid.security.effective_principals`` API is now deprecated. Instead, use the newly-added ``effective_principals`` attribute of the request object. -- cgit v1.2.3 From 06aee8b0c35d5fdcd305ff6c7107d936bcdb7d32 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 27 Nov 2013 04:23:22 -0500 Subject: change the behavior of parse_url_overrides and resource_url to not quote a _query/query argument supplied as a string and document in changelog --- CHANGES.txt | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index d6f5ea792..40efecce1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -48,17 +48,24 @@ Features timeouts, and conformance with the ``ISession`` API. See https://github.com/Pylons/pyramid/pull/1142 -- Allow ``pyramid.request.Request.route_url`` and - ``pyramid.request.Request.resource_url`` to accept strings for their - query string to enable alternative encodings. Also the anchor argument - will now be escaped to ensure minimal conformance. - See https://github.com/Pylons/pyramid/pull/1183 +- The anchor argument to ``pyramid.request.Request.route_url`` and + ``pyramid.request.Request.resource_url`` and their derivatives will now be + escaped to ensure minimal conformance. See + https://github.com/Pylons/pyramid/pull/1183 - Allow sending of ``_query`` and ``_anchor`` options to ``pyramid.request.Request.static_url`` when an external URL is being generated. See https://github.com/Pylons/pyramid/pull/1183 +- You can now send a string as the ``_query`` argument to + ``pyramid.request.Request.route_url`` and + ``pyramid.request.Request.resource_url`` and their derivatives. When a + string is sent instead of a list or dictionary. it is not URL-encoded or + quoted; the caller must perform this job before passing it in. This is + useful if you want to be able to use a different query string format than + ``x-www-form-urlencoded``. See https://github.com/Pylons/pyramid/pull/1183 + Bug Fixes --------- -- cgit v1.2.3 From ca419fb59ccf2174a87aba5139a293b807e15df6 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 27 Nov 2013 04:50:24 -0500 Subject: revert my reversion --- CHANGES.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 40efecce1..98784f3d7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -50,7 +50,7 @@ Features - The anchor argument to ``pyramid.request.Request.route_url`` and ``pyramid.request.Request.resource_url`` and their derivatives will now be - escaped to ensure minimal conformance. See + escaped via URL quoting to ensure minimal conformance. See https://github.com/Pylons/pyramid/pull/1183 - Allow sending of ``_query`` and ``_anchor`` options to @@ -61,10 +61,10 @@ Features - You can now send a string as the ``_query`` argument to ``pyramid.request.Request.route_url`` and ``pyramid.request.Request.resource_url`` and their derivatives. When a - string is sent instead of a list or dictionary. it is not URL-encoded or - quoted; the caller must perform this job before passing it in. This is - useful if you want to be able to use a different query string format than - ``x-www-form-urlencoded``. See https://github.com/Pylons/pyramid/pull/1183 + string is sent instead of a list or dictionary. it is URL-quoted however it + does not need to be in ``k=v`` form. This is useful if you want to be able + to use a different query string format than ``x-www-form-urlencoded``. See + https://github.com/Pylons/pyramid/pull/1183 Bug Fixes --------- -- cgit v1.2.3 From 767e44f2fe7c238d0c67308e2e94241236a522e4 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 10 Dec 2013 05:19:41 -0500 Subject: use CookieProfile from webob in authentication module, add support for new domain attribute on dummy request, depend on webob 1.3 or better --- CHANGES.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 98784f3d7..0508abc61 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -66,6 +66,9 @@ Features to use a different query string format than ``x-www-form-urlencoded``. See https://github.com/Pylons/pyramid/pull/1183 +- ``pyramid.testing.DummyRequest`` now has a ``domain`` attribute to match the + new WebOb 1.3 API. Its value is ``example.com``. + Bug Fixes --------- @@ -149,6 +152,12 @@ Deprecations Instead, use the newly-added ``unauthenticated_userid`` attribute of the request object. +Dependencies +------------ + +- Pyramid now depends on WebOb>=1.3 (it uses ``webob.cookies.CookieProfile`` + from 1.3+). + 1.5a2 (2013-09-22) ================== -- cgit v1.2.3 From 3c95b1af3661618490e6a3789fd80755924e7d18 Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Tue, 10 Dec 2013 13:31:23 +0100 Subject: Fix JSONP syntax error --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 9f780fe45..c05c4561e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -51,6 +51,9 @@ Features Bug Fixes --------- +- Add a trailing semicolon to the JSONP response. This fixes JavaScript syntax + errors for old IE versions. + - Fix the ``pcreate`` script so that when the target directory name ends with a slash it does not produce a non-working project directory structure. Previously saying ``pcreate -s starter /foo/bar/`` produced different output -- cgit v1.2.3 From ab579e223f7a719acd4dd2c5ddeeb70953bec0e7 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 10 Dec 2013 14:51:20 -0500 Subject: add note about non-bw-compat between SignedCookieSessionFactory and UnencryptedCookieSessionFactory. Ref #1200. --- CHANGES.txt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 0508abc61..7e044bf0d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -35,11 +35,13 @@ Features See https://github.com/Pylons/pyramid/pull/1149 - Added a new ``SignedCookieSessionFactory`` which is very similar to the - ``UnencryptedCookieSessionFactoryConfig`` but with a clearer focus on - signing content. The custom serializer arguments to this function should - only focus on serializing, unlike its predecessor which required the - serializer to also perform signing. - See https://github.com/Pylons/pyramid/pull/1142 + ``UnencryptedCookieSessionFactoryConfig`` but with a clearer focus on signing + content. The custom serializer arguments to this function should only focus + on serializing, unlike its predecessor which required the serializer to also + perform signing. See https://github.com/Pylons/pyramid/pull/1142 . Note + that cookies generated using ``SignedCookieSessionFactory`` are not + compatible with cookies generated using ``UnencryptedCookieSessionFactory``, + so existing user session data will be destroyed if you switch to it. - Added a new ``BaseCookieSessionFactory`` which acts as a generic cookie factory that can be used by framework implementors to create their own -- cgit v1.2.3 From 5c4318abe647b65869ac6dbb5b57cf1088712061 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 10 Dec 2013 15:10:08 -0500 Subject: prep for 1.5a3 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 7e044bf0d..8ca6e7e9b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Unreleased -========== +1.5a3 (2013-12-10) +================== Features -------- -- cgit v1.2.3 From 2617e2198fac67364b195a12e228da20c3f8afee Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 12 Dec 2013 16:06:50 -0500 Subject: add url to issue --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 1ae2ebbd9..88b3c1229 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -75,7 +75,7 @@ Bug Fixes --------- - Add a trailing semicolon to the JSONP response. This fixes JavaScript syntax - errors for old IE versions. + errors for old IE versions. See https://github.com/Pylons/pyramid/pull/1205 - Fix the ``pcreate`` script so that when the target directory name ends with a slash it does not produce a non-working project directory structure. -- cgit v1.2.3 From 6b0d6ff01277993660049e3c289126ffb309c8dd Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 12 Dec 2013 16:09:05 -0500 Subject: put change note in the right release section --- CHANGES.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 88b3c1229..b7e47f0e5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,12 @@ +Next release +============ + +Bug Fixes +--------- + +- Add a trailing semicolon to the JSONP response. This fixes JavaScript syntax + errors for old IE versions. See https://github.com/Pylons/pyramid/pull/1205 + 1.5a3 (2013-12-10) ================== @@ -74,9 +83,6 @@ Features Bug Fixes --------- -- Add a trailing semicolon to the JSONP response. This fixes JavaScript syntax - errors for old IE versions. See https://github.com/Pylons/pyramid/pull/1205 - - Fix the ``pcreate`` script so that when the target directory name ends with a slash it does not produce a non-working project directory structure. Previously saying ``pcreate -s starter /foo/bar/`` produced different output -- cgit v1.2.3 From e2600da48a2808fbd3a94ea12255021b4356fb33 Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Fri, 13 Dec 2013 10:52:46 -0700 Subject: Update CHANGES --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index b7e47f0e5..9d877c0ac 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,9 @@ Next release Bug Fixes --------- +- Depend on a newer version of WebOb so that we pull in some crucial bug-fixes + that were showstoppers for functionality in Pyramid. + - Add a trailing semicolon to the JSONP response. This fixes JavaScript syntax errors for old IE versions. See https://github.com/Pylons/pyramid/pull/1205 -- cgit v1.2.3 From 4803666d788c7416fbfba93a967ed9290d366bf2 Mon Sep 17 00:00:00 2001 From: Blaise Laflamme Date: Fri, 3 Jan 2014 23:32:28 -0500 Subject: updated changes --- CHANGES.txt | 103 +++++++++++++++++++++++++++++++----------------------------- 1 file changed, 54 insertions(+), 49 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 9d877c0ac..9c38bf814 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,11 @@ Next release ============ +Features +-------- + +- Updated scaffolds with new theme, fixed documentation and sample project. + Bug Fixes --------- @@ -86,14 +91,14 @@ Features Bug Fixes --------- -- Fix the ``pcreate`` script so that when the target directory name ends with a - slash it does not produce a non-working project directory structure. - Previously saying ``pcreate -s starter /foo/bar/`` produced different output +- Fix the ``pcreate`` script so that when the target directory name ends with a + slash it does not produce a non-working project directory structure. + Previously saying ``pcreate -s starter /foo/bar/`` produced different output than saying ``pcreate -s starter /foo/bar``. The former did not work properly. -- Fix the ``principals_allowed_by_permission`` method of - ``ACLAuthorizationPolicy`` so it anticipates a callable ``__acl__`` +- Fix the ``principals_allowed_by_permission`` method of + ``ACLAuthorizationPolicy`` so it anticipates a callable ``__acl__`` on resources. Previously it did not try to call the ``__acl__`` if it was callable. @@ -120,7 +125,7 @@ Documentation - Added a "Quick Tutorial" to go with the Quick Tour -- Removed mention of ``pyramid_beaker`` from docs. Beaker is no longer +- Removed mention of ``pyramid_beaker`` from docs. Beaker is no longer maintained. Point people at ``pyramid_redis_sessions`` instead. - Add documentation for ``pyramid.interfaces.IRendererFactory`` and @@ -143,12 +148,12 @@ Deprecations ill-defined and became unused when Mako and Chameleon template bindings were split into their own packages. -- The ``pyramid.session.UnencryptedCookieSessionFactoryConfig`` API has been - deprecated and is superseded by the +- The ``pyramid.session.UnencryptedCookieSessionFactoryConfig`` API has been + deprecated and is superseded by the ``pyramid.session.SignedCookieSessionFactory``. Note that while the cookies generated by the ``UnencryptedCookieSessionFactoryConfig`` are compatible with cookies generated by old releases, cookies generated by - the SignedCookieSessionFactory are not. See + the SignedCookieSessionFactory are not. See https://github.com/Pylons/pyramid/pull/1142 - The ``pyramid.security.has_permission`` API is now deprecated. Instead, use @@ -179,8 +184,8 @@ Features -------- - Users can now provide dotted Python names to as the ``factory`` argument - the Configurator methods named ``add_{view,route,subscriber}_predicate`` - (instead of passing the predicate factory directly, you can pass a + the Configurator methods named ``add_{view,route,subscriber}_predicate`` + (instead of passing the predicate factory directly, you can pass a dotted name which refers to the factory). Bug Fixes @@ -216,10 +221,10 @@ Backwards Incompatibilities ValueError: No such renderer factory .mak - Support for Mako templating has been moved into an add-on package named - ``pyramid_mako``, and support for Chameleon templating has been moved into - an add-on package named ``pyramid_chameleon``. These packages are drop-in - replacements for the old built-in support for these templating langauges. + Support for Mako templating has been moved into an add-on package named + ``pyramid_mako``, and support for Chameleon templating has been moved into + an add-on package named ``pyramid_chameleon``. These packages are drop-in + replacements for the old built-in support for these templating langauges. All you have to do is install them and make them active in your configuration to register renderer factories for ``.pt`` and/or ``.mako`` (or ``.mak``) to make your application work again. @@ -242,9 +247,9 @@ Backwards Incompatibilities ], ) - * Within the portion of your application which instantiates a Pyramid - ``pyramid.config.Configurator`` (often the ``main()`` function in - your project's ``__init__.py`` file), tell Pyramid to include the + * Within the portion of your application which instantiates a Pyramid + ``pyramid.config.Configurator`` (often the ``main()`` function in + your project's ``__init__.py`` file), tell Pyramid to include the ``pyramid_mako`` includeme:: config = Configurator(.....) @@ -254,7 +259,7 @@ Backwards Incompatibilities * Make sure the ``pyramid_chameleon`` package is installed. One way to do this is by adding ``pyramid_chameleon`` to the ``install_requires`` section - of your package's ``setup.py`` file and afterwards rerunning + of your package's ``setup.py`` file and afterwards rerunning ``setup.py develop``:: setup( @@ -266,9 +271,9 @@ Backwards Incompatibilities ], ) - * Within the portion of your application which instantiates a Pyramid - ``~pyramid.config.Configurator`` (often the ``main()`` function in - your project's ``__init__.py`` file), tell Pyramid to include the + * Within the portion of your application which instantiates a Pyramid + ``~pyramid.config.Configurator`` (often the ``main()`` function in + your project's ``__init__.py`` file), tell Pyramid to include the ``pyramid_chameleon`` includeme:: config = Configurator(.....) @@ -281,10 +286,10 @@ Backwards Incompatibilities compatibility when you eventually do upgrade to Pyramid 1.5. With the removal of Mako and Chameleon support from the core, some - unit tests that use the ``pyramid.renderers.render*`` methods may begin to - fail. If any of your unit tests are invoking either + unit tests that use the ``pyramid.renderers.render*`` methods may begin to + fail. If any of your unit tests are invoking either ``pyramid.renderers.render()`` or ``pyramid.renderers.render_to_response()`` - with either Mako or Chameleon templates then the + with either Mako or Chameleon templates then the ``pyramid.config.Configurator`` instance in effect during the unit test should be also be updated to include the addons, as shown above. For example:: @@ -308,17 +313,17 @@ Backwards Incompatibilities result = pyramid.renderers.render('mypkg:templates/home.pt', {}) - If you're using the Pyramid debug toolbar, when you upgrade Pyramid to - 1.5a2+, you'll also need to upgrade the ``pyramid_debugtoolbar`` package to - at least version 1.0.8, as older toolbar versions are not compatible with - Pyramid 1.5a2+ due to the removal of Mako support from the core. It's + 1.5a2+, you'll also need to upgrade the ``pyramid_debugtoolbar`` package to + at least version 1.0.8, as older toolbar versions are not compatible with + Pyramid 1.5a2+ due to the removal of Mako support from the core. It's fine to use this newer version of the toolbar code with older Pyramids too. - Removed the ``request.response_*`` varying attributes. These attributes have been deprecated since Pyramid 1.1, and as per the deprecation policy, have now been removed. -- ``request.response`` will no longer be mutated when using the - ``pyramid.renderers.render()`` API. Almost all renderers mutate the +- ``request.response`` will no longer be mutated when using the + ``pyramid.renderers.render()`` API. Almost all renderers mutate the ``request.response`` response object (for example, the JSON renderer sets ``request.response.content_type`` to ``application/json``), but this is only necessary when the renderer is generating a response; it was a bug @@ -326,7 +331,7 @@ Backwards Incompatibilities - Removed the ``bfg2pyramid`` fixer script. -- The ``pyramid.events.NewResponse`` event is now sent **after** response +- The ``pyramid.events.NewResponse`` event is now sent **after** response callbacks are executed. It previously executed before response callbacks were executed. Rationale: it's more useful to be able to inspect the response after response callbacks have done their jobs instead of before. @@ -385,24 +390,24 @@ Features - A new http exception subclass named ``pyramid.httpexceptions.HTTPSuccessful`` was added. You can use this class as the ``context`` of an exception - view to catch all 200-series "exceptions" (e.g. "raise HTTPOk"). This + view to catch all 200-series "exceptions" (e.g. "raise HTTPOk"). This also allows you to catch *only* the ``HTTPOk`` exception itself; previously - this was impossible because a number of other exceptions + this was impossible because a number of other exceptions (such as ``HTTPNoContent``) inherited from ``HTTPOk``, but now they do not. - You can now generate "hybrid" urldispatch/traversal URLs more easily - by using the new ``route_name``, ``route_kw`` and ``route_remainder_name`` + by using the new ``route_name``, ``route_kw`` and ``route_remainder_name`` arguments to ``request.resource_url`` and ``request.resource_path``. See - the new section of the "Combining Traversal and URL Dispatch" documentation + the new section of the "Combining Traversal and URL Dispatch" documentation chapter entitled "Hybrid URL Generation". -- It is now possible to escape double braces in Pyramid scaffolds (unescaped, +- It is now possible to escape double braces in Pyramid scaffolds (unescaped, these represent replacement values). You can use ``\{\{a\}\}`` to - represent a "bare" ``{{a}}``. See + represent a "bare" ``{{a}}``. See https://github.com/Pylons/pyramid/pull/862 - Add ``localizer`` and ``locale_name`` properties (reified) to the request. - See https://github.com/Pylons/pyramid/issues/508. Note that the + See https://github.com/Pylons/pyramid/issues/508. Note that the ``pyramid.i18n.get_localizer`` and ``pyramid.i18n.get_locale_name`` functions now simply look up these properties on the request. @@ -452,7 +457,7 @@ Features externally-hosted static URLs to be generated based on the current protocol. - The ``AuthTktAuthenticationPolicy`` has two new options to configure its - domain usage: + domain usage: * ``parent_domain``: if set the authentication cookie is set on the parent domain. This is useful if you have multiple sites sharing the @@ -541,7 +546,7 @@ Features - The ``pyramid.config.Configurator.add_route`` method now supports being called with an external URL as pattern. See - https://github.com/Pylons/pyramid/issues/611 and the documentation section + https://github.com/Pylons/pyramid/issues/611 and the documentation section in the "URL Dispatch" chapter entitled "External Routes" for more information. Bug Fixes @@ -549,17 +554,17 @@ Bug Fixes - It was not possible to use ``pyramid.httpexceptions.HTTPException`` as the ``context`` of an exception view as very general catchall for - http-related exceptions when you wanted that exception view to override the + http-related exceptions when you wanted that exception view to override the default exception view. See https://github.com/Pylons/pyramid/issues/985 -- When the ``pyramid.reload_templates`` setting was true, and a Chameleon - template was reloaded, and the renderer specification named a macro +- When the ``pyramid.reload_templates`` setting was true, and a Chameleon + template was reloaded, and the renderer specification named a macro (e.g. ``foo#macroname.pt``), renderings of the template after the template - was reloaded due to a file change would produce the entire template body - instead of just a rendering of the macro. See + was reloaded due to a file change would produce the entire template body + instead of just a rendering of the macro. See https://github.com/Pylons/pyramid/issues/1013. -- Fix an obscure problem when combining a virtual root with a route with a +- Fix an obscure problem when combining a virtual root with a route with a ``*traverse`` in its pattern. Now the traversal path generated in such a configuration will be correct, instead of an element missing a leading slash. @@ -617,12 +622,12 @@ Backwards Incompatibilities previously returned the URL without the query string by default, it now does attach the query string unless it is overriden. -- The ``route_url`` and ``route_path`` APIs no longer quote ``/`` +- The ``route_url`` and ``route_path`` APIs no longer quote ``/`` to ``%2F`` when a replacement value contains a ``/``. This was pointless, - as WSGI servers always unquote the slash anyway, and Pyramid never sees the + as WSGI servers always unquote the slash anyway, and Pyramid never sees the quoted value. -- It is no longer possible to set a ``locale_name`` attribute of the request, +- It is no longer possible to set a ``locale_name`` attribute of the request, nor is it possible to set a ``localizer`` attribute of the request. These are now "reified" properties that look up a locale name and localizer respectively using the machinery described in the "Internationalization" -- cgit v1.2.3 From f58977a38ac65dce742dac38fe1179f61bfc3efc Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 22 Jan 2014 03:09:29 -0500 Subject: - Fix a memory leak when the configurator's ``set_request_property`` method was used or when the configurator's ``add_request_method`` method was used with the ``property=True`` attribute. See https://github.com/Pylons/pyramid/issues/1212 . Closes #1212 --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 9c38bf814..8a340f320 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -15,6 +15,11 @@ Bug Fixes - Add a trailing semicolon to the JSONP response. This fixes JavaScript syntax errors for old IE versions. See https://github.com/Pylons/pyramid/pull/1205 +- Fix a memory leak when the configurator's ``set_request_property`` method was + used or when the configurator's ``add_request_method`` method was used with + the ``property=True`` attribute. See + https://github.com/Pylons/pyramid/issues/1212 . + 1.5a3 (2013-12-10) ================== -- cgit v1.2.3 From 2c205f7477275f47fcf59ddcf755697fb695fc8e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 28 Jan 2014 21:32:31 -0500 Subject: prep for 1.5a4 release --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 8a340f320..d82b3b641 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.5a4 (2014-01-28) +================== Features -------- -- cgit v1.2.3 From 579a5f47523ada48497994f0c70152f617d6af2a Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 8 Feb 2014 15:27:27 -0500 Subject: - We no longer eagerly clear ``request.exception`` and ``request.exc_info`` in the exception view tween. This makes it possible to inspect exception information within a finished callback. See https://github.com/Pylons/pyramid/issues/1223. Closes #1223. --- CHANGES.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index d82b3b641..ed70d7036 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,14 @@ +Next release +============ + +Features +-------- + +- We no longer eagerly clear ``request.exception`` and ``request.exc_info`` in + the exception view tween. This makes it possible to inspect exception + information within a finished callback. See + https://github.com/Pylons/pyramid/issues/1223. + 1.5a4 (2014-01-28) ================== -- cgit v1.2.3 From d7b647d27ebde9bc8203629b651e69d6e7ac7c38 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 8 Feb 2014 16:27:42 -0500 Subject: prep for 1.5b1 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index ed70d7036..cefb2318d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.5b1 (2014-02-08) +================== Features -------- -- cgit v1.2.3 From a0e97bad8ad2b1657ab99dca657a6522b2be0639 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Sun, 16 Feb 2014 10:52:19 -0500 Subject: Changelog for PR #1245. --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index cefb2318d..84d0694e3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,9 @@ +Unreleased +========== + +- Avoid crash in ``pserve --reload`` under Py3k, when iterating over posiibly + mutated ``sys.modules``. + 1.5b1 (2014-02-08) ================== -- cgit v1.2.3 From adcacf48dbf6eb84a1c1661918f3fb093a929bc2 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Fri, 21 Feb 2014 21:52:14 -0600 Subject: support high-order characters in UnencryptedCookieSessionFactoryConfig secrets --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 84d0694e3..6372c904d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,9 @@ Unreleased - Avoid crash in ``pserve --reload`` under Py3k, when iterating over posiibly mutated ``sys.modules``. +- ``UnencryptedCookieSessionFactoryConfig`` failed if the secret contained + higher order characters. See https://github.com/Pylons/pyramid/issues/1246 + 1.5b1 (2014-02-08) ================== -- cgit v1.2.3 From e175ffca6a3c005b61856d50802a289f0483cfb7 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Thu, 27 Feb 2014 16:58:47 -0500 Subject: update changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 84d0694e3..434eab898 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,12 @@ Unreleased - Avoid crash in ``pserve --reload`` under Py3k, when iterating over posiibly mutated ``sys.modules``. +- Fixed a bug in ``UnencryptedCookieSessionFactoryConfig`` and + ``SignedCookieSessionFactory`` where ``timeout=None`` would cause a new + session to always be created. Also in ``SignedCookieSessionFactory`` a + ``reissue_time=None`` would cause an exception when modifying the session. + See https://github.com/Pylons/pyramid/issues/1247 + 1.5b1 (2014-02-08) ================== -- cgit v1.2.3 From 407b335ed9954c042377fd2e060c36edcd07cf60 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Thu, 27 Feb 2014 23:45:24 -0500 Subject: add support for using an absolute path to override an asset fixes #1229 --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 434eab898..2350bb3de 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,7 @@ +- Assets can now be overidden by an absolute path on the filesystem when using + the ``config.override_asset`` API. + See https://github.com/Pylons/pyramid/issues/1229 + Unreleased ========== -- cgit v1.2.3 From 90600c7484d7e3ec8620e9fbe42f3449ffa6feb2 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 8 Apr 2014 15:54:25 -0400 Subject: add changenote --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index fdf2ac644..32881ef8a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -13,6 +13,9 @@ Unreleased ``reissue_time=None`` would cause an exception when modifying the session. See https://github.com/Pylons/pyramid/issues/1247 +- Updated docs and scaffolds to keep in step with new 2.0 release of + ``Lingua``. + 1.5b1 (2014-02-08) ================== -- cgit v1.2.3 From aef68bf93127265134ebf63dca0403cf9c1955a8 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 8 Apr 2014 17:14:42 -0400 Subject: add changenote --- CHANGES.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 32881ef8a..0e452d011 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,7 +14,8 @@ Unreleased See https://github.com/Pylons/pyramid/issues/1247 - Updated docs and scaffolds to keep in step with new 2.0 release of - ``Lingua``. + ``Lingua``. This included removing all ``setup.cfg`` files from scaffolds + and documentation environments. 1.5b1 (2014-02-08) ================== -- cgit v1.2.3 From 610b85ab54452568728fc6390e6cd18670036ba2 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 8 Apr 2014 17:20:32 -0400 Subject: fix typo and update whatsnew --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 0e452d011..2e3996b3e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,7 +1,7 @@ Unreleased ========== -- Avoid crash in ``pserve --reload`` under Py3k, when iterating over posiibly +- Avoid crash in ``pserve --reload`` under Py3k, when iterating over possibly mutated ``sys.modules``. - ``UnencryptedCookieSessionFactoryConfig`` failed if the secret contained -- cgit v1.2.3 From 0cb759758c97feba48c0bbba149a774f85f2606a Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 8 Apr 2014 19:09:47 -0400 Subject: prep for 1.5 release --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 2e3996b3e..900eb116d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Unreleased -========== +1.5 (2014-04-08) +================ - Avoid crash in ``pserve --reload`` under Py3k, when iterating over possibly mutated ``sys.modules``. -- cgit v1.2.3 From c61755f77b4f945057522a9f4d4360ed6e5504d7 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 8 Apr 2014 19:16:23 -0400 Subject: vb master to 1.6dev --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 900eb116d..264497f5b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,8 @@ +Next release +============ + +- ... + 1.5 (2014-04-08) ================ -- cgit v1.2.3 From 8e90d62c0d50565e717738901e8a10a865ac1258 Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Fri, 18 Apr 2014 15:49:59 -0600 Subject: Add information to CHANGES --- CHANGES.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 264497f5b..3d2b248ae 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,7 +1,10 @@ Next release ============ -- ... +- Fix an issue whereby predicates would be resolved as maybe_dotted in the + introspectable but not when passed for registration. This would mean that + add_route_predicate for example can not take a string and turn it into the + actual callable function. 1.5 (2014-04-08) ================ -- cgit v1.2.3 From 889bdc8c89d2a2798705e1e6243baaf65264bd6e Mon Sep 17 00:00:00 2001 From: goodwillcoding Date: Sun, 20 Apr 2014 10:08:32 -0700 Subject: update change me with the scaffold changes --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 3d2b248ae..b0495617b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,11 @@ Next release ============ +- Update scaffold generating machinery to return the version of pyramid and + pyramid docs for use in scaffolds. Updated starter, alchemy and zodb + templates to have links to correctly versioned documentation and reflect + which pyramid was used to generate the scaffold. + - Fix an issue whereby predicates would be resolved as maybe_dotted in the introspectable but not when passed for registration. This would mean that add_route_predicate for example can not take a string and turn it into the -- cgit v1.2.3 From 2eb28f583cc423ab2c6b9b830cf40da7795ca04a Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Tue, 22 Apr 2014 20:03:45 -0600 Subject: Update CHANGES for wsgiapp and wsgiapp2 --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index b0495617b..2761c29dc 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,6 +10,8 @@ Next release introspectable but not when passed for registration. This would mean that add_route_predicate for example can not take a string and turn it into the actual callable function. +- p.wsgi.wsgiapp and p.wsgi.wsgiapp2 now raise ValueError when accidentally + passed None. 1.5 (2014-04-08) ================ -- cgit v1.2.3 From 09beb29cb2a142c798d97caf17ead9def79f0843 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Wed, 23 Apr 2014 23:25:19 -0500 Subject: remove redundant tests --- CHANGES.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 2761c29dc..c14939d81 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,8 +10,9 @@ Next release introspectable but not when passed for registration. This would mean that add_route_predicate for example can not take a string and turn it into the actual callable function. -- p.wsgi.wsgiapp and p.wsgi.wsgiapp2 now raise ValueError when accidentally - passed None. + +- ``pyramid.wsgi.wsgiapp`` and ``pyramid.wsgi.wsgiapp2`` now raise + ``ValueError`` when accidentally passed ``None``. 1.5 (2014-04-08) ================ -- cgit v1.2.3 From dd4f73f2543e350c0b4141efe31842be00161fa9 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Tue, 29 Apr 2014 20:32:08 -0500 Subject: require ISession.invalidate to leave behind a usable session --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index c14939d81..02be109db 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,6 +14,9 @@ Next release - ``pyramid.wsgi.wsgiapp`` and ``pyramid.wsgi.wsgiapp2`` now raise ``ValueError`` when accidentally passed ``None``. +- Clarify a previously-implied detail of the ``ISession.invalidate`` API + documentation. + 1.5 (2014-04-08) ================ -- cgit v1.2.3 From 7a6bf6f0ff1b85d0158ad49fc21037db4999c1cf Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 5 May 2014 23:53:25 -0400 Subject: modify changes wrt logging config stripping --- CHANGES.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 264497f5b..da8db870f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,7 +1,12 @@ Next release ============ -- ... +Docs +---- + +- Removed logging configuration from Quick Tutorial ini files except for + scaffolding- and logging-related chapters to avoid needing to explain it too + early. 1.5 (2014-04-08) ================ -- cgit v1.2.3 From d24055e3ec0c09974f180a459143676ba457a32f Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Thu, 24 Apr 2014 00:24:54 -0500 Subject: modify p.testing.setUp() to configure the package relative to caller --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 2b80e87e2..de0a4324b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -12,6 +12,11 @@ Bug Fixes add_route_predicate for example can not take a string and turn it into the actual callable function. +- Fix ``pyramid.testing.setUp`` to return a ``Configurator`` with a proper + package. Previously it was not possible to do package-relative includes + using the returned ``Configurator`` during testing. There is now a + ``package`` argument that can override this behavior as well. + Docs ---- -- cgit v1.2.3 From 93bc46364b13723194dba62fe78dee8b358d6401 Mon Sep 17 00:00:00 2001 From: Fenton Travers Date: Tue, 6 May 2014 23:28:23 -0700 Subject: Added required notes to changes/contributors file. --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index c14939d81..1e2e42413 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,6 +14,9 @@ Next release - ``pyramid.wsgi.wsgiapp`` and ``pyramid.wsgi.wsgiapp2`` now raise ``ValueError`` when accidentally passed ``None``. +- Removed non-ascii copyright symbol from templates, as this was + causing the scaffolds to fail for project generation. + 1.5 (2014-04-08) ================ -- cgit v1.2.3 From dc9c386fb762defd97313cb6261fcd95f7321e71 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Fri, 16 May 2014 21:54:40 -0500 Subject: update changelog --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 0c461e550..e60c6efac 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -17,6 +17,9 @@ Bug Fixes using the returned ``Configurator`` during testing. There is now a ``package`` argument that can override this behavior as well. +- Fix an issue where a ``pyramid.response.FileResponse`` may apply a charset + where it does not belong. See https://github.com/Pylons/pyramid/pull/1251 + Docs ---- -- cgit v1.2.3 From 32602159eeef8595c7db6edbf1461c58e9ff0349 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 5 Jun 2014 22:47:35 -0400 Subject: - Work around a bug introduced in Python 2.7.7 on Windows where ``mimetypes.guess_type`` returns Unicode rather than str for the content type, unlike any previous version of Python. See https://github.com/Pylons/pyramid/issues/1360 for more information. Closes #1360. --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index e60c6efac..51af8ee01 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -20,6 +20,11 @@ Bug Fixes - Fix an issue where a ``pyramid.response.FileResponse`` may apply a charset where it does not belong. See https://github.com/Pylons/pyramid/pull/1251 +- Work around a bug introduced in Python 2.7.7 on Windows where + ``mimetypes.guess_type`` returns Unicode rather than str for the content + type, unlike any previous version of Python. See + https://github.com/Pylons/pyramid/issues/1360 for more information. + Docs ---- -- cgit v1.2.3 From 9177d010e6646161e674b82b88bf177ebe8a7b2e Mon Sep 17 00:00:00 2001 From: Chris Rossi Date: Mon, 21 Jul 2014 17:29:11 -0400 Subject: Update change log. --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 51af8ee01..54c1a20ed 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,12 @@ Next release ============ +Features +-------- + +- Cache busting for static resources has been added and is available via a new + argument to ``pyramid.config.Configurator.add_static_view``: ``cachebuster``. + Bug Fixes --------- -- cgit v1.2.3 From 15b979413c700fbc289328b25aaa4ba1c4cbdda9 Mon Sep 17 00:00:00 2001 From: Chris Rossi Date: Thu, 24 Jul 2014 17:13:08 -0400 Subject: cachebuster -> cachebust --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 54c1a20ed..63987d980 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -5,7 +5,7 @@ Features -------- - Cache busting for static resources has been added and is available via a new - argument to ``pyramid.config.Configurator.add_static_view``: ``cachebuster``. + argument to ``pyramid.config.Configurator.add_static_view``: ``cachebust``. Bug Fixes --------- -- cgit v1.2.3 From ae6c883018560fe7b1ef02f21b1ceacf2e75528f Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Wed, 7 May 2014 22:54:40 -0500 Subject: add config.root_package attribute --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 63987d980..d66534752 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,11 @@ Features - Cache busting for static resources has been added and is available via a new argument to ``pyramid.config.Configurator.add_static_view``: ``cachebust``. +- Add ``pyramid.config.Configurator.root_package`` attribute and init + parameter to assist with includeable packages that wish to resolve + resources relative to the package in which the ``Configurator`` was created. + See https://github.com/Pylons/pyramid/pull/1337 + Bug Fixes --------- -- cgit v1.2.3 From ab2a77274584700fbcd508d294ff39cb81a99cfd Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 20 Oct 2014 18:06:53 -0500 Subject: reference more pull requests in the change log --- CHANGES.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 63987d980..38c348e67 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,22 +6,26 @@ Features - Cache busting for static resources has been added and is available via a new argument to ``pyramid.config.Configurator.add_static_view``: ``cachebust``. + See https://github.com/Pylons/pyramid/pull/1380 Bug Fixes --------- - ``pyramid.wsgi.wsgiapp`` and ``pyramid.wsgi.wsgiapp2`` now raise ``ValueError`` when accidentally passed ``None``. + See https://github.com/Pylons/pyramid/pull/1320 - Fix an issue whereby predicates would be resolved as maybe_dotted in the introspectable but not when passed for registration. This would mean that - add_route_predicate for example can not take a string and turn it into the - actual callable function. + ``add_route_predicate`` for example can not take a string and turn it into + the actual callable function. + See https://github.com/Pylons/pyramid/pull/1306 - Fix ``pyramid.testing.setUp`` to return a ``Configurator`` with a proper package. Previously it was not possible to do package-relative includes using the returned ``Configurator`` during testing. There is now a ``package`` argument that can override this behavior as well. + See https://github.com/Pylons/pyramid/pull/1322 - Fix an issue where a ``pyramid.response.FileResponse`` may apply a charset where it does not belong. See https://github.com/Pylons/pyramid/pull/1251 -- cgit v1.2.3 From 18566a29e5b3fa88c7ce4732ccb6beee2c8a05c6 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sun, 9 Nov 2014 23:41:14 -0600 Subject: update changelog from #1376 --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index d5ad8e094..617e1497c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -40,6 +40,9 @@ Bug Fixes type, unlike any previous version of Python. See https://github.com/Pylons/pyramid/issues/1360 for more information. +- ``pcreate`` now normalizes the package name by converting hyphens to + underscores. See https://github.com/Pylons/pyramid/pull/1376 + Docs ---- -- cgit v1.2.3 From 909486ab9321bbac8018e202a42b290a096d2705 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sun, 9 Nov 2014 23:50:48 -0600 Subject: update changelog for #1373 --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 617e1497c..0605ed308 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -43,6 +43,10 @@ Bug Fixes - ``pcreate`` now normalizes the package name by converting hyphens to underscores. See https://github.com/Pylons/pyramid/pull/1376 +- Fix an issue with the final response/finished callback being unable to + add another callback to the list. See + https://github.com/Pylons/pyramid/pull/1373 + Docs ---- -- cgit v1.2.3 From ba5444531cccf50e7d8b146f80cd22b1508f4bcf Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 10 Nov 2014 00:15:53 -0600 Subject: update changelog --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 0605ed308..927e7ce2a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -13,6 +13,9 @@ Features resources relative to the package in which the ``Configurator`` was created. See https://github.com/Pylons/pyramid/pull/1337 +- Added line numbers to the log formatters in the scaffolds to assist with + debugging. See https://github.com/Pylons/pyramid/pull/1326 + Bug Fixes --------- -- cgit v1.2.3 From 7dd39020afbd50f6b27e03bb81ace700ae280bef Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 10 Nov 2014 00:27:46 -0600 Subject: update changelog with new http exceptions from #1372 --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 927e7ce2a..c1b729b3f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -16,6 +16,11 @@ Features - Added line numbers to the log formatters in the scaffolds to assist with debugging. See https://github.com/Pylons/pyramid/pull/1326 +- Add new HTTP exception objects for status codes + ``428 Precondition Required``, ``429 Too Many Requests`` and + ``431 Request Header Fields Too Large`` in ``pyramid.httpexceptions``. + See https://github.com/Pylons/pyramid/pull/1372/files + Bug Fixes --------- -- cgit v1.2.3 From 3ffd40c295a1e37ec94b6123fff8fb4dd5f5abf5 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 10 Nov 2014 01:39:53 -0600 Subject: update changelog --- CHANGES.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index c1b729b3f..8083113ef 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -55,6 +55,13 @@ Bug Fixes add another callback to the list. See https://github.com/Pylons/pyramid/pull/1373 +Deprecations +------------ + +- Renamed the ``principal`` argument to ``pyramid.security.remember()`` to + ``userid`` in order to clarify its intended purpose. + See https://github.com/Pylons/pyramid/pull/1399 + Docs ---- @@ -65,6 +72,10 @@ Docs - Clarify a previously-implied detail of the ``ISession.invalidate`` API documentation. +- Improve and clarify the documentation on what Pyramid defines as a + ``principal`` and a ``userid`` in its security APIs. + See https://github.com/Pylons/pyramid/pull/1399 + Scaffolds --------- -- cgit v1.2.3 From 73b1622d2610fd67ed2f8dd71dac2d9e22d76605 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 10 Nov 2014 01:49:03 -0600 Subject: moar changelogs! --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index c1b729b3f..cf2cced51 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,6 +11,9 @@ Features - Add ``pyramid.config.Configurator.root_package`` attribute and init parameter to assist with includeable packages that wish to resolve resources relative to the package in which the ``Configurator`` was created. + This is especially useful for addons that need to load asset specs from + settings, in which case it is natural for a user to define things relative + to their own packages. See https://github.com/Pylons/pyramid/pull/1337 - Added line numbers to the log formatters in the scaffolds to assist with -- cgit v1.2.3 From 46a268b3e0c3f80974bc9f4471afdc819ba28763 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Tue, 11 Nov 2014 01:15:23 -0600 Subject: update changelog --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index cf2cced51..4d697de64 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -58,6 +58,9 @@ Bug Fixes add another callback to the list. See https://github.com/Pylons/pyramid/pull/1373 +- Fix a failing unittest caused by differing mimetypes across various OSs. + See https://github.com/Pylons/pyramid/issues/1405 + Docs ---- -- cgit v1.2.3 From 7b1d4223db73163f46600cf3d3badf4961dddafb Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Tue, 11 Nov 2014 01:19:36 -0600 Subject: update changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 4d697de64..b5d08c8ff 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -24,6 +24,12 @@ Features ``431 Request Header Fields Too Large`` in ``pyramid.httpexceptions``. See https://github.com/Pylons/pyramid/pull/1372/files +- Make it simple to define notfound and forbidden views that wish to use + the default exception-response view but with altered predicates and other + configuration options. The ``view`` argument is now optional in + ``config.add_notfound_view`` and ``config.add_forbidden_view``.. + See https://github.com/Pylons/pyramid/issues/494 + Bug Fixes --------- -- cgit v1.2.3 From f3a5679992c51ed3067bb6f5b577dad9fe4274ff Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Tue, 11 Nov 2014 01:34:37 -0600 Subject: enable PYTHONSTARTUP support in pshell Fixes #1299 --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index cf2cced51..4bd438bd7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -24,6 +24,10 @@ Features ``431 Request Header Fields Too Large`` in ``pyramid.httpexceptions``. See https://github.com/Pylons/pyramid/pull/1372/files +- The ``pshell`` script will now load a ``PYTHONSTARTUP`` file if one is + defined in the environment prior to launching the interpreter. + See https://github.com/Pylons/pyramid/pull/1299 + Bug Fixes --------- -- cgit v1.2.3 From e7745ac72ff5c5c499722a8cfcc589a77201fc9a Mon Sep 17 00:00:00 2001 From: Randall Leeds Date: Thu, 10 Jul 2014 16:31:31 -0700 Subject: Fix static views with package root spec patterns --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index b5d08c8ff..5a0edc566 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -67,6 +67,9 @@ Bug Fixes - Fix a failing unittest caused by differing mimetypes across various OSs. See https://github.com/Pylons/pyramid/issues/1405 +- Fix route generation for static view asset specifications having no path. + See https://github.com/Pylons/pyramid/pull/1377 + Docs ---- -- cgit v1.2.3 From 823ac447329e46e5826e8e3228d9f847f9790ee8 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Tue, 11 Nov 2014 12:01:10 -0600 Subject: adjust tests to work even when someone has defined PYTHONSTARTUP in their shell --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 4bd438bd7..f72a793a5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -26,7 +26,7 @@ Features - The ``pshell`` script will now load a ``PYTHONSTARTUP`` file if one is defined in the environment prior to launching the interpreter. - See https://github.com/Pylons/pyramid/pull/1299 + See https://github.com/Pylons/pyramid/pull/1448 Bug Fixes --------- -- cgit v1.2.3 From c617b7df97a326ca010ddb196978169e2a178c4a Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Thu, 13 Nov 2014 15:47:21 -0600 Subject: update changelog for fixes from #1453 --- CHANGES.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index b5d08c8ff..76f9bc84e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -12,8 +12,8 @@ Features parameter to assist with includeable packages that wish to resolve resources relative to the package in which the ``Configurator`` was created. This is especially useful for addons that need to load asset specs from - settings, in which case it is natural for a user to define things relative - to their own packages. + settings, in which case it is may be natural for a developer to define + imports or assets relative to the top-level package. See https://github.com/Pylons/pyramid/pull/1337 - Added line numbers to the log formatters in the scaffolds to assist with @@ -30,6 +30,9 @@ Features ``config.add_notfound_view`` and ``config.add_forbidden_view``.. See https://github.com/Pylons/pyramid/issues/494 +- Greatly improve the readability of the ``pcreate`` shell script output. + See https://github.com/Pylons/pyramid/pull/1453 + Bug Fixes --------- -- cgit v1.2.3 From 716a20fc79c98e250c90a3d3e9f2218bec181a8d Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sun, 16 Nov 2014 23:11:15 -0600 Subject: use hmac.compare_digest if available --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index a893ebae4..bbaa6739e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -33,6 +33,11 @@ Features - Greatly improve the readability of the ``pcreate`` shell script output. See https://github.com/Pylons/pyramid/pull/1453 +- Improve robustness to timing attacks in the ``AuthTktCookieHelper`` and + the ``SignedCookieSessionFactory`` classes by using the stdlib's + ``hmac.compare_digest`` if it is available (such as Python 2.7.7+ and 3.3+). + See https://github.com/Pylons/pyramid/pull/1457 + Bug Fixes --------- -- cgit v1.2.3 From 8d535290147bc943045e1feaee9326cf3b996bed Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sun, 16 Nov 2014 23:31:11 -0600 Subject: attempt to clarify the benefit of these changes --- CHANGES.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 7d79ddd18..2e2707f3f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,7 +8,17 @@ Features argument to ``pyramid.config.Configurator.add_static_view``: ``cachebust``. - Assets can now be overidden by an absolute path on the filesystem when using - the ``config.override_asset`` API. + the ``config.override_asset`` API. This makes it possible to fully support + serving up static content from a mutable directory while still being able + to use the ``request.static_url`` API and ``config.add_static_view``. + Previously it was not possible to use ``config.add_static_view`` with an + absolute path **and** generate urls to the content. This change replaces + the call, ``config.add_static_view('/abs/path', 'static')``, with + ``config.add_static_view('myapp:static', 'static')`` and + ``config.override_asset(to_override='myapp:static/', + override_with='/abs/path/')``. The ``myapp:static`` asset spec is completely + made up and does not need to exist - it is used for generating urls + via ``request.static_url('myapp:static/foo.png')``. See https://github.com/Pylons/pyramid/issues/1229 Bug Fixes -- cgit v1.2.3 From 650d3d5fa383d89a3b28029162d6ef4d58be3da1 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 17 Nov 2014 01:25:58 -0600 Subject: reference appropriate PR --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 2e2707f3f..06852b885 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -19,7 +19,7 @@ Features override_with='/abs/path/')``. The ``myapp:static`` asset spec is completely made up and does not need to exist - it is used for generating urls via ``request.static_url('myapp:static/foo.png')``. - See https://github.com/Pylons/pyramid/issues/1229 + See https://github.com/Pylons/pyramid/issues/1252 Bug Fixes --------- -- cgit v1.2.3 From bc8e4d2acf583b9c581202c0f0efee3ee1da710a Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Fri, 21 Nov 2014 14:26:10 -0500 Subject: Add support for testing 'pypy3' under Tox / Travis. --- CHANGES.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index c7c829fb6..ea3323aa0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,8 @@ Next release Features -------- +- Added support / testing for 'pypy3' under Tox and Travis. + - Cache busting for static resources has been added and is available via a new argument to ``pyramid.config.Configurator.add_static_view``: ``cachebust``. See https://github.com/Pylons/pyramid/pull/1380 -- cgit v1.2.3 From 149d36342e9970295ee49b0dfca7f1c896bce2a9 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Fri, 21 Nov 2014 19:02:36 -0600 Subject: update changelog --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index ea3323aa0..d6264b892 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,9 @@ Features - Added support / testing for 'pypy3' under Tox and Travis. +- Automate code coverage metrics across py2 and py3 instead of just py2. + See https://github.com/Pylons/pyramid/pull/1471 + - Cache busting for static resources has been added and is available via a new argument to ``pyramid.config.Configurator.add_static_view``: ``cachebust``. See https://github.com/Pylons/pyramid/pull/1380 -- cgit v1.2.3 From 782eb470cf4b31c2cab75f3cc14a5f9c42eeb9f0 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Fri, 21 Nov 2014 19:03:44 -0600 Subject: update changelog for #1469 --- CHANGES.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index ea3323aa0..46c331268 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -5,6 +5,7 @@ Features -------- - Added support / testing for 'pypy3' under Tox and Travis. + See https://github.com/Pylons/pyramid/pull/1469 - Cache busting for static resources has been added and is available via a new argument to ``pyramid.config.Configurator.add_static_view``: ``cachebust``. -- cgit v1.2.3 From d35a916095943b020f30acb90e878abe9bfd4fb1 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sat, 27 Dec 2014 01:58:59 -0600 Subject: update changelog --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 46c331268..b60600198 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,12 @@ Next release Features -------- +- The ``pyramid.config.Configurator`` has grown the ability to allow + actions to call other actions during a commit-cycle. This enables much more + logic to be placed into actions, such as the ability to invoke other actions + or group them for improved conflict detection. + See https://github.com/Pylons/pyramid/pull/1513 + - Added support / testing for 'pypy3' under Tox and Travis. See https://github.com/Pylons/pyramid/pull/1469 -- cgit v1.2.3 From a62462606704081b37ae0cb4c9f07a4690480609 Mon Sep 17 00:00:00 2001 From: John Anderson Date: Thu, 1 Jan 2015 15:26:00 -0800 Subject: Added CHANGES entry for this PR --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 46c331268..129ce4616 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -59,6 +59,11 @@ Features via ``request.static_url('myapp:static/foo.png')``. See https://github.com/Pylons/pyramid/issues/1252 +- Added ``pyramid.config.Configurator.set_response_factory`` and the + ``response_factory`` keyword argument to the ``Configurator`` for defining + a factory that will return a custom ``Response`` class. + See https://github.com/Pylons/pyramid/pull/1499 + Bug Fixes --------- -- cgit v1.2.3 From 149ea94f24479889554b863c40fe72912f7203a8 Mon Sep 17 00:00:00 2001 From: John Anderson Date: Thu, 1 Jan 2015 22:23:06 -0800 Subject: Updated the CHANGES to discuss these improvments. --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 129ce4616..2e2637ef1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -64,6 +64,12 @@ Features a factory that will return a custom ``Response`` class. See https://github.com/Pylons/pyramid/pull/1499 +- Overally improvments for the ``proutes`` command. Added ``--format`` and + ``--glob`` arguments to the command, introduced the ``method`` + column for displaying available request methods, and improved the ``view`` + output by showing the module instead of just ``__repr__``. + See https://github.com/Pylons/pyramid/pull/1488 + Bug Fixes --------- -- cgit v1.2.3 From 3f8ac549fa352b54a9f151b5047cc4d13f942a4a Mon Sep 17 00:00:00 2001 From: John Anderson Date: Thu, 1 Jan 2015 22:24:09 -0800 Subject: Fix typo --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 2e2637ef1..2079d5cff 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -64,7 +64,7 @@ Features a factory that will return a custom ``Response`` class. See https://github.com/Pylons/pyramid/pull/1499 -- Overally improvments for the ``proutes`` command. Added ``--format`` and +- Overall improvments for the ``proutes`` command. Added ``--format`` and ``--glob`` arguments to the command, introduced the ``method`` column for displaying available request methods, and improved the ``view`` output by showing the module instead of just ``__repr__``. -- cgit v1.2.3 From 2d659e41d01926acaa8670c4d20be20300bcedb7 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 5 Jan 2015 23:25:58 -0600 Subject: update changes for #1417 --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 129ce4616..150ca85b3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -64,6 +64,10 @@ Features a factory that will return a custom ``Response`` class. See https://github.com/Pylons/pyramid/pull/1499 +- Allow an iterator to be returned from a renderer. Previously it was only + possible to return bytes or unicode. + See https://github.com/Pylons/pyramid/pull/1417 + Bug Fixes --------- -- cgit v1.2.3 From 8dd970873a58e1f017c8bce7be62409b313f74e1 Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Tue, 20 Jan 2015 10:44:37 -0800 Subject: Give pserve the ability top open server in browser E.g.: pserve app.ini --browser or: pserve app.ini -b --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 150ca85b3..0a28dc248 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -68,6 +68,9 @@ Features possible to return bytes or unicode. See https://github.com/Pylons/pyramid/pull/1417 +- ``pserve`` can now take a ``-b`` or ``--browser`` option to open the server + URL in a web browser. See https://github.com/Pylons/pyramid/pull/1533 + Bug Fixes --------- -- cgit v1.2.3 From 86f4d59b23f91f4a070417bebe1302661d761b2f Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Thu, 5 Feb 2015 22:38:29 -0600 Subject: update changelog --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index b1bd36904..22c7a20c2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -77,6 +77,9 @@ Features output by showing the module instead of just ``__repr__``. See https://github.com/Pylons/pyramid/pull/1488 +- Support keyword-only arguments and function annotations in views in + Python 3. See https://github.com/Pylons/pyramid/pull/1556 + Bug Fixes --------- -- cgit v1.2.3 From 63366c3ddf353bbd2a237875f0c42e8f470c31c7 Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Sun, 14 Dec 2014 18:56:33 -0700 Subject: Update CHANGES --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 22c7a20c2..b2f56e02e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -130,6 +130,12 @@ Deprecations Docs ---- +- Moved the documentation for ``accept`` on ``Configurator.add_view`` to no + longer be part of the decorator list. See + https://github.com/Pylons/pyramid/issues/1391 for a bug report stating + ``not_`` was failing on ``accept``. Discussion with @mcdonc led to the + conclusion that it should not be documented as a predicate. + - Removed logging configuration from Quick Tutorial ini files except for scaffolding- and logging-related chapters to avoid needing to explain it too early. -- cgit v1.2.3 From c015da76f51304a5186909f01a7850de073eabdc Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Sun, 14 Dec 2014 19:56:25 -0700 Subject: Fix typo --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index b2f56e02e..d3788afa5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -131,7 +131,7 @@ Docs ---- - Moved the documentation for ``accept`` on ``Configurator.add_view`` to no - longer be part of the decorator list. See + longer be part of the predicate list. See https://github.com/Pylons/pyramid/issues/1391 for a bug report stating ``not_`` was failing on ``accept``. Discussion with @mcdonc led to the conclusion that it should not be documented as a predicate. -- cgit v1.2.3 From f176630ebd9848173e6cc748f361b4ce9acf76f3 Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Thu, 5 Feb 2015 23:15:51 -0700 Subject: Add link to PR --- CHANGES.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index d3788afa5..832a2c216 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -135,6 +135,7 @@ Docs https://github.com/Pylons/pyramid/issues/1391 for a bug report stating ``not_`` was failing on ``accept``. Discussion with @mcdonc led to the conclusion that it should not be documented as a predicate. + See https://github.com/Pylons/pyramid/pull/1487 for this PR - Removed logging configuration from Quick Tutorial ini files except for scaffolding- and logging-related chapters to avoid needing to explain it too -- cgit v1.2.3 From 1ef35b7194ad744f23cf2881bbf881690d680c83 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Fri, 6 Feb 2015 01:04:17 -0600 Subject: update changelog --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 22c7a20c2..9b0ee90e9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -120,6 +120,11 @@ Bug Fixes - Fix route generation for static view asset specifications having no path. See https://github.com/Pylons/pyramid/pull/1377 +- Allow the ``pyramid.renderers.JSONP`` renderer to work even if there is no + valid request object. In this case it will not wrap the object in a + callback and thus behave just like the ``pyramid.renderers.JSON` renderer. + See https://github.com/Pylons/pyramid/pull/1561 + Deprecations ------------ -- cgit v1.2.3 From d23e6986b1122e8d7344f2c882ddd3e3f423e30f Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Fri, 6 Feb 2015 02:06:07 -0600 Subject: update changelog and docs --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index b334f5258..30f30cec7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -80,6 +80,16 @@ Features - Support keyword-only arguments and function annotations in views in Python 3. See https://github.com/Pylons/pyramid/pull/1556 +- ``request.response`` will no longer be mutated when using the + ``pyramid.renderers.render_to_response()`` API. Almost all renderers + mutate the ``request.response`` response object (for example, the JSON + renderer sets ``request.response.content_type`` to ``application/json``). + However, when invoking ``render_to_response`` it is not expected that the + response object being returned would be the same one used later in the + request. The response object returned from ``render_to_response`` is now + explicitly different from ``request.response``. This does not change the + API of a renderers. See https://github.com/Pylons/pyramid/pull/1563 + Bug Fixes --------- -- cgit v1.2.3 From e30c3b9138605a16386a3e67d233b72cbbcfc5e8 Mon Sep 17 00:00:00 2001 From: Jeff Dairiki Date: Thu, 22 Jan 2015 11:01:32 -0800 Subject: Prevent DeprecationWarning from setuptools>=11.3 --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index b334f5258..a7138db1a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -125,6 +125,9 @@ Bug Fixes callback and thus behave just like the ``pyramid.renderers.JSON` renderer. See https://github.com/Pylons/pyramid/pull/1561 +- Prevent "parameters to load are deprecated" ``DeprecationWarning`` + from setuptools>=11.3. + Deprecations ------------ -- cgit v1.2.3 From 3279854b8ffc02593a604f84d0f72b8e7d4f24a8 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Fri, 6 Feb 2015 10:05:12 -0600 Subject: update changelog for #1541 --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index a7138db1a..2dee64a84 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -126,7 +126,7 @@ Bug Fixes See https://github.com/Pylons/pyramid/pull/1561 - Prevent "parameters to load are deprecated" ``DeprecationWarning`` - from setuptools>=11.3. + from setuptools>=11.3. See https://github.com/Pylons/pyramid/pull/1541 Deprecations ------------ -- cgit v1.2.3 From 04206845591cb5af1038a29f6e943bfb169c2d5c Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Fri, 6 Feb 2015 13:03:20 -0600 Subject: update changelog --- CHANGES.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 30f30cec7..a02ae504b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -81,14 +81,18 @@ Features Python 3. See https://github.com/Pylons/pyramid/pull/1556 - ``request.response`` will no longer be mutated when using the - ``pyramid.renderers.render_to_response()`` API. Almost all renderers + ``pyramid.renderers.render_to_response()`` API. It is now necessary to + pass in a ``response=`` argument to ``render_to_response`` if you wish to + supply the renderer with a custom response object for it to use. If you + do not pass one then a response object will be created using the + application's ``IResponseFactory``. Almost all renderers mutate the ``request.response`` response object (for example, the JSON renderer sets ``request.response.content_type`` to ``application/json``). However, when invoking ``render_to_response`` it is not expected that the response object being returned would be the same one used later in the request. The response object returned from ``render_to_response`` is now explicitly different from ``request.response``. This does not change the - API of a renderers. See https://github.com/Pylons/pyramid/pull/1563 + API of a renderer. See https://github.com/Pylons/pyramid/pull/1563 Bug Fixes --------- -- cgit v1.2.3 From c9cb19b9e14e2d1ec9ba17691212ea706f19f61c Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Sat, 7 Feb 2015 00:35:36 -0700 Subject: Add changelog entry --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 832a2c216..09a4bbf88 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,11 @@ Next release Features -------- +- pcreate when run without a scaffold argument will now print information on + the missing flag, as well as a list of available scaffolds. + See https://github.com/Pylons/pyramid/pull/1566 and + https://github.com/Pylons/pyramid/issues/1297 + - Added support / testing for 'pypy3' under Tox and Travis. See https://github.com/Pylons/pyramid/pull/1469 -- cgit v1.2.3 From b4e9902fe8cc28bac8e3e7dae0d8b2a270cf1640 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Tue, 10 Feb 2015 12:58:23 -0600 Subject: update changelog for #1574 --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 27052cf0f..1e50a623f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -133,6 +133,9 @@ Bug Fixes - Prevent "parameters to load are deprecated" ``DeprecationWarning`` from setuptools>=11.3. See https://github.com/Pylons/pyramid/pull/1541 +- Avoiding timing attacks against CSRF tokens. + See https://github.com/Pylons/pyramid/pull/1574 + Deprecations ------------ -- cgit v1.2.3 From 06bb4a4db67321e7629f4f2438516ba358f226e9 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Wed, 11 Feb 2015 00:25:53 -0600 Subject: update changelog --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 2dee64a84..95566a54b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -128,6 +128,13 @@ Bug Fixes - Prevent "parameters to load are deprecated" ``DeprecationWarning`` from setuptools>=11.3. See https://github.com/Pylons/pyramid/pull/1541 +- Avoiding sharing the ``IRenderer`` objects across threads when attached to + a view using the `renderer=` argument. These renderers were instantiated + at time of first render and shared between requests, causing potentially + subtle effects like `pyramid.reload_templates = true` failing to work + in `pyramid_mako`. See https://github.com/Pylons/pyramid/pull/1575 + and https://github.com/Pylons/pyramid/issues/1268 + Deprecations ------------ -- cgit v1.2.3 From c45d6aea833245fa4fd9bb81352feb37045dfb07 Mon Sep 17 00:00:00 2001 From: David Glick Date: Thu, 12 Feb 2015 21:10:30 -0800 Subject: Add workaround to make sure echo is enabled after reload (refs #689) Also add myself to CONTRIBUTORS.txt --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 1e50a623f..6a174bb1c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -88,6 +88,9 @@ Features Bug Fixes --------- +- Work around an issue where ``pserve --reload`` would leave terminal echo + disabled if it reloaded during a pdb session. + - ``pyramid.wsgi.wsgiapp`` and ``pyramid.wsgi.wsgiapp2`` now raise ``ValueError`` when accidentally passed ``None``. See https://github.com/Pylons/pyramid/pull/1320 -- cgit v1.2.3 From 03d964a924e0ef183c3cd78a61c043b1f74f5570 Mon Sep 17 00:00:00 2001 From: David Glick Date: Fri, 13 Feb 2015 09:20:33 -0800 Subject: add pull request reference --- CHANGES.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 6a174bb1c..37803b3ed 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -90,6 +90,7 @@ Bug Fixes - Work around an issue where ``pserve --reload`` would leave terminal echo disabled if it reloaded during a pdb session. + See https://github.com/Pylons/pyramid/pull/1577 - ``pyramid.wsgi.wsgiapp`` and ``pyramid.wsgi.wsgiapp2`` now raise ``ValueError`` when accidentally passed ``None``. -- cgit v1.2.3 From 46bc7fd9e221a084ca2f4d0cb8b158d2e239c373 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 16 Feb 2015 22:14:24 -0600 Subject: update changelog for #1581 --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 37803b3ed..8cee9c09d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,12 @@ Next release Features -------- +- Add ``pyramid.request.apply_request_extensions`` function which can be + used in testing to apply any request extensions configured via + ``config.add_request_method``. Previously it was only possible to test + the extensions by going through Pyramid's router. + See https://github.com/Pylons/pyramid/pull/1581 + - pcreate when run without a scaffold argument will now print information on the missing flag, as well as a list of available scaffolds. See https://github.com/Pylons/pyramid/pull/1566 and -- cgit v1.2.3 From 5fdf9a5f63b7731963de7f49df6c29077155525f Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Tue, 17 Feb 2015 11:39:10 -0600 Subject: update changelog --- CHANGES.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 8cee9c09d..596e5f506 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -20,7 +20,10 @@ Features - Cache busting for static resources has been added and is available via a new argument to ``pyramid.config.Configurator.add_static_view``: ``cachebust``. - See https://github.com/Pylons/pyramid/pull/1380 + Core APIs are shipped for both cache busting via query strings and + path segments and may be extended to fit into custom asset pipelines. + See https://github.com/Pylons/pyramid/pull/1380 and + https://github.com/Pylons/pyramid/pull/1583 - Add ``pyramid.config.Configurator.root_package`` attribute and init parameter to assist with includeable packages that wish to resolve -- cgit v1.2.3 From 568a025d3156ee1e7bdf92e14c9eba7390c1dd26 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Tue, 17 Feb 2015 18:58:53 -0600 Subject: expose public config phases in pyramid.config --- CHANGES.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 1c82e5f27..f2bedbcc9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,7 +7,9 @@ Features - The ``pyramid.config.Configurator`` has grown the ability to allow actions to call other actions during a commit-cycle. This enables much more logic to be placed into actions, such as the ability to invoke other actions - or group them for improved conflict detection. + or group them for improved conflict detection. We have also exposed and + documented the config phases that Pyramid uses in order to further assist + in building conforming addons. See https://github.com/Pylons/pyramid/pull/1513 - Add ``pyramid.request.apply_request_extensions`` function which can be -- cgit v1.2.3 From 750b783e9726684b2860bac4c1ab9d385f4cfb78 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Tue, 17 Feb 2015 20:50:33 -0600 Subject: fix typo on changes.rst --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index f2bedbcc9..ca2020cdb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -148,7 +148,7 @@ Bug Fixes - Allow the ``pyramid.renderers.JSONP`` renderer to work even if there is no valid request object. In this case it will not wrap the object in a - callback and thus behave just like the ``pyramid.renderers.JSON` renderer. + callback and thus behave just like the ``pyramid.renderers.JSON`` renderer. See https://github.com/Pylons/pyramid/pull/1561 - Prevent "parameters to load are deprecated" ``DeprecationWarning`` -- cgit v1.2.3 From 1bcc347b21e6ce317b1fb31610b570b7b9930419 Mon Sep 17 00:00:00 2001 From: David Glick Date: Tue, 24 Feb 2015 15:35:05 -0800 Subject: update changelog --- CHANGES.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 3084bcfe6..9b10c0831 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -121,7 +121,8 @@ Bug Fixes - Work around an issue where ``pserve --reload`` would leave terminal echo disabled if it reloaded during a pdb session. - See https://github.com/Pylons/pyramid/pull/1577 + See https://github.com/Pylons/pyramid/pull/1577, + https://github.com/Pylons/pyramid/pull/1592 - ``pyramid.wsgi.wsgiapp`` and ``pyramid.wsgi.wsgiapp2`` now raise ``ValueError`` when accidentally passed ``None``. -- cgit v1.2.3 From 12b6f58956a50a0ad8e6d9971a0248d8f7997122 Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Sun, 15 Mar 2015 15:18:51 -0400 Subject: Allow passing a custom redirect class for appending slashes --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 19d77eb68..a9fe1be3c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -119,6 +119,10 @@ Features explicitly different from ``request.response``. This does not change the API of a renderer. See https://github.com/Pylons/pyramid/pull/1563 +- ``Configurator().add_notfound_view()`` will now accept anything that + implements the ``IResponse`` interface and will use that as the response + class instead of the default ``HTTPFound``. + Bug Fixes --------- -- cgit v1.2.3 From a7d77fdecaa120f4e095d271b687e3bb628e8696 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 15 Mar 2015 16:41:29 -0400 Subject: be more specific about the append_slash feature addition --- CHANGES.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index a9fe1be3c..639b9b802 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -119,9 +119,10 @@ Features explicitly different from ``request.response``. This does not change the API of a renderer. See https://github.com/Pylons/pyramid/pull/1563 -- ``Configurator().add_notfound_view()`` will now accept anything that - implements the ``IResponse`` interface and will use that as the response - class instead of the default ``HTTPFound``. +- The ``append_slash`` argument of ```Configurator().add_notfound_view()`` will + now accept anything that implements the ``IResponse`` interface and will use + that as the response class instead of the default ``HTTPFound``. See + https://github.com/Pylons/pyramid/pull/1610 Bug Fixes --------- -- cgit v1.2.3 From 200c9eb4cd69f7bdccb19cfa41d2c0ede79665e2 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 12 Apr 2015 16:04:39 -0400 Subject: add change note related to #1529 --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 639b9b802..850098de1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,10 @@ Next release Features -------- +- Make it possible to subclass ``pyramid.request.Request`` and also use + ``pyramid.request.Request.add_request.method``. See + https://github.com/Pylons/pyramid/issues/1529 + - The ``pyramid.config.Configurator`` has grown the ability to allow actions to call other actions during a commit-cycle. This enables much more logic to be placed into actions, such as the ability to invoke other actions -- cgit v1.2.3 From 109b2a0b29e0d63a521a91021c736851248ac7d3 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 13 Apr 2015 10:43:21 -0400 Subject: make it possible to run scaffold functests using tox --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 850098de1..471683d25 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -230,6 +230,9 @@ Scaffolds - Removed non-ascii copyright symbol from templates, as this was causing the scaffolds to fail for project generation. +- You can now run the scaffolding func tests via ``tox py2-scaffolds`` and + ``tox py3-scaffolds``. + 1.5 (2014-04-08) ================ -- cgit v1.2.3 From 4b818c622611235921f2bb530e9cce1e10baca05 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 14 Apr 2015 12:07:59 -0400 Subject: move 1.5 stuff to HISTORY.txt and label 1.6 in changes --- CHANGES.txt | 684 +----------------------------------------------------------- 1 file changed, 2 insertions(+), 682 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 471683d25..a9e159275 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,5 @@ -Next release -============ +1.6 (2015-04-14) +================ Features -------- @@ -233,683 +233,3 @@ Scaffolds - You can now run the scaffolding func tests via ``tox py2-scaffolds`` and ``tox py3-scaffolds``. -1.5 (2014-04-08) -================ - -- Avoid crash in ``pserve --reload`` under Py3k, when iterating over possibly - mutated ``sys.modules``. - -- ``UnencryptedCookieSessionFactoryConfig`` failed if the secret contained - higher order characters. See https://github.com/Pylons/pyramid/issues/1246 - -- Fixed a bug in ``UnencryptedCookieSessionFactoryConfig`` and - ``SignedCookieSessionFactory`` where ``timeout=None`` would cause a new - session to always be created. Also in ``SignedCookieSessionFactory`` a - ``reissue_time=None`` would cause an exception when modifying the session. - See https://github.com/Pylons/pyramid/issues/1247 - -- Updated docs and scaffolds to keep in step with new 2.0 release of - ``Lingua``. This included removing all ``setup.cfg`` files from scaffolds - and documentation environments. - -1.5b1 (2014-02-08) -================== - -Features --------- - -- We no longer eagerly clear ``request.exception`` and ``request.exc_info`` in - the exception view tween. This makes it possible to inspect exception - information within a finished callback. See - https://github.com/Pylons/pyramid/issues/1223. - -1.5a4 (2014-01-28) -================== - -Features --------- - -- Updated scaffolds with new theme, fixed documentation and sample project. - -Bug Fixes ---------- - -- Depend on a newer version of WebOb so that we pull in some crucial bug-fixes - that were showstoppers for functionality in Pyramid. - -- Add a trailing semicolon to the JSONP response. This fixes JavaScript syntax - errors for old IE versions. See https://github.com/Pylons/pyramid/pull/1205 - -- Fix a memory leak when the configurator's ``set_request_property`` method was - used or when the configurator's ``add_request_method`` method was used with - the ``property=True`` attribute. See - https://github.com/Pylons/pyramid/issues/1212 . - -1.5a3 (2013-12-10) -================== - -Features --------- - -- An authorization API has been added as a method of the - request: ``request.has_permission``. - - ``request.has_permission`` is a method-based alternative to the - ``pyramid.security.has_permission`` API and works exactly the same. The - older API is now deprecated. - -- Property API attributes have been added to the request for easier access to - authentication data: ``request.authenticated_userid``, - ``request.unauthenticated_userid``, and ``request.effective_principals``. - - These are analogues, respectively, of - ``pyramid.security.authenticated_userid``, - ``pyramid.security.unauthenticated_userid``, and - ``pyramid.security.effective_principals``. They operate exactly the same, - except they are attributes of the request instead of functions accepting a - request. They are properties, so they cannot be assigned to. The older - function-based APIs are now deprecated. - -- Pyramid's console scripts (``pserve``, ``pviews``, etc) can now be run - directly, allowing custom arguments to be sent to the python interpreter - at runtime. For example:: - - python -3 -m pyramid.scripts.pserve development.ini - -- Added a specific subclass of ``HTTPBadRequest`` named - ``pyramid.exceptions.BadCSRFToken`` which will now be raised in response - to failures in ``check_csrf_token``. - See https://github.com/Pylons/pyramid/pull/1149 - -- Added a new ``SignedCookieSessionFactory`` which is very similar to the - ``UnencryptedCookieSessionFactoryConfig`` but with a clearer focus on signing - content. The custom serializer arguments to this function should only focus - on serializing, unlike its predecessor which required the serializer to also - perform signing. See https://github.com/Pylons/pyramid/pull/1142 . Note - that cookies generated using ``SignedCookieSessionFactory`` are not - compatible with cookies generated using ``UnencryptedCookieSessionFactory``, - so existing user session data will be destroyed if you switch to it. - -- Added a new ``BaseCookieSessionFactory`` which acts as a generic cookie - factory that can be used by framework implementors to create their own - session implementations. It provides a reusable API which focuses strictly - on providing a dictionary-like object that properly handles renewals, - timeouts, and conformance with the ``ISession`` API. - See https://github.com/Pylons/pyramid/pull/1142 - -- The anchor argument to ``pyramid.request.Request.route_url`` and - ``pyramid.request.Request.resource_url`` and their derivatives will now be - escaped via URL quoting to ensure minimal conformance. See - https://github.com/Pylons/pyramid/pull/1183 - -- Allow sending of ``_query`` and ``_anchor`` options to - ``pyramid.request.Request.static_url`` when an external URL is being - generated. - See https://github.com/Pylons/pyramid/pull/1183 - -- You can now send a string as the ``_query`` argument to - ``pyramid.request.Request.route_url`` and - ``pyramid.request.Request.resource_url`` and their derivatives. When a - string is sent instead of a list or dictionary. it is URL-quoted however it - does not need to be in ``k=v`` form. This is useful if you want to be able - to use a different query string format than ``x-www-form-urlencoded``. See - https://github.com/Pylons/pyramid/pull/1183 - -- ``pyramid.testing.DummyRequest`` now has a ``domain`` attribute to match the - new WebOb 1.3 API. Its value is ``example.com``. - -Bug Fixes ---------- - -- Fix the ``pcreate`` script so that when the target directory name ends with a - slash it does not produce a non-working project directory structure. - Previously saying ``pcreate -s starter /foo/bar/`` produced different output - than saying ``pcreate -s starter /foo/bar``. The former did not work - properly. - -- Fix the ``principals_allowed_by_permission`` method of - ``ACLAuthorizationPolicy`` so it anticipates a callable ``__acl__`` - on resources. Previously it did not try to call the ``__acl__`` - if it was callable. - -- The ``pviews`` script did not work when a url required custom request - methods in order to perform traversal. Custom methods and descriptors added - via ``pyramid.config.Configurator.add_request_method`` will now be present, - allowing traversal to continue. - See https://github.com/Pylons/pyramid/issues/1104 - -- Remove unused ``renderer`` argument from ``Configurator.add_route``. - -- Allow the ``BasicAuthenticationPolicy`` to work with non-ascii usernames - and passwords. The charset is not passed as part of the header and different - browsers alternate between UTF-8 and Latin-1, so the policy now attempts - to decode with UTF-8 first, and will fallback to Latin-1. - See https://github.com/Pylons/pyramid/pull/1170 - -- The ``@view_defaults`` now apply to notfound and forbidden views - that are defined as methods of a decorated class. - See https://github.com/Pylons/pyramid/issues/1173 - -Documentation -------------- - -- Added a "Quick Tutorial" to go with the Quick Tour - -- Removed mention of ``pyramid_beaker`` from docs. Beaker is no longer - maintained. Point people at ``pyramid_redis_sessions`` instead. - -- Add documentation for ``pyramid.interfaces.IRendererFactory`` and - ``pyramid.interfaces.IRenderer``. - -Backwards Incompatibilities ---------------------------- - -- The key/values in the ``_query`` parameter of ``request.route_url`` and the - ``query`` parameter of ``request.resource_url`` (and their variants), used - to encode a value of ``None`` as the string ``'None'``, leaving the resulting - query string to be ``a=b&key=None``. The value is now dropped in this - situation, leaving a query string of ``a=b&key=``. - See https://github.com/Pylons/pyramid/issues/1119 - -Deprecations ------------- - -- Deprecate the ``pyramid.interfaces.ITemplateRenderer`` interface. It was - ill-defined and became unused when Mako and Chameleon template bindings were - split into their own packages. - -- The ``pyramid.session.UnencryptedCookieSessionFactoryConfig`` API has been - deprecated and is superseded by the - ``pyramid.session.SignedCookieSessionFactory``. Note that while the cookies - generated by the ``UnencryptedCookieSessionFactoryConfig`` - are compatible with cookies generated by old releases, cookies generated by - the SignedCookieSessionFactory are not. See - https://github.com/Pylons/pyramid/pull/1142 - -- The ``pyramid.security.has_permission`` API is now deprecated. Instead, use - the newly-added ``has_permission`` method of the request object. - -- The ``pyramid.security.effective_principals`` API is now deprecated. - Instead, use the newly-added ``effective_principals`` attribute of the - request object. - -- The ``pyramid.security.authenticated_userid`` API is now deprecated. - Instead, use the newly-added ``authenticated_userid`` attribute of the - request object. - -- The ``pyramid.security.unauthenticated_userid`` API is now deprecated. - Instead, use the newly-added ``unauthenticated_userid`` attribute of the - request object. - -Dependencies ------------- - -- Pyramid now depends on WebOb>=1.3 (it uses ``webob.cookies.CookieProfile`` - from 1.3+). - -1.5a2 (2013-09-22) -================== - -Features --------- - -- Users can now provide dotted Python names to as the ``factory`` argument - the Configurator methods named ``add_{view,route,subscriber}_predicate`` - (instead of passing the predicate factory directly, you can pass a - dotted name which refers to the factory). - -Bug Fixes ---------- - -- Fix an exception in ``pyramid.path.package_name`` when resolving the package - name for namespace packages that had no ``__file__`` attribute. - -Backwards Incompatibilities ---------------------------- - -- Pyramid no longer depends on or configures the Mako and Chameleon templating - system renderers by default. Disincluding these templating systems by - default means that the Pyramid core has fewer dependencies and can run on - future platforms without immediate concern for the compatibility of its - templating add-ons. It also makes maintenance slightly more effective, as - different people can maintain the templating system add-ons that they - understand and care about without needing commit access to the Pyramid core, - and it allows users who just don't want to see any packages they don't use - come along for the ride when they install Pyramid. - - This means that upon upgrading to Pyramid 1.5a2+, projects that use either - of these templating systems will see a traceback that ends something like - this when their application attempts to render a Chameleon or Mako template:: - - ValueError: No such renderer factory .pt - - Or:: - - ValueError: No such renderer factory .mako - - Or:: - - ValueError: No such renderer factory .mak - - Support for Mako templating has been moved into an add-on package named - ``pyramid_mako``, and support for Chameleon templating has been moved into - an add-on package named ``pyramid_chameleon``. These packages are drop-in - replacements for the old built-in support for these templating langauges. - All you have to do is install them and make them active in your configuration - to register renderer factories for ``.pt`` and/or ``.mako`` (or ``.mak``) to - make your application work again. - - To re-add support for Chameleon and/or Mako template renderers into your - existing projects, follow the below steps. - - If you depend on Mako templates: - - * Make sure the ``pyramid_mako`` package is installed. One way to do this - is by adding ``pyramid_mako`` to the ``install_requires`` section of your - package's ``setup.py`` file and afterwards rerunning ``setup.py develop``:: - - setup( - #... - install_requires=[ - 'pyramid_mako', # new dependency - 'pyramid', - #... - ], - ) - - * Within the portion of your application which instantiates a Pyramid - ``pyramid.config.Configurator`` (often the ``main()`` function in - your project's ``__init__.py`` file), tell Pyramid to include the - ``pyramid_mako`` includeme:: - - config = Configurator(.....) - config.include('pyramid_mako') - - If you depend on Chameleon templates: - - * Make sure the ``pyramid_chameleon`` package is installed. One way to do - this is by adding ``pyramid_chameleon`` to the ``install_requires`` section - of your package's ``setup.py`` file and afterwards rerunning - ``setup.py develop``:: - - setup( - #... - install_requires=[ - 'pyramid_chameleon', # new dependency - 'pyramid', - #... - ], - ) - - * Within the portion of your application which instantiates a Pyramid - ``~pyramid.config.Configurator`` (often the ``main()`` function in - your project's ``__init__.py`` file), tell Pyramid to include the - ``pyramid_chameleon`` includeme:: - - config = Configurator(.....) - config.include('pyramid_chameleon') - - Note that it's also fine to install these packages into *older* Pyramids for - forward compatibility purposes. Even if you don't upgrade to Pyramid 1.5 - immediately, performing the above steps in a Pyramid 1.4 installation is - perfectly fine, won't cause any difference, and will give you forward - compatibility when you eventually do upgrade to Pyramid 1.5. - - With the removal of Mako and Chameleon support from the core, some - unit tests that use the ``pyramid.renderers.render*`` methods may begin to - fail. If any of your unit tests are invoking either - ``pyramid.renderers.render()`` or ``pyramid.renderers.render_to_response()`` - with either Mako or Chameleon templates then the - ``pyramid.config.Configurator`` instance in effect during - the unit test should be also be updated to include the addons, as shown - above. For example:: - - class ATest(unittest.TestCase): - def setUp(self): - self.config = pyramid.testing.setUp() - self.config.include('pyramid_mako') - - def test_it(self): - result = pyramid.renderers.render('mypkg:templates/home.mako', {}) - - Or:: - - class ATest(unittest.TestCase): - def setUp(self): - self.config = pyramid.testing.setUp() - self.config.include('pyramid_chameleon') - - def test_it(self): - result = pyramid.renderers.render('mypkg:templates/home.pt', {}) - -- If you're using the Pyramid debug toolbar, when you upgrade Pyramid to - 1.5a2+, you'll also need to upgrade the ``pyramid_debugtoolbar`` package to - at least version 1.0.8, as older toolbar versions are not compatible with - Pyramid 1.5a2+ due to the removal of Mako support from the core. It's - fine to use this newer version of the toolbar code with older Pyramids too. - -- Removed the ``request.response_*`` varying attributes. These attributes - have been deprecated since Pyramid 1.1, and as per the deprecation policy, - have now been removed. - -- ``request.response`` will no longer be mutated when using the - ``pyramid.renderers.render()`` API. Almost all renderers mutate the - ``request.response`` response object (for example, the JSON renderer sets - ``request.response.content_type`` to ``application/json``), but this is - only necessary when the renderer is generating a response; it was a bug - when it was done as a side effect of calling ``pyramid.renderers.render()``. - -- Removed the ``bfg2pyramid`` fixer script. - -- The ``pyramid.events.NewResponse`` event is now sent **after** response - callbacks are executed. It previously executed before response callbacks - were executed. Rationale: it's more useful to be able to inspect the response - after response callbacks have done their jobs instead of before. - -- Removed the class named ``pyramid.view.static`` that had been deprecated - since Pyramid 1.1. Instead use ``pyramid.static.static_view`` with - ``use_subpath=True`` argument. - -- Removed the ``pyramid.view.is_response`` function that had been deprecated - since Pyramid 1.1. Use the ``pyramid.request.Request.is_response`` method - instead. - -- Removed the ability to pass the following arguments to - ``pyramid.config.Configurator.add_route``: ``view``, ``view_context``. - ``view_for``, ``view_permission``, ``view_renderer``, and ``view_attr``. - Using these arguments had been deprecated since Pyramid 1.1. Instead of - passing view-related arguments to ``add_route``, use a separate call to - ``pyramid.config.Configurator.add_view`` to associate a view with a route - using its ``route_name`` argument. Note that this impacts the - ``pyramid.config.Configurator.add_static_view`` function too, because it - delegates to ``add_route``. - -- Removed the ability to influence and query a ``pyramid.request.Request`` - object as if it were a dictionary. Previously it was possible to use methods - like ``__getitem__``, ``get``, ``items``, and other dictlike methods to - access values in the WSGI environment. This behavior had been deprecated - since Pyramid 1.1. Use methods of ``request.environ`` (a real dictionary) - instead. - -- Removed ancient backwards compatibily hack in - ``pyramid.traversal.DefaultRootFactory`` which populated the ``__dict__`` of - the factory with the matchdict values for compatibility with BFG 0.9. - -- The ``renderer_globals_factory`` argument to the - ``pyramid.config.Configurator` constructor and its ``setup_registry`` method - has been removed. The ``set_renderer_globals_factory`` method of - ``pyramid.config.Configurator`` has also been removed. The (internal) - ``pyramid.interfaces.IRendererGlobals`` interface was also removed. These - arguments, methods and interfaces had been deprecated since 1.1. Use a - ``BeforeRender`` event subscriber as documented in the "Hooks" chapter of the - Pyramid narrative documentation instead of providing renderer globals values - to the configurator. - -Deprecations ------------- - -- The ``pyramid.config.Configurator.set_request_property`` method now issues - a deprecation warning when used. It had been docs-deprecated in 1.4 - but did not issue a deprecation warning when used. - -1.5a1 (2013-08-30) -================== - -Features --------- - -- A new http exception subclass named ``pyramid.httpexceptions.HTTPSuccessful`` - was added. You can use this class as the ``context`` of an exception - view to catch all 200-series "exceptions" (e.g. "raise HTTPOk"). This - also allows you to catch *only* the ``HTTPOk`` exception itself; previously - this was impossible because a number of other exceptions - (such as ``HTTPNoContent``) inherited from ``HTTPOk``, but now they do not. - -- You can now generate "hybrid" urldispatch/traversal URLs more easily - by using the new ``route_name``, ``route_kw`` and ``route_remainder_name`` - arguments to ``request.resource_url`` and ``request.resource_path``. See - the new section of the "Combining Traversal and URL Dispatch" documentation - chapter entitled "Hybrid URL Generation". - -- It is now possible to escape double braces in Pyramid scaffolds (unescaped, - these represent replacement values). You can use ``\{\{a\}\}`` to - represent a "bare" ``{{a}}``. See - https://github.com/Pylons/pyramid/pull/862 - -- Add ``localizer`` and ``locale_name`` properties (reified) to the request. - See https://github.com/Pylons/pyramid/issues/508. Note that the - ``pyramid.i18n.get_localizer`` and ``pyramid.i18n.get_locale_name`` functions - now simply look up these properties on the request. - -- Add ``pdistreport`` script, which prints the Python version in use, the - Pyramid version in use, and the version number and location of all Python - distributions currently installed. - -- Add the ability to invert the result of any view, route, or subscriber - predicate using the ``not_`` class. For example:: - - from pyramid.config import not_ - - @view_config(route_name='myroute', request_method=not_('POST')) - def myview(request): ... - - The above example will ensure that the view is called if the request method - is not POST (at least if no other view is more specific). - - The ``pyramid.config.not_`` class can be used against any value that is - a predicate value passed in any of these contexts: - - - ``pyramid.config.Configurator.add_view`` - - - ``pyramid.config.Configurator.add_route`` - - - ``pyramid.config.Configurator.add_subscriber`` - - - ``pyramid.view.view_config`` - - - ``pyramid.events.subscriber`` - -- ``scripts/prequest.py``: add support for submitting ``PUT`` and ``PATCH`` - requests. See https://github.com/Pylons/pyramid/pull/1033. add support for - submitting ``OPTIONS`` and ``PROPFIND`` requests, and allow users to specify - basic authentication credentials in the request via a ``--login`` argument to - the script. See https://github.com/Pylons/pyramid/pull/1039. - -- ``ACLAuthorizationPolicy`` supports ``__acl__`` as a callable. This - removes the ambiguity between the potential ``AttributeError`` that would - be raised on the ``context`` when the property was not defined and the - ``AttributeError`` that could be raised from any user-defined code within - a dynamic property. It is recommended to define a dynamic ACL as a callable - to avoid this ambiguity. See https://github.com/Pylons/pyramid/issues/735. - -- Allow a protocol-relative URL (e.g. ``//example.com/images``) to be passed to - ``pyramid.config.Configurator.add_static_view``. This allows - externally-hosted static URLs to be generated based on the current protocol. - -- The ``AuthTktAuthenticationPolicy`` has two new options to configure its - domain usage: - - * ``parent_domain``: if set the authentication cookie is set on - the parent domain. This is useful if you have multiple sites sharing the - same domain. - * ``domain``: if provided the cookie is always set for this domain, bypassing - all usual logic. - - See https://github.com/Pylons/pyramid/pull/1028, - https://github.com/Pylons/pyramid/pull/1072 and - https://github.com/Pylons/pyramid/pull/1078. - -- The ``AuthTktAuthenticationPolicy`` now supports IPv6 addresses when using - the ``include_ip=True`` option. This is possibly incompatible with - alternative ``auth_tkt`` implementations, as the specification does not - define how to properly handle IPv6. See - https://github.com/Pylons/pyramid/issues/831. - -- Make it possible to use variable arguments via - ``pyramid.paster.get_appsettings``. This also allowed the generated - ``initialize_db`` script from the ``alchemy`` scaffold to grow support - for options in the form ``a=1 b=2`` so you can fill in - values in a parameterized ``.ini`` file, e.g. - ``initialize_myapp_db etc/development.ini a=1 b=2``. - See https://github.com/Pylons/pyramid/pull/911 - -- The ``request.session.check_csrf_token()`` method and the ``check_csrf`` view - predicate now take into account the value of the HTTP header named - ``X-CSRF-Token`` (as well as the ``csrf_token`` form parameter, which they - always did). The header is tried when the form parameter does not exist. - -- View lookup will now search for valid views based on the inheritance - hierarchy of the context. It tries to find views based on the most - specific context first, and upon predicate failure, will move up the - inheritance chain to test views found by the super-type of the context. - In the past, only the most specific type containing views would be checked - and if no matching view could be found then a PredicateMismatch would be - raised. Now predicate mismatches don't hide valid views registered on - super-types. Here's an example that now works:: - - class IResource(Interface): - - ... - - @view_config(context=IResource) - def get(context, request): - - ... - - @view_config(context=IResource, request_method='POST') - def post(context, request): - - ... - - @view_config(context=IResource, request_method='DELETE') - def delete(context, request): - - ... - - @implementer(IResource) - class MyResource: - - ... - - @view_config(context=MyResource, request_method='POST') - def override_post(context, request): - - ... - - Previously the override_post view registration would hide the get - and delete views in the context of MyResource -- leading to a - predicate mismatch error when trying to use GET or DELETE - methods. Now the views are found and no predicate mismatch is - raised. - See https://github.com/Pylons/pyramid/pull/786 and - https://github.com/Pylons/pyramid/pull/1004 and - https://github.com/Pylons/pyramid/pull/1046 - -- The ``pserve`` command now takes a ``-v`` (or ``--verbose``) flag and a - ``-q`` (or ``--quiet``) flag. Output from running ``pserve`` can be - controlled using these flags. ``-v`` can be specified multiple times to - increase verbosity. ``-q`` sets verbosity to ``0`` unconditionally. The - default verbosity level is ``1``. - -- The ``alchemy`` scaffold tests now provide better coverage. See - https://github.com/Pylons/pyramid/pull/1029 - -- The ``pyramid.config.Configurator.add_route`` method now supports being - called with an external URL as pattern. See - https://github.com/Pylons/pyramid/issues/611 and the documentation section - in the "URL Dispatch" chapter entitled "External Routes" for more information. - -Bug Fixes ---------- - -- It was not possible to use ``pyramid.httpexceptions.HTTPException`` as - the ``context`` of an exception view as very general catchall for - http-related exceptions when you wanted that exception view to override the - default exception view. See https://github.com/Pylons/pyramid/issues/985 - -- When the ``pyramid.reload_templates`` setting was true, and a Chameleon - template was reloaded, and the renderer specification named a macro - (e.g. ``foo#macroname.pt``), renderings of the template after the template - was reloaded due to a file change would produce the entire template body - instead of just a rendering of the macro. See - https://github.com/Pylons/pyramid/issues/1013. - -- Fix an obscure problem when combining a virtual root with a route with a - ``*traverse`` in its pattern. Now the traversal path generated in - such a configuration will be correct, instead of an element missing - a leading slash. - -- Fixed a Mako renderer bug returning a tuple with a previous defname value - in some circumstances. See https://github.com/Pylons/pyramid/issues/1037 - for more information. - -- Make the ``pyramid.config.assets.PackageOverrides`` object implement the API - for ``__loader__`` objects specified in PEP 302. Proxies to the - ``__loader__`` set by the importer, if present; otherwise, raises - ``NotImplementedError``. This makes Pyramid static view overrides work - properly under Python 3.3 (previously they would not). See - https://github.com/Pylons/pyramid/pull/1015 for more information. - -- ``mako_templating``: added defensive workaround for non-importability of - ``mako`` due to upstream ``markupsafe`` dropping Python 3.2 support. Mako - templating will no longer work under the combination of MarkupSafe 0.17 and - Python 3.2 (although the combination of MarkupSafe 0.17 and Python 3.3 or any - supported Python 2 version will work OK). - -- Spaces and dots may now be in mako renderer template paths. This was - broken when support for the new makodef syntax was added in 1.4a1. - See https://github.com/Pylons/pyramid/issues/950 - -- ``pyramid.debug_authorization=true`` will now correctly print out - ``Allowed`` for views registered with ``NO_PERMISSION_REQUIRED`` instead - of invoking the ``permits`` method of the authorization policy. - See https://github.com/Pylons/pyramid/issues/954 - -- Pyramid failed to install on some systems due to being packaged with - some test files containing higher order characters in their names. These - files have now been removed. See - https://github.com/Pylons/pyramid/issues/981 - -- ``pyramid.testing.DummyResource`` didn't define ``__bool__``, so code under - Python 3 would use ``__len__`` to find truthiness; this usually caused an - instance of DummyResource to be "falsy" instead of "truthy". See - https://github.com/Pylons/pyramid/pull/1032 - -- The ``alchemy`` scaffold would break when the database was MySQL during - tables creation. See https://github.com/Pylons/pyramid/pull/1049 - -- The ``current_route_url`` method now attaches the query string to the URL by - default. See - https://github.com/Pylons/pyramid/issues/1040 - -- Make ``pserve.cherrypy_server_runner`` Python 3 compatible. See - https://github.com/Pylons/pyramid/issues/718 - -Backwards Incompatibilities ---------------------------- - -- Modified the ``current_route_url`` method in pyramid.Request. The method - previously returned the URL without the query string by default, it now does - attach the query string unless it is overriden. - -- The ``route_url`` and ``route_path`` APIs no longer quote ``/`` - to ``%2F`` when a replacement value contains a ``/``. This was pointless, - as WSGI servers always unquote the slash anyway, and Pyramid never sees the - quoted value. - -- It is no longer possible to set a ``locale_name`` attribute of the request, - nor is it possible to set a ``localizer`` attribute of the request. These - are now "reified" properties that look up a locale name and localizer - respectively using the machinery described in the "Internationalization" - chapter of the documentation. - -- If you send an ``X-Vhm-Root`` header with a value that ends with a slash (or - any number of slashes), the trailing slash(es) will be removed before a URL - is generated when you use use ``request.resource_url`` or - ``request.resource_path``. Previously the virtual root path would not have - trailing slashes stripped, which would influence URL generation. - -- The ``pyramid.interfaces.IResourceURL`` interface has now grown two new - attributes: ``virtual_path_tuple`` and ``physical_path_tuple``. These should - be the tuple form of the resource's path (physical and virtual). - -- cgit v1.2.3 From 37f3ed08e55704012b5c3b7b9e77b684c28d81b2 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Fri, 17 Apr 2015 23:13:14 -0500 Subject: default response_callback and finished_callback to an empty deque instead of None fixes #1600 --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index a9e159275..87e9f1f3a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -191,6 +191,10 @@ Bug Fixes - Avoiding timing attacks against CSRF tokens. See https://github.com/Pylons/pyramid/pull/1574 +- ``request.finished_callbacks`` and ``request.response_callbacks`` now + default to an iterable instead of ``None``. It may be checked for a length + of 0. This was the behavior in 1.5. + Deprecations ------------ -- cgit v1.2.3 From f827882a98881c81794ceebe22c63c98f140145a Mon Sep 17 00:00:00 2001 From: Igor Stroh Date: Thu, 11 Jun 2015 00:49:06 +0200 Subject: added appropriate contributors and changes entries --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 87e9f1f3a..9ed486b26 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,12 @@ Features -------- +- pcreate will now ask for confirmation if invoked with + an argument for a project name that already exists or + is importable in the current environment. + See https://github.com/Pylons/pyramid/issues/1357 and + https://github.com/Pylons/pyramid/pull/1837 + - Make it possible to subclass ``pyramid.request.Request`` and also use ``pyramid.request.Request.add_request.method``. See https://github.com/Pylons/pyramid/issues/1529 -- cgit v1.2.3 From e0a230a8006c11097469510c47a84fd9b107b748 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 31 Aug 2015 10:09:27 -0500 Subject: update changelog --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 9ed486b26..98fa7f85a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -201,6 +201,11 @@ Bug Fixes default to an iterable instead of ``None``. It may be checked for a length of 0. This was the behavior in 1.5. +- ``pyramid.httpexceptions.HTTPException`` now defaults to + ``520 Unknown Error`` instead of ``None None`` to conform with changes in + WebOb 1.5. + See https://github.com/Pylons/pyramid/pull/1865 + Deprecations ------------ -- cgit v1.2.3 From e0a40abac5322f06022799f55f339d6f49b5abd8 Mon Sep 17 00:00:00 2001 From: John Anderson Date: Sun, 6 Sep 2015 15:35:10 -0700 Subject: Added an entry to changelog --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 98fa7f85a..060af5bdb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -134,6 +134,9 @@ Features that as the response class instead of the default ``HTTPFound``. See https://github.com/Pylons/pyramid/pull/1610 +- Additional shells for ``pshell`` can now be registered as entrypoints. See + https://github.com/Pylons/pyramid/pull/1891 + Bug Fixes --------- -- cgit v1.2.3 From 1363db83ae9fb02c50c700691ee0ba75b604960a Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 20 Apr 2015 01:37:38 -0500 Subject: deprecate pserve daemonization --- CHANGES.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 98fa7f85a..7c8a9080a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -209,6 +209,17 @@ Bug Fixes Deprecations ------------ +- The ``pserve`` command's daemonization features have been deprecated. This + includes the ``[start,stop,restart,status]`` subcommands as well as the + ``--daemon``, ``--stop-server``, ``--pid-file``, and ``--status`` flags. + + Please use a real process manager in the future instead of relying on the + ``pserve`` to daemonize itself. Many options exist including your Operating + System's services such as systemd or upstart, as well as the excellent + and simple supervisord. + + See https://github.com/Pylons/pyramid/pull/1641 + - Renamed the ``principal`` argument to ``pyramid.security.remember()`` to ``userid`` in order to clarify its intended purpose. See https://github.com/Pylons/pyramid/pull/1399 -- cgit v1.2.3 From 9a68d072a440e91f5ada180404c6654e3eae93ae Mon Sep 17 00:00:00 2001 From: Mike Naberezny Date: Thu, 1 Oct 2015 14:18:10 -0700 Subject: Mention Circus as a pserve --daemon replacement. Refs #1554, #1641 --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 7c8a9080a..2f8c455d4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -215,8 +215,8 @@ Deprecations Please use a real process manager in the future instead of relying on the ``pserve`` to daemonize itself. Many options exist including your Operating - System's services such as systemd or upstart, as well as the excellent - and simple supervisord. + System's services such as Systemd or Upstart, as well as Python-based + solutions like Circus and Supervisor. See https://github.com/Pylons/pyramid/pull/1641 -- cgit v1.2.3 From e9637c7f521c1f499e12115fa035a55d15ce65e8 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Wed, 14 Oct 2015 22:46:06 -0500 Subject: update changelog for #1929 --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index b71af30cb..4396c4356 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -137,6 +137,10 @@ Features - Additional shells for ``pshell`` can now be registered as entrypoints. See https://github.com/Pylons/pyramid/pull/1891 +- The variables injected into ``pshell`` are now displayed with their + docstrings instead of the default ``str(obj)`` when possible. + See https://github.com/Pylons/pyramid/pull/1929 + Bug Fixes --------- -- cgit v1.2.3 From b7350ee78ad4101ea4112741ab26ce583b620ea7 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Wed, 21 Oct 2015 01:32:48 -0500 Subject: remove ipython and bpython from core --- CHANGES.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 4396c4356..8c1adc789 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,19 @@ 1.6 (2015-04-14) ================ +Backward Incompatibilities +-------------------------- + +- IPython and BPython support have been removed from pshell in the core. + To continue using them on Pyramid 1.6+ you must install the binding + packages explicitly:: + + $ pip install pyramid_ipython + + or + + $ pip install pyramid_bpython + Features -------- -- cgit v1.2.3 From a9e1ba4cf0a89583ebe6511fecb501dbb275cc0d Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Wed, 21 Oct 2015 01:39:02 -0500 Subject: update changelog to document preserving capitalization in pshell --- CHANGES.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 8c1adc789..8b63cf847 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -148,7 +148,8 @@ Features https://github.com/Pylons/pyramid/pull/1610 - Additional shells for ``pshell`` can now be registered as entrypoints. See - https://github.com/Pylons/pyramid/pull/1891 + https://github.com/Pylons/pyramid/pull/1891 and + https://github.com/Pylons/pyramid/pull/2012 - The variables injected into ``pshell`` are now displayed with their docstrings instead of the default ``str(obj)`` when possible. @@ -226,6 +227,11 @@ Bug Fixes WebOb 1.5. See https://github.com/Pylons/pyramid/pull/1865 +- ``pshell`` will now preserve the capitalization of variables in the + ``[pshell]`` section of the INI file. This makes exposing classes to the + shell a little more straightfoward. + See https://github.com/Pylons/pyramid/pull/1883 + Deprecations ------------ -- cgit v1.2.3 From 81cd59826279dab5959a3e198eee75ab09910872 Mon Sep 17 00:00:00 2001 From: RamiC Date: Tue, 3 Nov 2015 10:22:07 +0200 Subject: Include CHANGES entry for converting time related parameters of AuthTktCookieHelper and CookieSession --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 8b63cf847..aefb166dc 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -232,6 +232,11 @@ Bug Fixes shell a little more straightfoward. See https://github.com/Pylons/pyramid/pull/1883 +- Fix an issue when user passes unparsed strings to ``pyramid.session.CookieSession`` + and ``pyramid.authentication.AuthTktCookieHelper`` for time related parameters + ``timeout``, ``reissue_time``, ``max_age`` that expect an integer value. + See https://github.com/Pylons/pyramid/pull/2050 + Deprecations ------------ -- cgit v1.2.3 From cbec33b898efffbfa6acaf91cae45ec0daed4d7a Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Thu, 12 Nov 2015 19:53:28 -0600 Subject: update changelog with #2013 --- CHANGES.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 8b63cf847..18e8ba39c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -57,7 +57,8 @@ Features Core APIs are shipped for both cache busting via query strings and path segments and may be extended to fit into custom asset pipelines. See https://github.com/Pylons/pyramid/pull/1380 and - https://github.com/Pylons/pyramid/pull/1583 + https://github.com/Pylons/pyramid/pull/1583 and + https://github.com/Pylons/pyramid/pull/2013 - Add ``pyramid.config.Configurator.root_package`` attribute and init parameter to assist with includeable packages that wish to resolve -- cgit v1.2.3 From 6f4e97603c2562914567a85bf18187299c3b543b Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Thu, 12 Nov 2015 20:04:28 -0600 Subject: Revert "fix/remove-default-cachebusters" This reverts commit 7410250313f893e5952bb2697324a4d4e3d47d22. This reverts commit cbec33b898efffbfa6acaf91cae45ec0daed4d7a. This reverts commit 345ca3052c395545b90fef9104a16eed5ab051a5, reversing changes made to 47162533af84bb8d26db6d1c9ba1e63d70e9070f. --- CHANGES.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 18e8ba39c..8b63cf847 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -57,8 +57,7 @@ Features Core APIs are shipped for both cache busting via query strings and path segments and may be extended to fit into custom asset pipelines. See https://github.com/Pylons/pyramid/pull/1380 and - https://github.com/Pylons/pyramid/pull/1583 and - https://github.com/Pylons/pyramid/pull/2013 + https://github.com/Pylons/pyramid/pull/1583 - Add ``pyramid.config.Configurator.root_package`` attribute and init parameter to assist with includeable packages that wish to resolve -- cgit v1.2.3 From 389b450da27a91fb413a5eab5ed4a704537ac105 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Thu, 12 Nov 2015 22:58:46 -0600 Subject: add changelog entry for #2118 --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 8b63cf847..77b8e9298 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -232,6 +232,9 @@ Bug Fixes shell a little more straightfoward. See https://github.com/Pylons/pyramid/pull/1883 +- Fixed usage of ``pserve --monitor-restart --daemon`` which would fail in + horrible ways. See https://github.com/Pylons/pyramid/pull/2118 + Deprecations ------------ -- cgit v1.2.3 From 03465e75ba938a11e9f9c85b7829f7dea9713642 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Thu, 12 Nov 2015 23:13:00 -0600 Subject: add changelog for #2119 --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 77b8e9298..a17c7e1e6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -235,6 +235,10 @@ Bug Fixes - Fixed usage of ``pserve --monitor-restart --daemon`` which would fail in horrible ways. See https://github.com/Pylons/pyramid/pull/2118 +- Explicitly prevent ``pserve --reload --daemon`` from being used. It's never + been supported but would work and fail in weird ways. + See https://github.com/Pylons/pyramid/pull/2119 + Deprecations ------------ -- cgit v1.2.3 From baff99d69e80c58a76e0b0e8cf444ee5e573208b Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Thu, 12 Nov 2015 23:22:00 -0600 Subject: update changelog for #2120 --- CHANGES.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 77b8e9298..79d610d4a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -238,9 +238,10 @@ Bug Fixes Deprecations ------------ -- The ``pserve`` command's daemonization features have been deprecated. This - includes the ``[start,stop,restart,status]`` subcommands as well as the - ``--daemon``, ``--stop-server``, ``--pid-file``, and ``--status`` flags. +- The ``pserve`` command's daemonization features have been deprecated as well + as ``--monitor-restart``. This includes the ``[start,stop,restart,status]`` + subcommands as well as the ``--daemon``, ``--stop-daemon``, ``--pid-file``, + and ``--status`` flags. Please use a real process manager in the future instead of relying on the ``pserve`` to daemonize itself. Many options exist including your Operating @@ -248,6 +249,7 @@ Deprecations solutions like Circus and Supervisor. See https://github.com/Pylons/pyramid/pull/1641 + and https://github.com/Pylons/pyramid/pull/2120 - Renamed the ``principal`` argument to ``pyramid.security.remember()`` to ``userid`` in order to clarify its intended purpose. -- cgit v1.2.3 From 9a2761e8739781dde57bbf607926a0c227d9b40f Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Fri, 13 Nov 2015 13:34:38 -0600 Subject: add changelog for #2044 --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 739eb870d..9ff26420b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -155,6 +155,9 @@ Features docstrings instead of the default ``str(obj)`` when possible. See https://github.com/Pylons/pyramid/pull/1929 +- ``pserve --reload`` will no longer crash on syntax errors!!! + See https://github.com/Pylons/pyramid/pull/2044 + Bug Fixes --------- -- cgit v1.2.3 From a8c0d7161f12a24bc439495b5f1af78da3dfcf17 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sun, 15 Nov 2015 20:01:03 -0600 Subject: update changelog --- CHANGES.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 9ff26420b..e9dc975a7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -247,6 +247,10 @@ Bug Fixes been supported but would work and fail in weird ways. See https://github.com/Pylons/pyramid/pull/2119 +- Fix an issue on Windows when running ``pserve --reload`` in which the + process failed to fork because it could not find the pserve script to + run. See https://github.com/Pylons/pyramid/pull/2137 + Deprecations ------------ -- cgit v1.2.3 From bc8fa64a416ce52ec5cc9fd819ce1a3caa427a19 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Thu, 17 Dec 2015 21:18:34 -0600 Subject: update changelog for #2171 --- CHANGES.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index e9dc975a7..3c3dd6e79 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -53,11 +53,12 @@ Features See https://github.com/Pylons/pyramid/pull/1471 - Cache busting for static resources has been added and is available via a new - argument to ``pyramid.config.Configurator.add_static_view``: ``cachebust``. - Core APIs are shipped for both cache busting via query strings and - path segments and may be extended to fit into custom asset pipelines. + ``pyramid.config.Configurator.add_cache_buster`` API. Core APIs are shipped + for both cache busting via query strings and via asset manifests for + integrating into custom asset pipelines. See https://github.com/Pylons/pyramid/pull/1380 and - https://github.com/Pylons/pyramid/pull/1583 + https://github.com/Pylons/pyramid/pull/1583 and + https://github.com/Pylons/pyramid/pull/2171 - Add ``pyramid.config.Configurator.root_package`` attribute and init parameter to assist with includeable packages that wish to resolve -- cgit v1.2.3 From 010218070ef62a31e3880acf2994ea217797332a Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Thu, 17 Dec 2015 22:19:46 -0600 Subject: add changelog for #2187 --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 3c3dd6e79..0f88a95da 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -252,6 +252,11 @@ Bug Fixes process failed to fork because it could not find the pserve script to run. See https://github.com/Pylons/pyramid/pull/2137 +- Ensure that ``IAssetDescriptor.abspath`` always returns an absolute path. + There were cases depending on the process CWD that a relative path would + be returned. See https://github.com/Pylons/pyramid/issues/2187 + + Deprecations ------------ -- cgit v1.2.3 From 7593b05e4b4bd0bc85c5f46964b4e4a55286ad49 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sat, 19 Dec 2015 00:15:28 -0600 Subject: update changelog for #2189 --- CHANGES.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 0f88a95da..32c4995b8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -263,7 +263,10 @@ Deprecations - The ``pserve`` command's daemonization features have been deprecated as well as ``--monitor-restart``. This includes the ``[start,stop,restart,status]`` subcommands as well as the ``--daemon``, ``--stop-daemon``, ``--pid-file``, - and ``--status`` flags. + ``--status``, ``--user`` and ``--group`` flags. + See https://github.com/Pylons/pyramid/pull/2120 + and https://github.com/Pylons/pyramid/pull/2189 + and https://github.com/Pylons/pyramid/pull/1641 Please use a real process manager in the future instead of relying on the ``pserve`` to daemonize itself. Many options exist including your Operating -- cgit v1.2.3 From d9da2b29861d071b9fc044319421799a3d522bcc Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Wed, 23 Dec 2015 02:31:05 -0800 Subject: Add documentation of command line programs/p* scripts --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 32c4995b8..77f5d94ac 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -301,6 +301,9 @@ Docs ``principal`` and a ``userid`` in its security APIs. See https://github.com/Pylons/pyramid/pull/1399 +- Add documentation of command line programs (``p*`` scripts). See + https://github.com/Pylons/pyramid/pull/2191 + Scaffolds --------- -- cgit v1.2.3 From 70074c141afd0bbc96fee264c6a929fb7a519273 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Fri, 22 Jan 2016 17:05:58 -0600 Subject: add changelog for #2256 --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 77f5d94ac..d31e471f5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,9 @@ +unreleased +========== + +- Dropped Python 3.2 support. + See https://github.com/Pylons/pyramid/pull/2256 + 1.6 (2015-04-14) ================ -- cgit v1.2.3 From 802c3f69b29a4c3ba2af68f0265372dce08e5bcc Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Tue, 26 Jan 2016 17:00:55 -0600 Subject: update changelog for #2292 --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index d31e471f5..ffa5f51e0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,12 @@ unreleased - Dropped Python 3.2 support. See https://github.com/Pylons/pyramid/pull/2256 +- Fix ``pserve --browser`` to use the ``--server-name`` instead of the + app name when selecting a section to use. This was only working for people + who had server and app sections with the same name, for example + ``[app:main]`` and ``[server:main]``. + See https://github.com/Pylons/pyramid/pull/2292 + 1.6 (2015-04-14) ================ -- cgit v1.2.3 From cb98a90c3dcc40dc42813143a601ef631249f5f4 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sun, 28 Feb 2016 15:06:30 -0600 Subject: add changelog for #1370 --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index ffa5f51e0..84a62837c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,6 +10,11 @@ unreleased ``[app:main]`` and ``[server:main]``. See https://github.com/Pylons/pyramid/pull/2292 +- Allow a leading ``=`` on the key of the request param predicate. + For example, '=abc=1' is equivalent down to + ``request.params['=abc'] == '1'``. + See https://github.com/Pylons/pyramid/pull/1370 + 1.6 (2015-04-14) ================ -- cgit v1.2.3 From d5c361d8bccb57e3b6969a91209511cc4a45134a Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 29 Feb 2016 13:05:04 -0600 Subject: update changelog for #2024 --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 84a62837c..3a1305c95 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,12 @@ unreleased ========== +- A complete overhaul of the ``alchemy`` scaffold as well as the + Wiki2 SQLAlchemy + URLDispatch tutorial to introduce more modern features + into the usage of SQLAlchemy with Pyramid and provide a better starting + point for new projects. + See https://github.com/Pylons/pyramid/pull/2024 + - Dropped Python 3.2 support. See https://github.com/Pylons/pyramid/pull/2256 -- cgit v1.2.3 From 4d4688b7053ddfcfd91b36bf9504c1db76a92763 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 14 Mar 2016 13:27:14 -0500 Subject: add changelog for #2393 --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 3a1305c95..a17f4aab5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -21,6 +21,12 @@ unreleased ``request.params['=abc'] == '1'``. See https://github.com/Pylons/pyramid/pull/1370 +- A new ``request.invoke_exception_view(...)`` method which can be used to + invoke an exception view and get back a response. This is useful for + rendering an exception view outside of the context of the excview tween + where you may need more control over the request. + See https://github.com/Pylons/pyramid/pull/2393 + 1.6 (2015-04-14) ================ -- cgit v1.2.3 From 1514ea003dfe39fa79a0ec07bbbc14f239cb4eb2 Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Mon, 7 Mar 2016 08:20:39 -0800 Subject: Pass vars to logging.config.fileConfig This allows one to set up a logging configuration that is parameterized based on variables specified on the command-line. e.g.: the application .ini file could have: ```ini [logger_root] level = %(LOGGING_LOGGER_ROOT_LEVEL)s handlers = console [handler_console] class = StreamHandler args = (sys.stderr,) level = %(LOGGING_HANDLER_CONSOLE_LEVEL)s formatter = generic ``` This app could be launched with: ``` pserve development.ini LOGGING_LOGGER_ROOT_LEVEL=DEBUG LOGGING_HANDLER_CONSOLE_LEVEL=DEBUG ``` --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index a17f4aab5..4a61dbffa 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -27,6 +27,12 @@ unreleased where you may need more control over the request. See https://github.com/Pylons/pyramid/pull/2393 +- Allow using variable substitutions like ``%(LOGGING_LOGGER_ROOT_LEVEL)s`` + for logging sections of the .ini file and populate these variables from + the ``pserve`` command line -- e.g.: + ``pserve development.ini LOGGING_LOGGER_ROOT_LEVEL=DEBUG`` + See https://github.com/Pylons/pyramid/pull/2399 + 1.6 (2015-04-14) ================ -- cgit v1.2.3 From fa43952e617ad68c52447da28fc7f5be23ff4b10 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sun, 10 Apr 2016 22:09:29 -0500 Subject: add changelog for #2021 --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 4a61dbffa..2b3db8644 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -33,6 +33,13 @@ unreleased ``pserve development.ini LOGGING_LOGGER_ROOT_LEVEL=DEBUG`` See https://github.com/Pylons/pyramid/pull/2399 +- Add a new "view deriver" concept to Pyramid to allow framework authors to + inject elements into the standard Pyramid view pipeline and affect all + views in an application. This is similar to a decorator except that it + has access to options passed to ``config.add_view`` and can affect other + stages of the pipeline such as the raw response from a view or prior to + security checks. See https://github.com/Pylons/pyramid/pull/2021 + 1.6 (2015-04-14) ================ -- cgit v1.2.3 From 47ebf00dab1f448dc927182b22fbb35d231ca5b3 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Tue, 12 Apr 2016 15:43:56 -0700 Subject: - add changelog entry to CHANGES.txt --- CHANGES.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 2b3db8644..ceb3207df 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,18 @@ unreleased ========== +- A complete overhaul of the docs: + + - Use pip instead of easy_install. + - Become opinionated by preferring Python 3.4 or greater to simplify + installation of Python and its required packaging tools. + - Use venv for the tool, and virtual environment for the thing created, + instead of virtualenv. + - Use py.test and pytest-cov instead of nose and coverage. + - Further updates to the scaffolds as well as tutorials and their src files. + + See https://github.com/Pylons/pyramid/pull/2468 + - A complete overhaul of the ``alchemy`` scaffold as well as the Wiki2 SQLAlchemy + URLDispatch tutorial to introduce more modern features into the usage of SQLAlchemy with Pyramid and provide a better starting -- cgit v1.2.3 From 16bdbb86955cdf1b372f257bd70b1dbc530205d5 Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Sun, 10 Apr 2016 20:53:57 -0600 Subject: Update CHANGES.txt --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index ceb3207df..fd8c636a0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,9 @@ unreleased ========== +- Python 2.6 is no longer supported by Pyramid. See + https://github.com/Pylons/pyramid/issues/2368 + - A complete overhaul of the docs: - Use pip instead of easy_install. -- cgit v1.2.3 From 17905a39040b8a2f4b57341909eef9d0fac218f5 Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Tue, 12 Apr 2016 18:05:30 -0600 Subject: Add CHANGES for BeforeTraversal --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index fd8c636a0..488c38c7b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,11 @@ unreleased ========== +- A new event and interface (BeforeTraversal) has been introduced that will + notify listeners before traversal starts in the router. See + https://github.com/Pylons/pyramid/pull/2469 and + https://github.com/Pylons/pyramid/pull/1876 + - Python 2.6 is no longer supported by Pyramid. See https://github.com/Pylons/pyramid/issues/2368 -- cgit v1.2.3 From ce91e9303b61523789dea2d075c951ad30f8d82a Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Wed, 13 Apr 2016 00:41:13 -0700 Subject: - Deprecated support for Python 3.3. See #2477 --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 488c38c7b..00232abc3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,9 @@ unreleased ========== +- Deprecated support for Python 3.3. + https://github.com/Pylons/pyramid/issues/2477 + - A new event and interface (BeforeTraversal) has been introduced that will notify listeners before traversal starts in the router. See https://github.com/Pylons/pyramid/pull/2469 and -- cgit v1.2.3 From a51ca284503910e4090973a4d8991fee92f3381b Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Wed, 13 Apr 2016 16:01:45 -0700 Subject: update deprecation log entry --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 00232abc3..da59c3e6f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,7 +1,7 @@ unreleased ========== -- Deprecated support for Python 3.3. +- (Deprecation) Support for Python 3.3 will be removed in Pyramid 1.8. https://github.com/Pylons/pyramid/issues/2477 - A new event and interface (BeforeTraversal) has been introduced that will -- cgit v1.2.3 From 4c6592734ffb5eace320d8e92e33c5866f111749 Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Thu, 14 Apr 2016 10:43:10 -0600 Subject: Update CHANGES --- CHANGES.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index fd8c636a0..d5640ee0b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,13 @@ unreleased ========== +- Pyramid HTTPExceptions will now take into account the best match for the + clients Accept header, and depending on what is requested will return + text/html, application/json or text/plain. The default for */* is still + text/html, but if application/json is explicitly mentioned it will now + receive a valid JSON response. See: + https://github.com/Pylons/pyramid/pull/2489 + - Python 2.6 is no longer supported by Pyramid. See https://github.com/Pylons/pyramid/issues/2368 -- cgit v1.2.3 From 1cf1323a25c32099c2c371c5a5fce536a5b3c2b4 Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Thu, 14 Apr 2016 21:12:47 -0600 Subject: Add CHANGES.txt entry, and re-organise --- CHANGES.txt | 81 ++++++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 54 insertions(+), 27 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 96d8d8236..ead9eb4b9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,22 @@ unreleased ========== +Backward Incompatibilities +-------------------------- + +- Following the Pyramid deprecation period (1.4 -> 1.6), + AuthTktAuthenticationPolicy's default hashing algorithm is changing from md5 + to sha512. If you are using the authentication policy and need to continue + using md5, please explicitly set hashalg to 'md5'. + + This change does mean that any existing auth tickets (and associated cookies) + will no longer be valid, and users will no longer be logged in, and have to + login to their accounts again. No other backwards incompatible changes have + been made. + +Features +-------- + - Pyramid HTTPExceptions will now take into account the best match for the clients Accept header, and depending on what is requested will return text/html, application/json or text/plain. The default for */* is still @@ -8,16 +24,38 @@ unreleased receive a valid JSON response. See: https://github.com/Pylons/pyramid/pull/2489 -- (Deprecation) Support for Python 3.3 will be removed in Pyramid 1.8. - https://github.com/Pylons/pyramid/issues/2477 - - A new event and interface (BeforeTraversal) has been introduced that will notify listeners before traversal starts in the router. See https://github.com/Pylons/pyramid/pull/2469 and https://github.com/Pylons/pyramid/pull/1876 -- Python 2.6 is no longer supported by Pyramid. See - https://github.com/Pylons/pyramid/issues/2368 +- Add a new "view deriver" concept to Pyramid to allow framework authors to + inject elements into the standard Pyramid view pipeline and affect all + views in an application. This is similar to a decorator except that it + has access to options passed to ``config.add_view`` and can affect other + stages of the pipeline such as the raw response from a view or prior to + security checks. See https://github.com/Pylons/pyramid/pull/2021 + + +- Allow a leading ``=`` on the key of the request param predicate. + For example, '=abc=1' is equivalent down to + ``request.params['=abc'] == '1'``. + See https://github.com/Pylons/pyramid/pull/1370 + +- A new ``request.invoke_exception_view(...)`` method which can be used to + invoke an exception view and get back a response. This is useful for + rendering an exception view outside of the context of the excview tween + where you may need more control over the request. + See https://github.com/Pylons/pyramid/pull/2393 + +- Allow using variable substitutions like ``%(LOGGING_LOGGER_ROOT_LEVEL)s`` + for logging sections of the .ini file and populate these variables from + the ``pserve`` command line -- e.g.: + ``pserve development.ini LOGGING_LOGGER_ROOT_LEVEL=DEBUG`` + See https://github.com/Pylons/pyramid/pull/2399 + +Documentation Changes +--------------------- - A complete overhaul of the docs: @@ -37,8 +75,8 @@ unreleased point for new projects. See https://github.com/Pylons/pyramid/pull/2024 -- Dropped Python 3.2 support. - See https://github.com/Pylons/pyramid/pull/2256 +Bug Fixes +--------- - Fix ``pserve --browser`` to use the ``--server-name`` instead of the app name when selecting a section to use. This was only working for people @@ -46,29 +84,18 @@ unreleased ``[app:main]`` and ``[server:main]``. See https://github.com/Pylons/pyramid/pull/2292 -- Allow a leading ``=`` on the key of the request param predicate. - For example, '=abc=1' is equivalent down to - ``request.params['=abc'] == '1'``. - See https://github.com/Pylons/pyramid/pull/1370 +Deprecations +------------ -- A new ``request.invoke_exception_view(...)`` method which can be used to - invoke an exception view and get back a response. This is useful for - rendering an exception view outside of the context of the excview tween - where you may need more control over the request. - See https://github.com/Pylons/pyramid/pull/2393 +- (Deprecation) Support for Python 3.3 will be removed in Pyramid 1.8. + https://github.com/Pylons/pyramid/issues/2477 -- Allow using variable substitutions like ``%(LOGGING_LOGGER_ROOT_LEVEL)s`` - for logging sections of the .ini file and populate these variables from - the ``pserve`` command line -- e.g.: - ``pserve development.ini LOGGING_LOGGER_ROOT_LEVEL=DEBUG`` - See https://github.com/Pylons/pyramid/pull/2399 +- Python 2.6 is no longer supported by Pyramid. See + https://github.com/Pylons/pyramid/issues/2368 + +- Dropped Python 3.2 support. + See https://github.com/Pylons/pyramid/pull/2256 -- Add a new "view deriver" concept to Pyramid to allow framework authors to - inject elements into the standard Pyramid view pipeline and affect all - views in an application. This is similar to a decorator except that it - has access to options passed to ``config.add_view`` and can affect other - stages of the pipeline such as the raw response from a view or prior to - security checks. See https://github.com/Pylons/pyramid/pull/2021 1.6 (2015-04-14) ================ -- cgit v1.2.3 From 2945f739480a31b3e260b3efdbf17cda2e97142a Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Fri, 15 Apr 2016 00:33:20 -0500 Subject: curate the changelog --- CHANGES.txt | 350 +++++------------------------------------------------------- 1 file changed, 24 insertions(+), 326 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index ead9eb4b9..bc4b1aa79 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,12 +11,28 @@ Backward Incompatibilities This change does mean that any existing auth tickets (and associated cookies) will no longer be valid, and users will no longer be logged in, and have to - login to their accounts again. No other backwards incompatible changes have - been made. + login to their accounts again. + + See https://github.com/Pylons/pyramid/pull/2496 Features -------- +- Added a new setting, ``pyramid.require_default_csrf`` which may be used + to turn on CSRF checks globally for every POST request in the application. + This should be considered a good default for websites built on Pyramid. + It is possible to opt-out of CSRF checks on a per-view basis by setting + ``require_csrf=False`` on those views. + See https://github.com/Pylons/pyramid/pull/2413 + +- Added a ``require_csrf`` view option which will enforce CSRF checks on POST + requests. If the CSRF check fails a ``BadCSRFToken`` exception will be + raised and may be caught by exception views (the default response is a + ``400 Bad Request``). This option should be used in place of the deprecated + ``check_csrf`` view predicate which would normally result in unexpected + ``404 Not Found`` response to the client instead of a catchable exception. + See https://github.com/Pylons/pyramid/pull/2413 + - Pyramid HTTPExceptions will now take into account the best match for the clients Accept header, and depending on what is requested will return text/html, application/json or text/plain. The default for */* is still @@ -36,7 +52,6 @@ Features stages of the pipeline such as the raw response from a view or prior to security checks. See https://github.com/Pylons/pyramid/pull/2021 - - Allow a leading ``=`` on the key of the request param predicate. For example, '=abc=1' is equivalent down to ``request.params['=abc'] == '1'``. @@ -87,7 +102,12 @@ Bug Fixes Deprecations ------------ -- (Deprecation) Support for Python 3.3 will be removed in Pyramid 1.8. +- The ``check_csrf`` view predicate has been deprecated. Use the + new ``require_csrf`` option or the ``pyramid.require_default_csrf`` setting + to ensure that the ``BadCSRFToken`` exception is raised. + See https://github.com/Pylons/pyramid/pull/2413 + +- Support for Python 3.3 will be removed in Pyramid 1.8. https://github.com/Pylons/pyramid/issues/2477 - Python 2.6 is no longer supported by Pyramid. See @@ -95,325 +115,3 @@ Deprecations - Dropped Python 3.2 support. See https://github.com/Pylons/pyramid/pull/2256 - - -1.6 (2015-04-14) -================ - -Backward Incompatibilities --------------------------- - -- IPython and BPython support have been removed from pshell in the core. - To continue using them on Pyramid 1.6+ you must install the binding - packages explicitly:: - - $ pip install pyramid_ipython - - or - - $ pip install pyramid_bpython - -Features --------- - -- pcreate will now ask for confirmation if invoked with - an argument for a project name that already exists or - is importable in the current environment. - See https://github.com/Pylons/pyramid/issues/1357 and - https://github.com/Pylons/pyramid/pull/1837 - -- Make it possible to subclass ``pyramid.request.Request`` and also use - ``pyramid.request.Request.add_request.method``. See - https://github.com/Pylons/pyramid/issues/1529 - -- The ``pyramid.config.Configurator`` has grown the ability to allow - actions to call other actions during a commit-cycle. This enables much more - logic to be placed into actions, such as the ability to invoke other actions - or group them for improved conflict detection. We have also exposed and - documented the config phases that Pyramid uses in order to further assist - in building conforming addons. - See https://github.com/Pylons/pyramid/pull/1513 - -- Add ``pyramid.request.apply_request_extensions`` function which can be - used in testing to apply any request extensions configured via - ``config.add_request_method``. Previously it was only possible to test - the extensions by going through Pyramid's router. - See https://github.com/Pylons/pyramid/pull/1581 - -- pcreate when run without a scaffold argument will now print information on - the missing flag, as well as a list of available scaffolds. - See https://github.com/Pylons/pyramid/pull/1566 and - https://github.com/Pylons/pyramid/issues/1297 - -- Added support / testing for 'pypy3' under Tox and Travis. - See https://github.com/Pylons/pyramid/pull/1469 - -- Automate code coverage metrics across py2 and py3 instead of just py2. - See https://github.com/Pylons/pyramid/pull/1471 - -- Cache busting for static resources has been added and is available via a new - ``pyramid.config.Configurator.add_cache_buster`` API. Core APIs are shipped - for both cache busting via query strings and via asset manifests for - integrating into custom asset pipelines. - See https://github.com/Pylons/pyramid/pull/1380 and - https://github.com/Pylons/pyramid/pull/1583 and - https://github.com/Pylons/pyramid/pull/2171 - -- Add ``pyramid.config.Configurator.root_package`` attribute and init - parameter to assist with includeable packages that wish to resolve - resources relative to the package in which the ``Configurator`` was created. - This is especially useful for addons that need to load asset specs from - settings, in which case it is may be natural for a developer to define - imports or assets relative to the top-level package. - See https://github.com/Pylons/pyramid/pull/1337 - -- Added line numbers to the log formatters in the scaffolds to assist with - debugging. See https://github.com/Pylons/pyramid/pull/1326 - -- Add new HTTP exception objects for status codes - ``428 Precondition Required``, ``429 Too Many Requests`` and - ``431 Request Header Fields Too Large`` in ``pyramid.httpexceptions``. - See https://github.com/Pylons/pyramid/pull/1372/files - -- The ``pshell`` script will now load a ``PYTHONSTARTUP`` file if one is - defined in the environment prior to launching the interpreter. - See https://github.com/Pylons/pyramid/pull/1448 - -- Make it simple to define notfound and forbidden views that wish to use - the default exception-response view but with altered predicates and other - configuration options. The ``view`` argument is now optional in - ``config.add_notfound_view`` and ``config.add_forbidden_view``.. - See https://github.com/Pylons/pyramid/issues/494 - -- Greatly improve the readability of the ``pcreate`` shell script output. - See https://github.com/Pylons/pyramid/pull/1453 - -- Improve robustness to timing attacks in the ``AuthTktCookieHelper`` and - the ``SignedCookieSessionFactory`` classes by using the stdlib's - ``hmac.compare_digest`` if it is available (such as Python 2.7.7+ and 3.3+). - See https://github.com/Pylons/pyramid/pull/1457 - -- Assets can now be overidden by an absolute path on the filesystem when using - the ``config.override_asset`` API. This makes it possible to fully support - serving up static content from a mutable directory while still being able - to use the ``request.static_url`` API and ``config.add_static_view``. - Previously it was not possible to use ``config.add_static_view`` with an - absolute path **and** generate urls to the content. This change replaces - the call, ``config.add_static_view('/abs/path', 'static')``, with - ``config.add_static_view('myapp:static', 'static')`` and - ``config.override_asset(to_override='myapp:static/', - override_with='/abs/path/')``. The ``myapp:static`` asset spec is completely - made up and does not need to exist - it is used for generating urls - via ``request.static_url('myapp:static/foo.png')``. - See https://github.com/Pylons/pyramid/issues/1252 - -- Added ``pyramid.config.Configurator.set_response_factory`` and the - ``response_factory`` keyword argument to the ``Configurator`` for defining - a factory that will return a custom ``Response`` class. - See https://github.com/Pylons/pyramid/pull/1499 - -- Allow an iterator to be returned from a renderer. Previously it was only - possible to return bytes or unicode. - See https://github.com/Pylons/pyramid/pull/1417 - -- ``pserve`` can now take a ``-b`` or ``--browser`` option to open the server - URL in a web browser. See https://github.com/Pylons/pyramid/pull/1533 - -- Overall improvments for the ``proutes`` command. Added ``--format`` and - ``--glob`` arguments to the command, introduced the ``method`` - column for displaying available request methods, and improved the ``view`` - output by showing the module instead of just ``__repr__``. - See https://github.com/Pylons/pyramid/pull/1488 - -- Support keyword-only arguments and function annotations in views in - Python 3. See https://github.com/Pylons/pyramid/pull/1556 - -- ``request.response`` will no longer be mutated when using the - ``pyramid.renderers.render_to_response()`` API. It is now necessary to - pass in a ``response=`` argument to ``render_to_response`` if you wish to - supply the renderer with a custom response object for it to use. If you - do not pass one then a response object will be created using the - application's ``IResponseFactory``. Almost all renderers - mutate the ``request.response`` response object (for example, the JSON - renderer sets ``request.response.content_type`` to ``application/json``). - However, when invoking ``render_to_response`` it is not expected that the - response object being returned would be the same one used later in the - request. The response object returned from ``render_to_response`` is now - explicitly different from ``request.response``. This does not change the - API of a renderer. See https://github.com/Pylons/pyramid/pull/1563 - -- The ``append_slash`` argument of ```Configurator().add_notfound_view()`` will - now accept anything that implements the ``IResponse`` interface and will use - that as the response class instead of the default ``HTTPFound``. See - https://github.com/Pylons/pyramid/pull/1610 - -- Additional shells for ``pshell`` can now be registered as entrypoints. See - https://github.com/Pylons/pyramid/pull/1891 and - https://github.com/Pylons/pyramid/pull/2012 - -- The variables injected into ``pshell`` are now displayed with their - docstrings instead of the default ``str(obj)`` when possible. - See https://github.com/Pylons/pyramid/pull/1929 - -- ``pserve --reload`` will no longer crash on syntax errors!!! - See https://github.com/Pylons/pyramid/pull/2044 - -Bug Fixes ---------- - -- Work around an issue where ``pserve --reload`` would leave terminal echo - disabled if it reloaded during a pdb session. - See https://github.com/Pylons/pyramid/pull/1577, - https://github.com/Pylons/pyramid/pull/1592 - -- ``pyramid.wsgi.wsgiapp`` and ``pyramid.wsgi.wsgiapp2`` now raise - ``ValueError`` when accidentally passed ``None``. - See https://github.com/Pylons/pyramid/pull/1320 - -- Fix an issue whereby predicates would be resolved as maybe_dotted in the - introspectable but not when passed for registration. This would mean that - ``add_route_predicate`` for example can not take a string and turn it into - the actual callable function. - See https://github.com/Pylons/pyramid/pull/1306 - -- Fix ``pyramid.testing.setUp`` to return a ``Configurator`` with a proper - package. Previously it was not possible to do package-relative includes - using the returned ``Configurator`` during testing. There is now a - ``package`` argument that can override this behavior as well. - See https://github.com/Pylons/pyramid/pull/1322 - -- Fix an issue where a ``pyramid.response.FileResponse`` may apply a charset - where it does not belong. See https://github.com/Pylons/pyramid/pull/1251 - -- Work around a bug introduced in Python 2.7.7 on Windows where - ``mimetypes.guess_type`` returns Unicode rather than str for the content - type, unlike any previous version of Python. See - https://github.com/Pylons/pyramid/issues/1360 for more information. - -- ``pcreate`` now normalizes the package name by converting hyphens to - underscores. See https://github.com/Pylons/pyramid/pull/1376 - -- Fix an issue with the final response/finished callback being unable to - add another callback to the list. See - https://github.com/Pylons/pyramid/pull/1373 - -- Fix a failing unittest caused by differing mimetypes across various OSs. - See https://github.com/Pylons/pyramid/issues/1405 - -- Fix route generation for static view asset specifications having no path. - See https://github.com/Pylons/pyramid/pull/1377 - -- Allow the ``pyramid.renderers.JSONP`` renderer to work even if there is no - valid request object. In this case it will not wrap the object in a - callback and thus behave just like the ``pyramid.renderers.JSON`` renderer. - See https://github.com/Pylons/pyramid/pull/1561 - -- Prevent "parameters to load are deprecated" ``DeprecationWarning`` - from setuptools>=11.3. See https://github.com/Pylons/pyramid/pull/1541 - -- Avoiding sharing the ``IRenderer`` objects across threads when attached to - a view using the `renderer=` argument. These renderers were instantiated - at time of first render and shared between requests, causing potentially - subtle effects like `pyramid.reload_templates = true` failing to work - in `pyramid_mako`. See https://github.com/Pylons/pyramid/pull/1575 - and https://github.com/Pylons/pyramid/issues/1268 - -- Avoiding timing attacks against CSRF tokens. - See https://github.com/Pylons/pyramid/pull/1574 - -- ``request.finished_callbacks`` and ``request.response_callbacks`` now - default to an iterable instead of ``None``. It may be checked for a length - of 0. This was the behavior in 1.5. - -- ``pyramid.httpexceptions.HTTPException`` now defaults to - ``520 Unknown Error`` instead of ``None None`` to conform with changes in - WebOb 1.5. - See https://github.com/Pylons/pyramid/pull/1865 - -- ``pshell`` will now preserve the capitalization of variables in the - ``[pshell]`` section of the INI file. This makes exposing classes to the - shell a little more straightfoward. - See https://github.com/Pylons/pyramid/pull/1883 - -- Fix an issue when user passes unparsed strings to ``pyramid.session.CookieSession`` - and ``pyramid.authentication.AuthTktCookieHelper`` for time related parameters - ``timeout``, ``reissue_time``, ``max_age`` that expect an integer value. - See https://github.com/Pylons/pyramid/pull/2050 - -- Fixed usage of ``pserve --monitor-restart --daemon`` which would fail in - horrible ways. See https://github.com/Pylons/pyramid/pull/2118 - -- Explicitly prevent ``pserve --reload --daemon`` from being used. It's never - been supported but would work and fail in weird ways. - See https://github.com/Pylons/pyramid/pull/2119 - -- Fix an issue on Windows when running ``pserve --reload`` in which the - process failed to fork because it could not find the pserve script to - run. See https://github.com/Pylons/pyramid/pull/2137 - -- Ensure that ``IAssetDescriptor.abspath`` always returns an absolute path. - There were cases depending on the process CWD that a relative path would - be returned. See https://github.com/Pylons/pyramid/issues/2187 - - -Deprecations ------------- - -- The ``pserve`` command's daemonization features have been deprecated as well - as ``--monitor-restart``. This includes the ``[start,stop,restart,status]`` - subcommands as well as the ``--daemon``, ``--stop-daemon``, ``--pid-file``, - ``--status``, ``--user`` and ``--group`` flags. - See https://github.com/Pylons/pyramid/pull/2120 - and https://github.com/Pylons/pyramid/pull/2189 - and https://github.com/Pylons/pyramid/pull/1641 - - Please use a real process manager in the future instead of relying on the - ``pserve`` to daemonize itself. Many options exist including your Operating - System's services such as Systemd or Upstart, as well as Python-based - solutions like Circus and Supervisor. - - See https://github.com/Pylons/pyramid/pull/1641 - and https://github.com/Pylons/pyramid/pull/2120 - -- Renamed the ``principal`` argument to ``pyramid.security.remember()`` to - ``userid`` in order to clarify its intended purpose. - See https://github.com/Pylons/pyramid/pull/1399 - -Docs ----- - -- Moved the documentation for ``accept`` on ``Configurator.add_view`` to no - longer be part of the predicate list. See - https://github.com/Pylons/pyramid/issues/1391 for a bug report stating - ``not_`` was failing on ``accept``. Discussion with @mcdonc led to the - conclusion that it should not be documented as a predicate. - See https://github.com/Pylons/pyramid/pull/1487 for this PR - -- Removed logging configuration from Quick Tutorial ini files except for - scaffolding- and logging-related chapters to avoid needing to explain it too - early. - -- Clarify a previously-implied detail of the ``ISession.invalidate`` API - documentation. - -- Improve and clarify the documentation on what Pyramid defines as a - ``principal`` and a ``userid`` in its security APIs. - See https://github.com/Pylons/pyramid/pull/1399 - -- Add documentation of command line programs (``p*`` scripts). See - https://github.com/Pylons/pyramid/pull/2191 - -Scaffolds ---------- - -- Update scaffold generating machinery to return the version of pyramid and - pyramid docs for use in scaffolds. Updated starter, alchemy and zodb - templates to have links to correctly versioned documentation and reflect - which pyramid was used to generate the scaffold. - -- Removed non-ascii copyright symbol from templates, as this was - causing the scaffolds to fail for project generation. - -- You can now run the scaffolding func tests via ``tox py2-scaffolds`` and - ``tox py3-scaffolds``. - -- cgit v1.2.3 From 1799be9dd8666d10d6b4a04a9b75fc57f8626c6f Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Fri, 15 Apr 2016 16:44:55 -0600 Subject: Update CHANGES/whatsnew-1.7 for updated require_csrf --- CHANGES.txt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index bc4b1aa79..0a7bdef1a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -25,13 +25,15 @@ Features ``require_csrf=False`` on those views. See https://github.com/Pylons/pyramid/pull/2413 -- Added a ``require_csrf`` view option which will enforce CSRF checks on POST - requests. If the CSRF check fails a ``BadCSRFToken`` exception will be - raised and may be caught by exception views (the default response is a - ``400 Bad Request``). This option should be used in place of the deprecated - ``check_csrf`` view predicate which would normally result in unexpected - ``404 Not Found`` response to the client instead of a catchable exception. - See https://github.com/Pylons/pyramid/pull/2413 +- Added a ``require_csrf`` view option which will enforce CSRF checks on any + request with an unsafe method as defined by RFC2616. If the CSRF check fails + a ``BadCSRFToken`` exception will be raised and may be caught by exception + views (the default response is a ``400 Bad Request``). This option should be + used in place of the deprecated ``check_csrf`` view predicate which would + normally result in unexpected ``404 Not Found`` response to the client + instead of a catchable exception. See + https://github.com/Pylons/pyramid/pull/2413 and + https://github.com/Pylons/pyramid/pull/2500 - Pyramid HTTPExceptions will now take into account the best match for the clients Accept header, and depending on what is requested will return -- cgit v1.2.3 From 65dee6e4ca0c0c607e97db0c9e55768f10591a58 Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Fri, 15 Apr 2016 20:42:20 -0400 Subject: In addition to CSRF token, verify the origin too Add an additional layer of protection against CSRF by verifying the actual origin of the request in addition to the CSRF token. We only do this check on sites hosted behind HTTPS because only HTTPS sites have evidence to show that the Referrer header is not being spuriously removed by random middleware boxes. --- CHANGES.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 0a7bdef1a..0cd2c0c9a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -35,6 +35,18 @@ Features https://github.com/Pylons/pyramid/pull/2413 and https://github.com/Pylons/pyramid/pull/2500 +- Added an additional CSRF validation that checks the origin/referrer of a + request and makes sure it matches the current ``request.domain``. This + particular check is only active when accessing a site over HTTPS as otherwise + browsers don't always send the required information. If this additional CSRF + validation fails a ``BadCSRFOrigin`` exception will be raised and may be + caught by exception views (the default response is ``400 Bad Request``). + Additional allowed origins may be configured by setting + ``pyramid.csrf_trusted_origins`` to a list of domain names (with ports if on + a non standard port) to allow. Subdomains are not allowed unless the domain + name has been prefixed with a ``.``. See: + https://github.com/Pylons/pyramid/pull/2501 + - Pyramid HTTPExceptions will now take into account the best match for the clients Accept header, and depending on what is requested will return text/html, application/json or text/plain. The default for */* is still -- cgit v1.2.3 From 8ceb14f9fe014fd18a12ec3f3da7099cbed15c28 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sat, 16 Apr 2016 15:32:11 -0500 Subject: add docs and backward incompatibility notices for #2501 --- CHANGES.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 0cd2c0c9a..d316594bc 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -15,6 +15,10 @@ Backward Incompatibilities See https://github.com/Pylons/pyramid/pull/2496 +- The ``check_csrf_token`` function no longer validates a csrf token in the + query string of a request. Only headers and request bodies are supported. + See https://github.com/Pylons/pyramid/pull/2500 + Features -------- @@ -44,14 +48,18 @@ Features Additional allowed origins may be configured by setting ``pyramid.csrf_trusted_origins`` to a list of domain names (with ports if on a non standard port) to allow. Subdomains are not allowed unless the domain - name has been prefixed with a ``.``. See: + name has been prefixed with a ``.``. See https://github.com/Pylons/pyramid/pull/2501 +- Added a new ``pyramid.session.check_csrf_origin`` API for validating the + origin or referrer headers against the request's domain. + See https://github.com/Pylons/pyramid/pull/2501 + - Pyramid HTTPExceptions will now take into account the best match for the clients Accept header, and depending on what is requested will return text/html, application/json or text/plain. The default for */* is still text/html, but if application/json is explicitly mentioned it will now - receive a valid JSON response. See: + receive a valid JSON response. See https://github.com/Pylons/pyramid/pull/2489 - A new event and interface (BeforeTraversal) has been introduced that will -- cgit v1.2.3 From d9c20d0a5002052df675b8a06b2e8711dc1cb586 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sat, 16 Apr 2016 15:49:18 -0500 Subject: flip master to 1.8 --- CHANGES.txt | 126 +----------------------------------------------------------- 1 file changed, 2 insertions(+), 124 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index d316594bc..c0681053d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,136 +4,14 @@ unreleased Backward Incompatibilities -------------------------- -- Following the Pyramid deprecation period (1.4 -> 1.6), - AuthTktAuthenticationPolicy's default hashing algorithm is changing from md5 - to sha512. If you are using the authentication policy and need to continue - using md5, please explicitly set hashalg to 'md5'. - - This change does mean that any existing auth tickets (and associated cookies) - will no longer be valid, and users will no longer be logged in, and have to - login to their accounts again. - - See https://github.com/Pylons/pyramid/pull/2496 - -- The ``check_csrf_token`` function no longer validates a csrf token in the - query string of a request. Only headers and request bodies are supported. - See https://github.com/Pylons/pyramid/pull/2500 - Features -------- -- Added a new setting, ``pyramid.require_default_csrf`` which may be used - to turn on CSRF checks globally for every POST request in the application. - This should be considered a good default for websites built on Pyramid. - It is possible to opt-out of CSRF checks on a per-view basis by setting - ``require_csrf=False`` on those views. - See https://github.com/Pylons/pyramid/pull/2413 - -- Added a ``require_csrf`` view option which will enforce CSRF checks on any - request with an unsafe method as defined by RFC2616. If the CSRF check fails - a ``BadCSRFToken`` exception will be raised and may be caught by exception - views (the default response is a ``400 Bad Request``). This option should be - used in place of the deprecated ``check_csrf`` view predicate which would - normally result in unexpected ``404 Not Found`` response to the client - instead of a catchable exception. See - https://github.com/Pylons/pyramid/pull/2413 and - https://github.com/Pylons/pyramid/pull/2500 - -- Added an additional CSRF validation that checks the origin/referrer of a - request and makes sure it matches the current ``request.domain``. This - particular check is only active when accessing a site over HTTPS as otherwise - browsers don't always send the required information. If this additional CSRF - validation fails a ``BadCSRFOrigin`` exception will be raised and may be - caught by exception views (the default response is ``400 Bad Request``). - Additional allowed origins may be configured by setting - ``pyramid.csrf_trusted_origins`` to a list of domain names (with ports if on - a non standard port) to allow. Subdomains are not allowed unless the domain - name has been prefixed with a ``.``. See - https://github.com/Pylons/pyramid/pull/2501 - -- Added a new ``pyramid.session.check_csrf_origin`` API for validating the - origin or referrer headers against the request's domain. - See https://github.com/Pylons/pyramid/pull/2501 - -- Pyramid HTTPExceptions will now take into account the best match for the - clients Accept header, and depending on what is requested will return - text/html, application/json or text/plain. The default for */* is still - text/html, but if application/json is explicitly mentioned it will now - receive a valid JSON response. See - https://github.com/Pylons/pyramid/pull/2489 - -- A new event and interface (BeforeTraversal) has been introduced that will - notify listeners before traversal starts in the router. See - https://github.com/Pylons/pyramid/pull/2469 and - https://github.com/Pylons/pyramid/pull/1876 - -- Add a new "view deriver" concept to Pyramid to allow framework authors to - inject elements into the standard Pyramid view pipeline and affect all - views in an application. This is similar to a decorator except that it - has access to options passed to ``config.add_view`` and can affect other - stages of the pipeline such as the raw response from a view or prior to - security checks. See https://github.com/Pylons/pyramid/pull/2021 - -- Allow a leading ``=`` on the key of the request param predicate. - For example, '=abc=1' is equivalent down to - ``request.params['=abc'] == '1'``. - See https://github.com/Pylons/pyramid/pull/1370 - -- A new ``request.invoke_exception_view(...)`` method which can be used to - invoke an exception view and get back a response. This is useful for - rendering an exception view outside of the context of the excview tween - where you may need more control over the request. - See https://github.com/Pylons/pyramid/pull/2393 - -- Allow using variable substitutions like ``%(LOGGING_LOGGER_ROOT_LEVEL)s`` - for logging sections of the .ini file and populate these variables from - the ``pserve`` command line -- e.g.: - ``pserve development.ini LOGGING_LOGGER_ROOT_LEVEL=DEBUG`` - See https://github.com/Pylons/pyramid/pull/2399 - -Documentation Changes ---------------------- - -- A complete overhaul of the docs: - - - Use pip instead of easy_install. - - Become opinionated by preferring Python 3.4 or greater to simplify - installation of Python and its required packaging tools. - - Use venv for the tool, and virtual environment for the thing created, - instead of virtualenv. - - Use py.test and pytest-cov instead of nose and coverage. - - Further updates to the scaffolds as well as tutorials and their src files. - - See https://github.com/Pylons/pyramid/pull/2468 - -- A complete overhaul of the ``alchemy`` scaffold as well as the - Wiki2 SQLAlchemy + URLDispatch tutorial to introduce more modern features - into the usage of SQLAlchemy with Pyramid and provide a better starting - point for new projects. - See https://github.com/Pylons/pyramid/pull/2024 - Bug Fixes --------- -- Fix ``pserve --browser`` to use the ``--server-name`` instead of the - app name when selecting a section to use. This was only working for people - who had server and app sections with the same name, for example - ``[app:main]`` and ``[server:main]``. - See https://github.com/Pylons/pyramid/pull/2292 - Deprecations ------------ -- The ``check_csrf`` view predicate has been deprecated. Use the - new ``require_csrf`` option or the ``pyramid.require_default_csrf`` setting - to ensure that the ``BadCSRFToken`` exception is raised. - See https://github.com/Pylons/pyramid/pull/2413 - -- Support for Python 3.3 will be removed in Pyramid 1.8. - https://github.com/Pylons/pyramid/issues/2477 - -- Python 2.6 is no longer supported by Pyramid. See - https://github.com/Pylons/pyramid/issues/2368 - -- Dropped Python 3.2 support. - See https://github.com/Pylons/pyramid/pull/2256 +Documentation Changes +--------------------- -- cgit v1.2.3