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