Tres Seaver
2017-06-05 1814cda1f5ec85c24651bfd29645e4057ae5200e
commit | author | age
37d887 1 unreleased
MM 2 ==========
3
4 - Add an informative error message when unknown predicates are supplied. The
5   new message suggests alternatives based on the list of known predicates.
6   See https://github.com/Pylons/pyramid/pull/3054
7
50d216 8 - Added integrity attributes for JavaScripts in cookiecutters, scaffolds, and
SP 9   resulting source files in tutorials.
10   See https://github.com/Pylons/pyramid/issues/2548
11
d179ce 12 - Update RELEASING.txt for updating cookiecutters. Change cookiecutter URLs to
SP 13   use shortcut.
cc8ce5 14   See https://github.com/Pylons/pyramid/issues/3042
MM 15
16 - Ensure the correct threadlocals are pushed during view execution when
17   invoked from ``request.invoke_exception_view``.
18   See https://github.com/Pylons/pyramid/pull/3060
d179ce 19
1fc7ee 20 1.9a2 (2017-05-09)
MM 21 ==================
22
23 Backward Incompatibilities
24 --------------------------
25
26 - ``request.exception`` and ``request.exc_info`` will only be set if the
27   response was generated by the EXCVIEW tween. This is to avoid any confusion
28   where a response was generated elsewhere in the pipeline and not in
29   direct relation to the original exception. If anyone upstream wants to
30   catch and render responses for exceptions they should set
31   ``request.exception`` and ``request.exc_info`` themselves to indicate
32   the exception that was squashed when generating the response.
33
34   Similar behavior occurs with ``request.invoke_exception_view`` in which
35   the exception properties are set to reflect the exception if a response
36   is successfully generated by the method.
37
38   This is a very minor incompatibility. Most tweens right now would give
39   priority to the raised exception and ignore ``request.exception``. This
40   change just improves and clarifies that bookkeeping by trying to be
41   more clear about the relationship between the response and its squashed
42   exception. See https://github.com/Pylons/pyramid/pull/3029 and
43   https://github.com/Pylons/pyramid/pull/3031
44
c84904 45 1.9a1 (2017-05-01)
MM 46 ==================
bdb8e0 47
fa8a9d 48 Major Features
MM 49 --------------
50
51 - The file format used by all ``p*`` command line scripts such as ``pserve``
52   and ``pshell``, as well as the ``pyramid.paster.bootstrap`` function
53   is now replaceable thanks to a new dependency on
f454b8 54   `plaster <http://docs.pylonsproject.org/projects/plaster/en/latest/>`_.
fa8a9d 55
MM 56   For now, Pyramid is still shipping with integrated support for the
fdd77d 57   PasteDeploy INI format by depending on the
fbfd81 58   `plaster_pastedeploy <https://github.com/Pylons/plaster_pastedeploy>`_
fdd77d 59   binding library. This may change in the future.
fa8a9d 60
MM 61   See https://github.com/Pylons/pyramid/pull/2985
5f4649 62
4c3971 63 - Added an execution policy hook to the request pipeline. An execution
MM 64   policy has the ability to control creation and execution of the request
f454b8 65   objects before they enter the rest of the pipeline. This means for a single
fa8a9d 66   request environ the policy may create more than one request object.
MM 67
68   The first library to use this feature is
69   `pyramid_retry
f454b8 70   <http://docs.pylonsproject.org/projects/pyramid-retry/en/latest/>`_.
fa8a9d 71
MM 72   See https://github.com/Pylons/pyramid/pull/2964
73
6419a3 74 - CSRF support has been refactored out of sessions and into its own
MM 75   independent API in the ``pyramid.csrf`` module. It supports a pluggable
76   ``pyramid.interfaces.ICSRFStoragePolicy`` which can be used to define your
77   own mechanism for generating and validating CSRF tokens. By default,
78   Pyramid continues to use the ``pyramid.csrf.LegacySessionCSRFStoragePolicy``
79   that uses the ``request.session.get_csrf_token`` and
80   ``request.session.new_csrf_token`` APIs under the hood to preserve
81   compatibility. Two new policies are shipped as well,
82   ``pyramid.csrf.SessionCSRFStoragePolicy`` and
83   ``pyramid.csrf.CookieCSRFStoragePolicy`` which will store the CSRF tokens
84   in the session and in a standalone cookie, respectively. The storage policy
85   can be changed by using the new
86   ``pyramid.config.Configurator.set_csrf_storage_policy`` config directive.
87
88   CSRF tokens should be used via the new ``pyramid.csrf.get_csrf_token``,
89   ``pyramid.csrf.new_csrf_token`` and ``pyramid.csrf.check_csrf_token`` APIs
90   in order to continue working if the storage policy is changed. Also, the
91   ``pyramid.csrf.get_csrf_token`` function is injected into templates to be
92   used conveniently in UI code.
93
682a9b 94   See https://github.com/Pylons/pyramid/pull/2854 and
MM 95   https://github.com/Pylons/pyramid/pull/3019
a2c7c7 96
2b9b6c 97 Minor Features
MM 98 --------------
9028c9 99
MM 100 - Support an ``open_url`` config setting in the ``pserve`` section of the
101   config file. This url is used to open a web browser when ``pserve --browser``
102   is invoked. When this setting is unavailable the ``pserve`` script will
103   attempt to guess the port the server is using from the
104   ``server:<server_name>`` section of the config file but there is no
105   requirement that the server is being run in this format so it may fail.
106   See https://github.com/Pylons/pyramid/pull/2984
107
87af11 108 - The ``pyramid.config.Configurator`` can now be used as a context manager
MM 109   which will automatically push/pop threadlocals (similar to
110   ``config.begin()`` and ``config.end()``). It will also automatically perform
111   a ``config.commit()`` and thus it is only recommended to be used at the
112   top-level of your app. See https://github.com/Pylons/pyramid/pull/2874
a2c7c7 113
847fb7 114 - The threadlocals are now available inside any function invoked via
MM 115   ``config.include``. This means the only config-time code that cannot rely
116   on threadlocals is code executed from non-actions inside the main. This
117   can be alleviated by invoking ``config.begin()`` and ``config.end()``
118   appropriately or using the new context manager feature of the configurator.
119   See https://github.com/Pylons/pyramid/pull/2989
120
1cf132 121 Bug Fixes
BJR 122 ---------
45f882 123
564b63 124 - HTTPException's accepts a detail kwarg that may be used to pass additional
BJR 125   details to the exception. You may now pass objects so long as they have a
169155 126   valid __str__ method. See https://github.com/Pylons/pyramid/pull/2951
MM 127
128 - Fix a reference cycle causing memory leaks in which the registry
129   would keep a ``Configurator`` instance alive even after the configurator
130   was discarded. Another fix was also added for the ``global_registries``
131   object in which the registry was stored in a closure preventing it from
132   being deallocated. See https://github.com/Pylons/pyramid/pull/2967
564b63 133
38294e 134 - Fix a bug directly invoking ``pyramid.scripts.pserve.main`` with the
MM 135   ``--reload`` option in which ``sys.argv`` is always used in the subprocess
136   instead of the supplied ``argv``.
137   See https://github.com/Pylons/pyramid/pull/2962
138
1cf132 139 Deprecations
BJR 140 ------------
cb98a9 141
2b9b6c 142 - Pyramid currently depends on ``plaster_pastedeploy`` to simplify the
MM 143   transition to ``plaster`` by maintaining integrated support for INI files.
144   This dependency on ``plaster_pastedeploy`` should be considered subject to
2aebc6 145   Pyramid's deprecation policy and may be removed in the future.
2b9b6c 146   Applications should depend on the appropriate plaster binding to satisfy
MM 147   their needs.
d2f0fe 148
2b9b6c 149 - Retrieving CSRF token from the session has been deprecated in favor of
MM 150   equivalent methods in the ``pyramid.csrf`` module. The CSRF methods
151   (``ISession.get_csrf_token`` and ``ISession.new_csrf_token``) are no longer
152   required on the ``ISession`` interface except when using the default
153   ``pyramid.csrf.LegacySessionCSRFStoragePolicy``.
a2c7c7 154
2b9b6c 155   Also, ``pyramid.session.check_csrf_token`` is now located at
MM 156   ``pyramid.csrf.check_csrf_token``.
157
158   See https://github.com/Pylons/pyramid/pull/2854 and
159   https://github.com/Pylons/pyramid/pull/3019
3213e2 160
785088 161 Documentation Changes
MM 162 ---------------------
163
164 - Added the execution policy to the routing diagram in the Request Processing
840508 165   chapter. See https://github.com/Pylons/pyramid/pull/2993