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