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