Skip to content
Newer
Older
100644 855 lines (650 sloc) 36.3 KB
0d96b77 @mcdonc version bump in setup.py conf.py CHANGES.txt, rejigger changes bugs v…
mcdonc authored
1 Next Release
2d93140 @mmerickel support acl as a callable
mmerickel authored
2 ============
3
4 Features
5 --------
6
b210ce3 @mcdonc add pdistreport command
mcdonc authored
7 - Add ``pdistreport`` script, which prints the Python version in use, the
8 Pyramid version in use, and the version number and location of all Python
9 distributions currently installed.
10
32333e4 @mcdonc add not_ predicate feature
mcdonc authored
11 - Add the ability to invert the result of any view, route, or subscriber
12 predicate using the ``not_`` class. For example::
13
14 from pyramid.config import not_
15
16 @view_config(route_name='myroute', request_method=not_('POST'))
17 def myview(request): ...
18
19 The above example will ensure that the view is called if the request method
20 is not POST (at least if no other view is more specific).
21
22 The :class:`pyramid.config.not_` class can be used against any value that is
23 a predicate value passed in any of these contexts:
24
25 - ``pyramid.config.Configurator.add_view``
26
27 - ``pyramid.config.Configurator.add_route``
28
29 - ``pyramid.config.Configurator.add_subscriber``
30
31 - ``pyramid.view.view_config``
32
33 - ``pyramid.events.subscriber``
34
a178631 @mcdonc add an entry to changes about code merged from feature.prequest_login…
mcdonc authored
35 - ``scripts/prequest.py``: add support for submitting ``PUT`` and ``PATCH``
36 requests. See https://github.com/Pylons/pyramid/pull/1033. add support for
0d96b77 @mcdonc version bump in setup.py conf.py CHANGES.txt, rejigger changes bugs v…
mcdonc authored
37 submitting ``OPTIONS`` and ``PROPFIND`` requests, and allow users to specify
a178631 @mcdonc add an entry to changes about code merged from feature.prequest_login…
mcdonc authored
38 basic authentication credentials in the request via a ``--login`` argument to
39 the script. See https://github.com/Pylons/pyramid/pull/1039.
f0f92b0 @tseaver Changelog for PR #1033.
tseaver authored
40
2d93140 @mmerickel support acl as a callable
mmerickel authored
41 - ``ACLAuthorizationPolicy`` supports ``__acl__`` as a callable. This
42 removes the ambiguity between the potential ``AttributeError`` that would
43 be raised on the ``context`` when the property was not defined and the
44 ``AttributeError`` that could be raised from any user-defined code within
45 a dynamic property. It is recommended to define a dynamic ACL as a callable
46 to avoid this ambiguity. See https://github.com/Pylons/pyramid/issues/735.
47
ff41f86 @wosc Fixes #798: Allow a protocol-relative URL to be passed to add_static_…
wosc authored
48 - Allow a protocol-relative URL (e.g. ``//example.com/images``) to be passed to
49 ``pyramid.config.Configurator.add_static_view``. This allows
50 externally-hosted static URLs to be generated based on the current protocol.
51
188aa7e @wichert Add a parent_domain option for auth_tkt policy
wichert authored
52 - The ``AuthTktAuthenticationPolicy`` has a new ``parent_domain`` option to
53 set the authentication cookie as a wildcard cookie on the parent domain. This
54 is useful if you have multiple sites sharing the same domain.
55
23a7c6d @mmerickel update CHANGES.txt
mmerickel authored
56 - The ``AuthTktAuthenticationPolicy`` now supports IPv6 addresses when using
57 the ``include_ip=True`` option. This is possibly incompatible with
58 alternative ``auth_tkt`` implementations, as the specification does not
59 define how to properly handle IPv6. See
60 https://github.com/Pylons/pyramid/issues/831.
61
38844f7 @mmerickel update CHANGES.txt
mmerickel authored
62 - Make it possible to use variable arguments via
63 ``pyramid.paster.get_appsettings``. This also allowed the generated
64 ``initialize_db`` script from the ``alchemy`` scaffold to grow support
65 for options in the form ``a=1 b=2`` so you can fill in
66 values in a parameterized ``.ini`` file, e.g.
67 ``initialize_myapp_db etc/development.ini a=1 b=2``.
68 See https://github.com/Pylons/pyramid/pull/911
69
fab8454 @mcdonc add changelog note
mcdonc authored
70 - The ``request.session.check_csrf_token()`` method and the ``check_csrf`` view
71 predicate now take into account the value of the HTTP header named
72 ``X-CSRF-Token`` (as well as the ``csrf_token`` form parameter, which they
73 always did). The header is tried when the form parameter does not exist.
74
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
75 - View lookup will now search for valid views based on the inheritance
76 hierarchy of the context. It tries to find views based on the most
77 specific context first, and upon predicate failure, will move up the
78 inheritance chain to test views found by the super-type of the context.
79 In the past, only the most specific type containing views would be checked
80 and if no matching view could be found then a PredicateMismatch would be
81 raised. Now predicate mismatches don't hide valid views registered on
0d96b77 @mcdonc version bump in setup.py conf.py CHANGES.txt, rejigger changes bugs v…
mcdonc authored
82 super-types. Here's an example that now works:
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
83
84 .. code-block:: python
9e1e6d3 @latteier Change log note.
latteier authored
85
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
86 class IResource(Interface):
07c189d @stevepiercy Fix whitespace in CHANGES.txt to permit build.
stevepiercy authored
87
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
88 ...
9e1e6d3 @latteier Change log note.
latteier authored
89
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
90 @view_config(context=IResource)
91 def get(context, request):
07c189d @stevepiercy Fix whitespace in CHANGES.txt to permit build.
stevepiercy authored
92
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
93 ...
9e1e6d3 @latteier Change log note.
latteier authored
94
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
95 @view_config(context=IResource, request_method='POST')
96 def post(context, request):
07c189d @stevepiercy Fix whitespace in CHANGES.txt to permit build.
stevepiercy authored
97
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
98 ...
9e1e6d3 @latteier Change log note.
latteier authored
99
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
100 @view_config(context=IResource, request_method='DELETE')
101 def delete(context, request):
07c189d @stevepiercy Fix whitespace in CHANGES.txt to permit build.
stevepiercy authored
102
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
103 ...
9e1e6d3 @latteier Change log note.
latteier authored
104
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
105 @implementor(IResource)
106 class MyResource:
07c189d @stevepiercy Fix whitespace in CHANGES.txt to permit build.
stevepiercy authored
107
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
108 ...
9e1e6d3 @latteier Change log note.
latteier authored
109
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
110 @view_config(context=MyResource, request_method='POST')
111 def override_post(context, request):
07c189d @stevepiercy Fix whitespace in CHANGES.txt to permit build.
stevepiercy authored
112
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
113 ...
9e1e6d3 @latteier Change log note.
latteier authored
114
115 Previously the override_post view registration would hide the get
116 and delete views in the context of MyResource -- leading to a
117 predicate mismatch error when trying to use GET or DELETE
118 methods. Now the views are found and no predicate mismatch is
119 raised.
6b97003 @mmerickel update changlog
mmerickel authored
120 See https://github.com/Pylons/pyramid/pull/786 and
75fc4ac @mmerickel update changelog
mmerickel authored
121 https://github.com/Pylons/pyramid/pull/1004 and
122 https://github.com/Pylons/pyramid/pull/1046
9e1e6d3 @latteier Change log note.
latteier authored
123
1377480 @mcdonc add change note
mcdonc authored
124 - The ``pserve`` command now takes a ``-v`` (or ``--verbose``) flag and a
125 ``-q`` (or ``--quiet``) flag. Output from running ``pserve`` can be
126 controlled using these flags. ``-v`` can be specified multiple times to
127 increase verbosity. ``-q`` sets verbosity to ``0`` unconditionally. The
128 default verbosity level is ``1``.
129
0d96b77 @mcdonc version bump in setup.py conf.py CHANGES.txt, rejigger changes bugs v…
mcdonc authored
130 Bug Fixes
131 ---------
132
133 - Make the ``pyramid.config.assets.PackageOverrides`` object implement the API
134 for ``__loader__`` objects specified in PEP 302. Proxies to the
135 ``__loader__`` set by the importer, if present; otherwise, raises
136 ``NotImplementedError``. This makes Pyramid static view overrides work
137 properly under Python 3.3 (previously they would not). See
138 https://github.com/Pylons/pyramid/pull/1015 for more information.
139
140 - ``mako_templating``: added defensive workaround for non-importability of
141 ``mako`` due to upstream ``markupsafe`` dropping Python 3.2 support. Mako
142 templating will no longer work under the combination of MarkupSafe 0.17 and
143 Python 3.2 (although the combination of MarkupSafe 0.17 and Python 3.3 or any
144 supported Python 2 version will work OK).
145
ea278e1 @mmerickel update changelog
mmerickel authored
146 - Spaces and dots may now be in mako renderer template paths. This was
147 broken when support for the new makodef syntax was added in 1.4a1.
148 See https://github.com/Pylons/pyramid/issues/950
149
20c57e6 @mmerickel update changelog
mmerickel authored
150 - ``pyramid.debug_authorization=true`` will now correctly print out
151 ``Allowed`` for views registered with ``NO_PERMISSION_REQUIRED`` instead
152 of invoking the ``permits`` method of the authorization policy.
153 See https://github.com/Pylons/pyramid/issues/954
154
c35b298 @mmerickel update changes.txt
mmerickel authored
155 - Pyramid failed to install on some systems due to being packaged with
156 some test files containing higher order characters in their names. These
157 files have now been removed. See
158 https://github.com/Pylons/pyramid/issues/981
159
050b71c @mcdonc - ``pyramid.testing.DummyResource`` didn't define ``__bool__``, so co…
mcdonc authored
160 - ``pyramid.testing.DummyResource`` didn't define ``__bool__``, so code under
0d96b77 @mcdonc version bump in setup.py conf.py CHANGES.txt, rejigger changes bugs v…
mcdonc authored
161 Python 3 would use ``__len__`` to find truthiness; this usually caused an
162 instance of DummyResource to be "falsy" instead of "truthy". See
163 https://github.com/Pylons/pyramid/pull/1032
050b71c @mcdonc - ``pyramid.testing.DummyResource`` didn't define ``__bool__``, so co…
mcdonc authored
164
0a8d50f @mcdonc add change note
mcdonc authored
165 - The ``alchemy`` scaffold would break when the database was MySQL during
166 tables creation. See https://github.com/Pylons/pyramid/pull/1049
167
96ab9f2 @mcdonc prep for 1.4
mcdonc authored
168 1.4 (2012-12-18)
169 ================
758fa23 @mcdonc garden
mcdonc authored
170
171 Docs
172 ----
173
174 - Fix functional tests in the ZODB tutorial
175
e609e19 @mcdonc prep for 1.4b3
mcdonc authored
176 1.4b3 (2012-12-10)
177 ==================
178
179 - Packaging release only, no code changes. 1.4b2 was a brownbag release due to
180 missing directories in the tarball.
181
a7e0e60 @mcdonc prep for 1.4b2
mcdonc authored
182 1.4b2 (2012-12-10)
183 ==================
184
185 Docs
186 ----
187
188 - Scaffolding is now PEP-8 compliant (at least for a brief shining moment).
189
190 - Tutorial improvements.
ed14191 @mmerickel _depth argument to view_config is now relative to view_config
mmerickel authored
191
192 Backwards Incompatibilities
193 ---------------------------
194
195 - Modified the ``_depth`` argument to ``pyramid.view.view_config`` to accept
196 a value relative to the invocation of ``view_config`` itself. Thus, when it
197 was previously expecting a value of ``1`` or greater, to reflect that
198 the caller of ``view_config`` is 1 stack frame away from ``venusian.attach``,
199 this implementation detail is now hidden.
200
a078e19 @mcdonc add changenote
mcdonc authored
201 - Modified the ``_backframes`` argument to ``pyramid.util.action_method`` in a
202 similar way to the changes described to ``_depth`` above. This argument
203 remains undocumented, but might be used in the wild by some insane person.
204
1608b26 @mcdonc prep for 1.4b1
mcdonc authored
205 1.4b1 (2012-11-21)
206 ==================
0ccdc23 @mcdonc - A failure when trying to locate the attribute ``__text__`` on route…
mcdonc authored
207
71cd93b @mcdonc - Small microspeed enhancement which anticipates that a
mcdonc authored
208 Features
209 --------
210
211 - Small microspeed enhancement which anticipates that a
212 ``pyramid.response.Response`` object is likely to be returned from a view.
213 Some code is shortcut if the class of the object returned by a view is this
214 class. A similar microoptimization was done to
215 ``pyramid.request.Request.is_response``.
216
9132f65 @mcdonc garden
mcdonc authored
217 - Make it possible to use variable arguments on ``p*`` commands (``pserve``,
218 ``pshell``, ``pviews``, etc) in the form ``a=1 b=2`` so you can fill in
219 values in parameterized ``.ini`` file, e.g. ``pshell etc/development.ini
6ba0fc7 @mcdonc garden
mcdonc authored
220 http_port=8080``. See https://github.com/Pylons/pyramid/pull/714
9132f65 @mcdonc garden
mcdonc authored
221
f700d37 @mcdonc garden
mcdonc authored
222 - A somewhat advanced and obscure feature of Pyramid event handlers is their
223 ability to handle "multi-interface" notifications. These notifications have
224 traditionally presented multiple objects to the subscriber callable. For
225 instance, if an event was sent by code like this::
28fc3d5 @mcdonc - In order to normalize the relationship between event subscribers and
mcdonc authored
226
227 registry.notify(event, context)
228
229 In the past, in order to catch such an event, you were obligated to write and
230 register an event subscriber that mentioned both the event and the context in
231 its argument list::
232
233 @subscriber([SomeEvent, SomeContextType])
f700d37 @mcdonc garden
mcdonc authored
234 def asubscriber(event, context):
235 pass
236
237 In many subscriber callables registered this way, it was common for the logic
238 in the subscriber callable to completely ignore the second and following
239 arguments (e.g. ``context`` in the above example might be ignored), because
240 they usually existed as attributes of the event anyway. You could usually
a3810e7 @mcdonc garden
mcdonc authored
241 get the same value by doing ``event.context`` or similar.
f700d37 @mcdonc garden
mcdonc authored
242
243 The fact that you needed to put an extra argument which you usually ignored
244 in the subscriber callable body was only a minor annoyance until we added
a3810e7 @mcdonc garden
mcdonc authored
245 "subscriber predicates", used to narrow the set of circumstances under which
246 a subscriber will be executed, in a prior 1.4 alpha release. Once those were
247 added, the annoyance was escalated, because subscriber predicates needed to
248 accept the same argument list and arity as the subscriber callables that they
249 were configured against. So, for example, if you had these two subscriber
250 registrations in your code::
f700d37 @mcdonc garden
mcdonc authored
251
252 @subscriber([SomeEvent, SomeContextType])
253 def asubscriber(event, context):
254 pass
255
256 @subscriber(SomeOtherEvent)
257 def asubscriber(event):
258 pass
259
260 And you wanted to use a subscriber predicate::
261
262 @subscriber([SomeEvent, SomeContextType], mypredicate=True)
a3810e7 @mcdonc garden
mcdonc authored
263 def asubscriber1(event, context):
28fc3d5 @mcdonc - In order to normalize the relationship between event subscribers and
mcdonc authored
264 pass
265
f700d37 @mcdonc garden
mcdonc authored
266 @subscriber(SomeOtherEvent, mypredicate=True)
a3810e7 @mcdonc garden
mcdonc authored
267 def asubscriber2(event):
f700d37 @mcdonc garden
mcdonc authored
268 pass
269
a3810e7 @mcdonc garden
mcdonc authored
270 If an existing ``mypredicate`` subscriber predicate had been written in such
271 a way that it accepted only one argument in its ``__call__``, you could not
272 use it against a subscription which named more than one interface in its
273 subscriber interface list. Similarly, if you had written a subscriber
274 predicate that accepted two arguments, you couldn't use it against a
275 registration that named only a single interface type.
276
277 For example, if you created this predicate::
f700d37 @mcdonc garden
mcdonc authored
278
279 class MyPredicate(object):
280 # portions elided...
281 def __call__(self, event):
282 return self.val == event.context.foo
283
a3810e7 @mcdonc garden
mcdonc authored
284 It would not work against a multi-interface-registered subscription, so in
285 the above example, when you attempted to use it against ``asubscriber1``, it
286 would fail at runtime with a TypeError, claiming something was attempting to
287 call it with too many arguments.
f700d37 @mcdonc garden
mcdonc authored
288
a3810e7 @mcdonc garden
mcdonc authored
289 To hack around this limitation, you were obligated to design the
290 ``mypredicate`` predicate to expect to receive in its ``__call__`` either a
291 single ``event`` argument (a SomeOtherEvent object) *or* a pair of arguments
292 (a SomeEvent object and a SomeContextType object), presumably by doing
293 something like this::
f700d37 @mcdonc garden
mcdonc authored
294
295 class MyPredicate(object):
296 # portions elided...
297 def __call__(self, event, context=None):
298 return self.val == event.context.foo
299
300 This was confusing and bad.
301
302 In order to allow people to ignore unused arguments to subscriber callables
303 and to normalize the relationship between event subscribers and subscriber
304 predicates, we now allow both subscribers and subscriber predicates to accept
305 only a single ``event`` argument even if they've been subscribed for
306 notifications that involve multiple interfaces. Subscribers and subscriber
307 predicates that accept only one argument will receive the first object passed
308 to ``notify``; this is typically (but not always) the event object. The
309 other objects involved in the subscription lookup will be discarded. You can
310 now write an event subscriber that accepts only ``event`` even if it
311 subscribes to multiple interfaces::
28fc3d5 @mcdonc - In order to normalize the relationship between event subscribers and
mcdonc authored
312
313 @subscriber([SomeEvent, SomeContextType])
f700d37 @mcdonc garden
mcdonc authored
314 def asubscriber(event):
28fc3d5 @mcdonc - In order to normalize the relationship between event subscribers and
mcdonc authored
315 # this will work!
316
f700d37 @mcdonc garden
mcdonc authored
317 This prevents you from needing to match the subscriber callable parameters to
318 the subscription type unnecessarily, especially when you don't make use of
319 any argument in your subscribers except for the event object itself.
320
321 Note, however, that if the event object is not the first
322 object in the call to ``notify``, you'll run into trouble. For example, if
323 notify is called with the context argument first::
28fc3d5 @mcdonc - In order to normalize the relationship between event subscribers and
mcdonc authored
324
325 registry.notify(context, event)
326
f700d37 @mcdonc garden
mcdonc authored
327 You won't be able to take advantage of the event-only feature. It will
328 "work", but the object received by your event handler won't be the event
329 object, it will be the context object, which won't be very useful::
28fc3d5 @mcdonc - In order to normalize the relationship between event subscribers and
mcdonc authored
330
331 @subscriber([SomeContextType, SomeEvent])
f700d37 @mcdonc garden
mcdonc authored
332 def asubscriber(event):
28fc3d5 @mcdonc - In order to normalize the relationship between event subscribers and
mcdonc authored
333 # bzzt! you'll be getting the context here as ``event``, and it'll
334 # be useless
335
336 Existing multiple-argument subscribers continue to work without issue, so you
337 should continue use those if your system notifies using multiple interfaces
338 and the first interface is not the event interface. For example::
339
340 @subscriber([SomeContextType, SomeEvent])
f700d37 @mcdonc garden
mcdonc authored
341 def asubscriber(context, event):
28fc3d5 @mcdonc - In order to normalize the relationship between event subscribers and
mcdonc authored
342 # this will still work!
343
344 The event-only feature makes it possible to use a subscriber predicate that
345 accepts only a request argument within both multiple-interface subscriber
f700d37 @mcdonc garden
mcdonc authored
346 registrations and single-interface subscriber registrations. You needn't
347 make slightly different variations of predicates depending on the
348 subscription type arguments. Instead, just write all your subscriber
349 predicates so they only accept ``event`` in their ``__call__`` and they'll be
350 useful across all registrations for subscriptions that use an event as their
351 first argument, even ones which accept more than just ``event``.
352
353 However, the same caveat applies to predicates as to subscriber callables: if
354 you're subscribing to a multi-interface event, and the first interface is not
355 the event interface, the predicate won't work properly. In such a case,
356 you'll need to match the predicate ``__call__`` argument ordering and
357 composition to the ordering of the interfaces. For example, if the
358 registration for the subscription uses ``[SomeContext, SomeEvent]``, you'll
359 need to reflect that in the ordering of the parameters of the predicate's
360 ``__call__`` method::
28fc3d5 @mcdonc - In order to normalize the relationship between event subscribers and
mcdonc authored
361
362 def __call__(self, context, event):
363 return event.request.path.startswith(self.val)
364
f700d37 @mcdonc garden
mcdonc authored
365 tl;dr: 1) When using multi-interface subscriptions, always use the event type
366 as the first subscription registration argument and 2) When 1 is true, use
367 only ``event`` in your subscriber and subscriber predicate parameter lists,
368 no matter how many interfaces the subscriber is notified with. This
369 combination will result in the maximum amount of reusability of subscriber
370 predicates and the least amount of thought on your part. Drink responsibly.
28fc3d5 @mcdonc - In order to normalize the relationship between event subscribers and
mcdonc authored
371
0ccdc23 @mcdonc - A failure when trying to locate the attribute ``__text__`` on route…
mcdonc authored
372 Bug Fixes
373 ---------
374
375 - A failure when trying to locate the attribute ``__text__`` on route and view
376 predicates existed when the ``debug_routematch`` setting was true or when the
377 ``pviews`` command was used. See https://github.com/Pylons/pyramid/pull/727
378
b5e4443 @mcdonc garden
mcdonc authored
379 Documentation
380 -------------
381
382 - Sync up tutorial source files with the files that are rendered by the
383 scaffold that each uses.
384
9480686 @mcdonc prep for release
mcdonc authored
385 1.4a4 (2012-11-14)
386 ==================
c7337ba @mcdonc - Added an ``effective_principals`` route and view predicate.
mcdonc authored
387
388 Features
389 --------
390
19b8207 @mmerickel merged SHA512AuthTktAuthenticationPolicy into AuthTktAuthenticationPo…
mmerickel authored
391 - ``pyramid.authentication.AuthTktAuthenticationPolicy`` has been updated to
392 support newer hashing algorithms such as ``sha512``. Existing applications
39ef68d @mcdonc rearrange deck chairs
mcdonc authored
393 should consider updating if possible for improved security over the default
394 md5 hashing.
19b8207 @mmerickel merged SHA512AuthTktAuthenticationPolicy into AuthTktAuthenticationPo…
mmerickel authored
395
c7337ba @mcdonc - Added an ``effective_principals`` route and view predicate.
mcdonc authored
396 - Added an ``effective_principals`` route and view predicate.
397
07c9ee0 @mcdonc - Do not allow the userid returned from the ``authenticated_userid`` …
mcdonc authored
398 - Do not allow the userid returned from the ``authenticated_userid`` or the
399 userid that is one of the list of principals returned by
400 ``effective_principals`` to be either of the strings ``system.Everyone`` or
401 ``system.Authenticated`` when any of the built-in authorization policies that
402 live in ``pyramid.authentication`` are in use. These two strings are
403 reserved for internal usage by Pyramid and they will not be accepted as valid
404 userids.
405
ca46568 @mmerickel garden
mmerickel authored
406 - Slightly better debug logging from
407 ``pyramid.authentication.RepozeWho1AuthenticationPolicy``.
47146eb @mcdonc garden
mcdonc authored
408
39ef68d @mcdonc rearrange deck chairs
mcdonc authored
409 - ``pyramid.security.view_execution_permitted`` used to return ``True`` if no
926fb68 @mcdonc resolve merge conflict
mcdonc authored
410 view could be found. It now raises a ``TypeError`` exception in that case, as
411 it doesn't make sense to assert that a nonexistent view is
412 execution-permitted. See https://github.com/Pylons/pyramid/issues/299.
6099144 @mmerickel updated changes
mmerickel authored
413
a8d71ca @mcdonc - Allow a ``_depth`` argument to ``pyramid.view.view_config``, which …
mcdonc authored
414 - Allow a ``_depth`` argument to ``pyramid.view.view_config``, which will
415 permit limited composition reuse of the decorator by other software that
416 wants to provide custom decorators that are much like view_config.
417
1701243 @mmerickel update changelog, close #627
mmerickel authored
418 - Allow an iterable of decorators to be passed to
419 ``pyramid.config.Configurator.add_view``. This allows views to be wrapped
420 by more than one decorator without requiring combining the decorators
421 yourself.
422
a007a4f @mcdonc - In the past if a renderer returned ``None``, the body of the resulting
mcdonc authored
423 Bug Fixes
424 ---------
425
426 - In the past if a renderer returned ``None``, the body of the resulting
427 response would be set explicitly to the empty string. Instead, now, the body
428 is left unchanged, which allows the renderer to set a body itself by using
429 e.g. ``request.response.body = b'foo'``. The body set by the renderer will
430 be unmolested on the way out. See
431 https://github.com/Pylons/pyramid/issues/709
432
34d4cd0 @mcdonc - In uncommon cases, the ``pyramid_excview_tween_factory`` might have
mcdonc authored
433 - In uncommon cases, the ``pyramid_excview_tween_factory`` might have
434 inadvertently raised a ``KeyError`` looking for ``request_iface`` as an
435 attribute of the request. It no longer fails in this case. See
436 https://github.com/Pylons/pyramid/issues/700
437
267dbd2 @mcdonc - Be more tolerant of potential error conditions in ``match_param`` and
mcdonc authored
438 - Be more tolerant of potential error conditions in ``match_param`` and
439 ``physical_path`` predicate implementations; instead of raising an exception,
440 return False.
441
39ef68d @mcdonc rearrange deck chairs
mcdonc authored
442 - ``pyramid.view.render_view`` was not functioning properly under Python 3.x
443 due to a byte/unicode discrepancy. See
cd8ac80 @tshepang update some links and fix others
tshepang authored
444 https://github.com/Pylons/pyramid/issues/721
f89cfcd @mmerickel updated changelog
mmerickel authored
445
ca3df80 @mmerickel emit a warning if a user is using the default hashalg to AuthTkt
mmerickel authored
446 Deprecations
447 ------------
448
39ef68d @mcdonc rearrange deck chairs
mcdonc authored
449 - ``pyramid.authentication.AuthTktAuthenticationPolicy`` will emit a warning if
450 an application is using the policy without explicitly passing a ``hashalg``
451 argument. This is because the default is "md5" which is considered
452 theoretically subject to collision attacks. If you really want "md5" then you
453 must specify it explicitly to get rid of the warning.
454
455 Documentation
456 -------------
457
458 - All of the tutorials that use
459 ``pyramid.authentication.AuthTktAuthenticationPolicy`` now explicitly pass
460 ``sha512`` as a ``hashalg`` argument.
461
ca3df80 @mmerickel emit a warning if a user is using the default hashalg to AuthTkt
mmerickel authored
462
66fe1d0 @mcdonc - Move ``TopologicalSorter`` from ``pyramid.config.util`` to ``pyrami…
mcdonc authored
463 Internals
464 ---------
465
466 - Move ``TopologicalSorter`` from ``pyramid.config.util`` to ``pyramid.util``,
467 move ``CyclicDependencyError`` from ``pyramid.config.util`` to
468 ``pyramid.exceptions``, rename ``Singleton`` to ``Sentinel`` and move from
ca46568 @mmerickel garden
mmerickel authored
469 ``pyramid.config.util`` to ``pyramid.util``; this is in an effort to
0487545 @mcdonc fix docs, upgrade tutorials, add change note, deprecate using zope.de…
mcdonc authored
470 move that stuff that may be an API one day out of ``pyramid.config.util``,
66fe1d0 @mcdonc - Move ``TopologicalSorter`` from ``pyramid.config.util`` to ``pyrami…
mcdonc authored
471 because that package should never be imported from non-Pyramid code.
472 TopologicalSorter is still not an API, but may become one.
473
39ef68d @mcdonc rearrange deck chairs
mcdonc authored
474 - Get rid of shady monkeypatching of ``pyramid.request.Request`` and
475 ``pyramid.response.Response`` done within the ``__init__.py`` of Pyramid.
476 Webob no longer relies on this being done. Instead, the ResponseClass
477 attribute of the Pyramid Request class is assigned to the Pyramid response
478 class; that's enough to satisfy WebOb and behave as it did before with the
479 monkeypatching.
480
4a6cca6 @mcdonc prep for 1.4a3
mcdonc authored
481 1.4a3 (2012-10-26)
482 ==================
d6fb001 @mcdonc - 1.4a ``pyramid.scripting.prepare`` behaved differently than 1.3 series
mcdonc authored
483
484 Bug Fixes
485 ---------
486
06a904f @mcdonc add docs and changelog note
mcdonc authored
487 - The match_param predicate's text method was fixed to sort its values.
488 Part of https://github.com/Pylons/pyramid/pull/705
489
d6fb001 @mcdonc - 1.4a ``pyramid.scripting.prepare`` behaved differently than 1.3 series
mcdonc authored
490 - 1.4a ``pyramid.scripting.prepare`` behaved differently than 1.3 series
491 function of same name. In particular, if passed a request, it would not
492 set the ``registry`` attribute of the request like 1.3 did. A symptom
493 would be that passing a request to ``pyramid.paster.bootstrap`` (which uses
494 the function) that did not have a ``registry`` attribute could assume that
495 the registry would be attached to the request by Pyramid. This assumption
496 could be made in 1.3, but not in 1.4. The assumption can now be made in
497 1.4 too (a registry is attached to a request passed to bootstrap or
498 prepare).
499
66d277a @mcdonc garden
mcdonc authored
500 - When registering a view configuration that named a Chameleon ZPT renderer
501 with a macro name in it (e.g. ``renderer='some/template#somemacro.pt``) as
043ccdd @tshepang eliminate other repeated words
tshepang authored
502 well as a view configuration without a macro name in it that pointed to the
9937a4e @chrisrossi Fix rst syntax error which prevented Sphinx docs from building.
chrisrossi authored
503 same template (e.g. ``renderer='some/template.pt'``), internal caching could
66d277a @mcdonc garden
mcdonc authored
504 confuse the two, and your code might have rendered one instead of the
505 other.
506
1273d56 @mcdonc - The Configurator ``testing_securitypolicy`` method now returns the …
mcdonc authored
507 Features
508 --------
509
c25a8fd @mcdonc - New ``physical_path`` view predicate. If specified, this value shou…
mcdonc authored
510 - Allow multiple values to be specified to the ``request_param`` view/route
511 predicate as a sequence. Previously only a single string value was allowed.
512 See https://github.com/Pylons/pyramid/pull/705
513
514 - Comments with references to documentation sections placed in scaffold
515 ``.ini`` files.
516
517 - Added an HTTP Basic authentication policy
518 at ``pyramid.authentication.BasicAuthAuthenticationPolicy``.
519
1273d56 @mcdonc - The Configurator ``testing_securitypolicy`` method now returns the …
mcdonc authored
520 - The Configurator ``testing_securitypolicy`` method now returns the policy
521 object it creates.
522
523 - The Configurator ``testing_securitypolicy`` method accepts two new
524 arguments: ``remember_result`` and ``forget_result``. If supplied, these
525 values influence the result of the policy's ``remember`` and ``forget``
526 methods, respectively.
527
528 - The DummySecurityPolicy created by ``testing_securitypolicy`` now sets a
529 ``forgotten`` value on the policy (the value ``True``) when its ``forget``
530 method is called.
531
532 - The DummySecurityPolicy created by ``testing_securitypolicy`` now sets a
533 ``remembered`` value on the policy, which is the value of the ``principal``
534 argument it's called with when its ``remember`` method is called.
535
c25a8fd @mcdonc - New ``physical_path`` view predicate. If specified, this value shou…
mcdonc authored
536 - New ``physical_path`` view predicate. If specified, this value should be a
537 string or a tuple representing the physical traversal path of the context
538 found via traversal for this predicate to match as true. For example:
539 ``physical_path='/'`` or ``physical_path='/a/b/c'`` or ``physical_path=('',
540 'a', 'b', 'c')``. This is not a path prefix match or a regex, it's a
541 whole-path match. It's useful when you want to always potentially show a
542 view when some object is traversed to, but you can't be sure about what kind
543 of object it will be, so you can't use the ``context`` predicate. The
544 individual path elements inbetween slash characters or in tuple elements
545 should be the Unicode representation of the name of the resource and should
546 not be encoded in any way.
547
072cbf7 @mcdonc prep for 1.4a2
mcdonc authored
548 1.4a2 (2012-09-27)
549 ==================
68c25d3 @mcdonc garden
mcdonc authored
550
d27bc79 @mcdonc garden
mcdonc authored
551 Bug Fixes
552 ---------
553
4388d31 @mcdonc mirror john's change for chameleon, better changelog message
mcdonc authored
554 - When trying to determine Mako defnames and Chameleon macro names in asset
555 specifications, take into account that the filename may have a hyphen in
556 it. See https://github.com/Pylons/pyramid/pull/692
d27bc79 @mcdonc garden
mcdonc authored
557
68c25d3 @mcdonc garden
mcdonc authored
558 Features
559 --------
560
561 - A new ``pyramid.session.check_csrf_token`` convenience function was added.
562
80cd0b1 @mcdonc garden
mcdonc authored
563 - A ``check_csrf`` view predicate was added. For example, you can now do
564 ``config.add_view(someview, check_csrf=True)``. When the predicate is
565 checked, if the ``csrf_token`` value in ``request.params`` matches the CSRF
566 token in the request's session, the view will be permitted to execute.
567 Otherwise, it will not be permitted to execute.
68c25d3 @mcdonc garden
mcdonc authored
568
098599b @mcdonc - Add ``Base.metadata.bind = engine`` to alchemy template, so that ta…
mcdonc authored
569 - Add ``Base.metadata.bind = engine`` to alchemy template, so that tables
570 defined imperatively will work.
571
572 Documentation
573 -------------
574
575 - update wiki2 SQLA tutorial with the changes required after inserting
576 ``Base.metadata.bind = engine`` into the alchemy scaffold.
577
ce1e86c @mcdonc prep for 1.4a1
mcdonc authored
578 1.4a1 (2012-09-16)
579 ==================
f6bd88e @mcdonc trivial change to poke jenkins (im in on an untrusted network and can…
mcdonc authored
580
a39dd2f @mcdonc - Add ``REMOTE_ADDR`` to the ``prequest`` WSGI environ dict for benef…
mcdonc authored
581 Bug Fixes
582 ---------
583
1794b4b @mcdonc note that this is a forward port
mcdonc authored
584 - Forward port from 1.3 branch: When no authentication policy was configured,
585 a call to ``pyramid.security.effective_principals`` would unconditionally
586 return the empty list. This was incorrect, it should have unconditionally
587 returned ``[Everyone]``, and now does.
8782def @mcdonc - When no authentication policy was configured, a call to
mcdonc authored
588
3074e78 @mcdonc garden
mcdonc authored
589 - Explicit url dispatch regexes can now contain colons.
590 https://github.com/Pylons/pyramid/issues/629
591
e652518 @mcdonc - On at least one 64-bit Ubuntu system under Python 3.2, using the
mcdonc authored
592 - On at least one 64-bit Ubuntu system under Python 3.2, using the
593 ``view_config`` decorator caused a ``RuntimeError: dictionary changed size
594 during iteration`` exception. It no longer does. See
595 https://github.com/Pylons/pyramid/issues/635 for more information.
596
8b26752 @blaflamme added entry to changes.txt for mako fix
blaflamme authored
597 - In Mako Templates lookup, check if the uri is already adjusted and bring
598 it back to an asset spec. Normally occurs with inherited templates or
599 included components.
600 https://github.com/Pylons/pyramid/issues/606
601 https://github.com/Pylons/pyramid/issues/607
602
7853bc0 @blaflamme garden
blaflamme authored
603 - In Mako Templates lookup, check for absolute uri (using mako directories)
604 when mixing up inheritance with asset specs.
605 https://github.com/Pylons/pyramid/issues/662
606
75a8ff4 @mmerickel updated CHANGES with accept-header bug fix
mmerickel authored
607 - HTTP Accept headers were not being normalized causing potentially
608 conflicting view registrations to go unnoticed. Two views that only
609 differ in the case ('text/html' vs. 'text/HTML') will now raise an error.
610 https://github.com/Pylons/pyramid/pull/620
611
a9289d9 @mcdonc - Forward-port from 1.3 branch: when registering multiple views with an
mcdonc authored
612 - Forward-port from 1.3 branch: when registering multiple views with an
613 ``accept`` predicate in a Pyramid application runing under Python 3, you
614 might have received a ``TypeError: unorderable types: function() <
615 function()`` exception.
616
de797c4 @mcdonc - Coverage and docs updates for custom JSON class.
mcdonc authored
617 Features
618 --------
a39dd2f @mcdonc - Add ``REMOTE_ADDR`` to the ``prequest`` WSGI environ dict for benef…
mcdonc authored
619
d246597 @mcdonc reclassify bug as feature
mcdonc authored
620 - Configurator.add_directive now accepts arbitrary callables like partials or
621 objects implementing ``__call__`` which dont have ``__name__`` and
622 ``__doc__`` attributes. See https://github.com/Pylons/pyramid/issues/621
623 and https://github.com/Pylons/pyramid/pull/647.
624
95f766b @mcdonc Subscriber predicates:
mcdonc authored
625 - Third-party custom view, route, and subscriber predicates can now be added
626 for use by view authors via
627 ``pyramid.config.Configurator.add_view_predicate``,
628 ``pyramid.config.Configurator.add_route_predicate`` and
629 ``pyramid.config.Configurator.add_subscriber_predicate``. So, for example,
0196b2a @mcdonc add docs for third-party view predicates
mcdonc authored
630 doing this::
631
632 config.add_view_predicate('abc', my.package.ABCPredicate)
633
634 Might allow a view author to do this in an application that configured that
635 predicate::
636
637 @view_config(abc=1)
638
95f766b @mcdonc Subscriber predicates:
mcdonc authored
639 Similar features exist for ``add_route``, and ``add_subscriber``. See
640 "Adding A Third Party View, Route, or Subscriber Predicate" in the Hooks
641 chapter for more information.
0196b2a @mcdonc add docs for third-party view predicates
mcdonc authored
642
735abf4 @mcdonc note conflict behavior change
mcdonc authored
643 Note that changes made to support the above feature now means that only
644 actions registered using the same "order" can conflict with one another.
645 It used to be the case that actions registered at different orders could
646 potentially conflict, but to my knowledge nothing ever depended on this
647 behavior (it was a bit silly).
648
de797c4 @mcdonc - Coverage and docs updates for custom JSON class.
mcdonc authored
649 - Custom objects can be made easily JSON-serializable in Pyramid by defining
650 a ``__json__`` method on the object's class. This method should return
651 values natively serializable by ``json.dumps`` (such as ints, lists,
652 dictionaries, strings, and so forth).
077fa3a @mcdonc add change note
mcdonc authored
653
e012aa1 @mcdonc allow __json__ and custom adapters to accept request arg
mcdonc authored
654 - The JSON renderer now allows for the definition of custom type adapters to
655 convert unknown objects to JSON serializations.
656
360f251 @mcdonc - As of this release, the ``request_method`` predicate, when used, wi…
mcdonc authored
657 - As of this release, the ``request_method`` predicate, when used, will also
658 imply that ``HEAD`` is implied when you use ``GET``. For example, using
659 ``@view_config(request_method='GET')`` is equivalent to using
561a443 @mcdonc fix example
mcdonc authored
660 ``@view_config(request_method=('GET', 'HEAD'))``. Using
360f251 @mcdonc - As of this release, the ``request_method`` predicate, when used, wi…
mcdonc authored
661 ``@view_config(request_method=('GET', 'POST')`` is equivalent to using
662 ``@view_config(request_method=('GET', 'HEAD', 'POST')``. This is because
663 HEAD is a variant of GET that omits the body, and WebOb has special support
664 to return an empty body when a HEAD is used.
15c40a1 @mcdonc readme
mcdonc authored
665
023c88b @mcdonc rename set_request_method to add_request_method. closes #683
mcdonc authored
666 - ``config.add_request_method`` has been introduced to support extending
2c25342 @mmerickel docs-deprecated set_request_property
mmerickel authored
667 request objects with arbitrary callables. This method expands on the
668 previous ``config.set_request_property`` by supporting methods as well as
669 properties. This method now causes less code to be executed at
670 request construction time than ``config.set_request_property`` in
671 version 1.3.
672
673 - Don't add a ``?`` to URLs generated by ``request.resource_url`` if the
fcb2095 @mcdonc garden
mcdonc authored
674 ``query`` argument is provided but empty.
675
2c25342 @mmerickel docs-deprecated set_request_property
mmerickel authored
676 - Don't add a ``?`` to URLs generated by ``request.route_url`` if the
fcb2095 @mcdonc garden
mcdonc authored
677 ``_query`` argument is provided but empty.
988035a @mcdonc add a change note
mcdonc authored
678
679 - The static view machinery now raises (rather than returns) ``HTTPNotFound``
680 and ``HTTPMovedPermanently`` exceptions, so these can be caught by the
cec2b05 @tshepang consistency
tshepang authored
681 Not Found View (and other exception views).
ea009a6 @blaflamme added docs and changes for using defs in mako renderer
blaflamme authored
682
54d3e3e @mcdonc add a whatsnew-1.4 document
mcdonc authored
683 - The Mako renderer now supports a def name in an asset spec. When the def
8b55a68 @mcdonc garden
mcdonc authored
684 name is present in the asset spec, the system will render the template def
685 within the template and will return the result. An example asset spec is
686 ``package:path/to/template#defname.mako``. This will render the def named
54d3e3e @mcdonc add a whatsnew-1.4 document
mcdonc authored
687 ``defname`` inside the ``template.mako`` template instead of rendering the
688 entire template. The old way of returning a tuple in the form
689 ``('defname', {})`` from the view is supported for backward compatibility,
8b55a68 @mcdonc garden
mcdonc authored
690
691 - The Chameleon ZPT renderer now accepts a macro name in an asset spec. When
692 the macro name is present in the asset spec, the system will render the
693 macro listed as a ``define-macro`` and return the result instead of
694 rendering the entire template. An example asset spec:
695 ``package:path/to/template#macroname.pt``. This will render the macro
696 defined as ``macroname`` within the ``template.pt`` template instead of the
697 entire templae.
61a57ea @mcdonc - When there is a predicate mismatch exception (seen when no view mat…
mcdonc authored
698
699 - When there is a predicate mismatch exception (seen when no view matches for
700 a given request due to predicates not working), the exception now contains
701 a textual description of the predicate which didn't match.
6b180cb @mcdonc - An ``add_permission`` directive method was added to the Configurato…
mcdonc authored
702
703 - An ``add_permission`` directive method was added to the Configurator. This
704 directive registers a free-standing permission introspectable into the
705 Pyramid introspection system. Frameworks built atop Pyramid can thus use
08c2217 @tshepang eliminate repeated "the" words
tshepang authored
706 the ``permissions`` introspectable category data to build a
6b180cb @mcdonc - An ``add_permission`` directive method was added to the Configurato…
mcdonc authored
707 comprehensive list of permissions supported by a running system. Before
708 this method was added, permissions were already registered in this
709 introspectable category as a side effect of naming them in an ``add_view``
710 call, this method just makes it possible to arrange for a permission to be
711 put into the ``permissions`` introspectable category without naming it
712 along with an associated view. Here's an example of usage of
713 ``add_permission``::
714
715 config = Configurator()
716 config.add_permission('view')
2c25342 @mmerickel docs-deprecated set_request_property
mmerickel authored
717
45b6e19 @mmerickel added cookie session changes to CHANGES.txt
mmerickel authored
718 - The ``UnencryptedCookieSessionFactoryConfig`` now accepts
719 ``signed_serialize`` and ``signed_deserialize`` hooks which may be used
720 to influence how the sessions are marshalled (by default this is done
721 with HMAC+pickle).
722
28dba04 @mcdonc - ``pyramid.testing.DummyRequest`` now supports methods supplied by the
mcdonc authored
723 - ``pyramid.testing.DummyRequest`` now supports methods supplied by the
724 ``pyramid.util.InstancePropertyMixin`` class such as ``set_property``.
725
7359873 @mcdonc - Request properties and methods added via ``config.set_request_prope…
mcdonc authored
726 - Request properties and methods added via ``config.set_request_property`` or
727 ``config.add_request_method`` are now available to tweens.
728
729 - Request properties and methods added via ``config.set_request_property`` or
730 ``config.add_request_method`` are now available in the request object
731 returned from ``pyramid.paster.bootstrap``.
732
dc8b49f @mcdonc garden
mcdonc authored
733 - ``request.context`` of environment request during ``bootstrap`` is now the
734 root object if a context isn't already set on a provided request.
735
07cb8f0 @mcdonc add pyramid.decorator.reify as an API. Closes #682
mcdonc authored
736 - The ``pyramid.decorator.reify`` function is now an API, and was added to
737 the API documentation.
738
97150cc @mcdonc merge jinty's testConfig code
mcdonc authored
739 - Added the ``pyramid.testing.testConfig`` context manager, which can be used
740 to generate a configurator in a test, e.g. ``with testing.testConfig(...):``.
741
64452ed @mcdonc rename subrequest to invoke_subrequest
mcdonc authored
742 - Users can now invoke a subrequest from within view code using a new
743 ``request.invoke_subrequest`` API.
37d2c22 @mcdonc docs and test
mcdonc authored
744
2c25342 @mmerickel docs-deprecated set_request_property
mmerickel authored
745 Deprecations
746 ------------
747
9cdb286 @mcdonc readd set_request_property to docs (just so when people run across it…
mcdonc authored
748 - The ``pyramid.config.Configurator.set_request_property`` has been
749 documentation-deprecated. The method remains usable but the more
023c88b @mcdonc rename set_request_method to add_request_method. closes #683
mcdonc authored
750 featureful ``pyramid.config.Configurator.add_request_method`` should be
9cdb286 @mcdonc readd set_request_property to docs (just so when people run across it…
mcdonc authored
751 used in its place (it has all of the same capabilities but can also extend
752 the request object with methods).
ebcdc7c @mcdonc - It is no longer possible to pass an environ dictionary directly to
mcdonc authored
753
754 Backwards Incompatibilities
755 ---------------------------
756
25d3ddf @mcdonc garden
mcdonc authored
757 - The Pyramid router no longer adds the values ``bfg.routes.route`` or
ebcdc7c @mcdonc - It is no longer possible to pass an environ dictionary directly to
mcdonc authored
758 ``bfg.routes.matchdict`` to the request's WSGI environment dictionary.
759 These values were docs-deprecated in ``repoze.bfg`` 1.0 (effectively seven
760 minor releases ago). If your code depended on these values, use
761 request.matched_route and request.matchdict instead.
762
763 - It is no longer possible to pass an environ dictionary directly to
764 ``pyramid.traversal.ResourceTreeTraverser.__call__`` (aka
765 ``ModelGraphTraverser.__call__``). Instead, you must pass a request
766 object. Passing an environment instead of a request has generated a
767 deprecation warning since Pyramid 1.1.
768
769 - Pyramid will no longer work properly if you use the
770 ``webob.request.LegacyRequest`` as a request factory. Instances of the
771 LegacyRequest class have a ``request.path_info`` which return a string.
772 This Pyramid release assumes that ``request.path_info`` will
773 unconditionally be Unicode.
774
3d42722 @mcdonc - The functions from ``pyramid.chameleon_zpt`` and ``pyramid.chameleo…
mcdonc authored
775 - The functions from ``pyramid.chameleon_zpt`` and ``pyramid.chameleon_text``
776 named ``get_renderer``, ``get_template``, ``render_template``, and
777 ``render_template_to_response`` have been removed. These have issued a
778 deprecation warning upon import since Pyramid 1.0. Use
779 ``pyramid.renderers.get_renderer()``,
780 ``pyramid.renderers.get_renderer().implementation()``,
781 ``pyramid.renderers.render()`` or ``pyramid.renderers.render_to_response``
782 respectively instead of these functions.
783
94a6f35 @mcdonc - The ``pyramid.configuration`` module was removed. It had been depre…
mcdonc authored
784 - The ``pyramid.configuration`` module was removed. It had been deprecated
785 since Pyramid 1.0 and printed a deprecation warning upon its use. Use
786 ``pyramid.config`` instead.
787
b274d05 @mcdonc - The ``pyramid.paster.PyramidTemplate`` API was removed. It had been
mcdonc authored
788 - The ``pyramid.paster.PyramidTemplate`` API was removed. It had been
789 deprecated since Pyramid 1.1 and issued a warning on import. If your code
790 depended on this, adjust your code to import
791 ``pyramid.scaffolds.PyramidTemplate`` instead.
792
ef2e517 @mcdonc - The ``pyramid.settings.get_settings()`` API was removed. It had been
mcdonc authored
793 - The ``pyramid.settings.get_settings()`` API was removed. It had been
794 printing a deprecation warning since Pyramid 1.0. If your code depended on
795 this API, use ``pyramid.threadlocal.get_current_registry().settings``
796 instead or use the ``settings`` attribute of the registry available from
797 the request (``request.registry.settings``).
798
69e0aad @mcdonc - These APIs from the ``pyramid.testing`` module were removed. They have
mcdonc authored
799 - These APIs from the ``pyramid.testing`` module were removed. They have
800 been printing deprecation warnings since Pyramid 1.0:
801
802 * ``registerDummySecurityPolicy``, use
803 ``pyramid.config.Configurator.testing_securitypolicy`` instead.
804
805 * ``registerResources`` (aka ``registerModels``, use
806 ``pyramid.config.Configurator.testing_resources`` instead.
807
808 * ``registerEventListener``, use
809 ``pyramid.config.Configurator.testing_add_subscriber`` instead.
810
811 * ``registerTemplateRenderer`` (aka `registerDummyRenderer``), use
812 ``pyramid.config.Configurator.testing_add_template`` instead.
813
814 * ``registerView``, use ``pyramid.config.Configurator.add_view`` instead.
815
816 * ``registerUtility``, use
817 ``pyramid.config.Configurator.registry.registerUtility`` instead.
818
819 * ``registerAdapter``, use
820 ``pyramid.config.Configurator.registry.registerAdapter`` instead.
821
822 * ``registerSubscriber``, use
823 ``pyramid.config.Configurator.add_subscriber`` instead.
824
825 * ``registerRoute``, use
826 ``pyramid.config.Configurator.add_route`` instead.
827
828 * ``registerSettings``, use
829 ``pyramid.config.Configurator.add_settings`` instead.
830
64452ed @mcdonc rename subrequest to invoke_subrequest
mcdonc authored
831 - In Pyramid 1.3 and previous, the ``__call__`` method of a Response object
832 was invoked before any finished callbacks were executed. As of this
833 release, the ``__call__`` method of a Response object is invoked *after*
834 finished callbacks are executed. This is in support of the
835 ``request.invoke_subrequest`` feature.
836
b72ba1a @mcdonc add upgrading chapter, make docs render again
mcdonc authored
837 Documentation
838 -------------
839
840 - Added an "Upgrading Pyramid" chapter to the narrative documentation. It
07cb8f0 @mcdonc add pyramid.decorator.reify as an API. Closes #682
mcdonc authored
841 describes how to cope with deprecations and removals of Pyramid APIs and
842 how to show Pyramid-generated deprecation warnings while running tests and
843 while running a server.
b72ba1a @mcdonc add upgrading chapter, make docs render again
mcdonc authored
844
37d2c22 @mcdonc docs and test
mcdonc authored
845 - Added a "Invoking a Subrequest" chapter to the documentation. It describes
64452ed @mcdonc rename subrequest to invoke_subrequest
mcdonc authored
846 how to use the new ``request.invoke_subrequest`` API.
37d2c22 @mcdonc docs and test
mcdonc authored
847
ebcdc7c @mcdonc - It is no longer possible to pass an environ dictionary directly to
mcdonc authored
848 Dependencies
849 ------------
850
851 - Pyramid now requires WebOb 1.2b3+ (the prior Pyramid release only relied on
852 1.2dev+). This is to ensure that we obtain a version of WebOb that returns
853 ``request.path_info`` as text.
854
Something went wrong with that request. Please try again.