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