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