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