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