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