Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 651 lines (498 sloc) 28.565 kB
2c205f7 @mcdonc prep for 1.5a4 release
mcdonc authored
1 1.5a4 (2014-01-28)
2 ==================
6b0d6ff @mcdonc put change note in the right release section
mcdonc authored
3
4803666 @blaflamme updated changes
blaflamme authored
4 Features
5 --------
6
7 - Updated scaffolds with new theme, fixed documentation and sample project.
8
6b0d6ff @mcdonc put change note in the right release section
mcdonc authored
9 Bug Fixes
10 ---------
11
e2600da @bertjwregeer Update CHANGES
bertjwregeer authored
12 - Depend on a newer version of WebOb so that we pull in some crucial bug-fixes
13 that were showstoppers for functionality in Pyramid.
14
6b0d6ff @mcdonc put change note in the right release section
mcdonc authored
15 - Add a trailing semicolon to the JSONP response. This fixes JavaScript syntax
16 errors for old IE versions. See https://github.com/Pylons/pyramid/pull/1205
17
f58977a @mcdonc - Fix a memory leak when the configurator's ``set_request_property`` …
mcdonc authored
18 - Fix a memory leak when the configurator's ``set_request_property`` method was
19 used or when the configurator's ``add_request_method`` method was used with
20 the ``property=True`` attribute. See
21 https://github.com/Pylons/pyramid/issues/1212 .
22
5c4318a @mcdonc prep for 1.5a3
mcdonc authored
23 1.5a3 (2013-12-10)
24 ==================
5065a51 @pauleveritt Added a note to CHANGES.txt, push the quick tutorial.
pauleveritt authored
25
ba419e5 @mmerickel update changelog
mmerickel authored
26 Features
27 --------
28
0dcd56c @mcdonc undeprecate remember/forget functions and remove remember_userid/forg…
mcdonc authored
29 - An authorization API has been added as a method of the
30 request: ``request.has_permission``.
0184b52 @mcdonc Bring change log, API docs, and deprecations in line with normal poli…
mcdonc authored
31
32 ``request.has_permission`` is a method-based alternative to the
33 ``pyramid.security.has_permission`` API and works exactly the same. The
34 older API is now deprecated.
35
36 - Property API attributes have been added to the request for easier access to
37 authentication data: ``request.authenticated_userid``,
38 ``request.unauthenticated_userid``, and ``request.effective_principals``.
39
40 These are analogues, respectively, of
41 ``pyramid.security.authenticated_userid``,
42 ``pyramid.security.unauthenticated_userid``, and
43 ``pyramid.security.effective_principals``. They operate exactly the same,
44 except they are attributes of the request instead of functions accepting a
45 request. They are properties, so they cannot be assigned to. The older
46 function-based APIs are now deprecated.
3c2f95e @mgrbyte Security APIs on pyramid.request.Request
mgrbyte authored
47
ba419e5 @mmerickel update changelog
mmerickel authored
48 - Pyramid's console scripts (``pserve``, ``pviews``, etc) can now be run
49 directly, allowing custom arguments to be sent to the python interpreter
50 at runtime. For example::
51
52 python -3 -m pyramid.scripts.pserve development.ini
53
6b0889c @mmerickel update doc references
mmerickel authored
54 - Added a specific subclass of ``HTTPBadRequest`` named
55 ``pyramid.exceptions.BadCSRFToken`` which will now be raised in response
56 to failures in ``check_csrf_token``.
57 See https://github.com/Pylons/pyramid/pull/1149
58
63bf058 @mmerickel updated changelog
mmerickel authored
59 - Added a new ``SignedCookieSessionFactory`` which is very similar to the
ab579e2 @mcdonc add note about non-bw-compat between SignedCookieSessionFactory and U…
mcdonc authored
60 ``UnencryptedCookieSessionFactoryConfig`` but with a clearer focus on signing
61 content. The custom serializer arguments to this function should only focus
62 on serializing, unlike its predecessor which required the serializer to also
63 perform signing. See https://github.com/Pylons/pyramid/pull/1142 . Note
64 that cookies generated using ``SignedCookieSessionFactory`` are not
65 compatible with cookies generated using ``UnencryptedCookieSessionFactory``,
66 so existing user session data will be destroyed if you switch to it.
63bf058 @mmerickel updated changelog
mmerickel authored
67
68 - Added a new ``BaseCookieSessionFactory`` which acts as a generic cookie
69 factory that can be used by framework implementors to create their own
70 session implementations. It provides a reusable API which focuses strictly
71 on providing a dictionary-like object that properly handles renewals,
72 timeouts, and conformance with the ``ISession`` API.
8385569 @mmerickel reference github issues
mmerickel authored
73 See https://github.com/Pylons/pyramid/pull/1142
63bf058 @mmerickel updated changelog
mmerickel authored
74
06aee8b @mcdonc change the behavior of parse_url_overrides and resource_url to not qu…
mcdonc authored
75 - The anchor argument to ``pyramid.request.Request.route_url`` and
76 ``pyramid.request.Request.resource_url`` and their derivatives will now be
ca419fb @mcdonc revert my reversion
mcdonc authored
77 escaped via URL quoting to ensure minimal conformance. See
06aee8b @mcdonc change the behavior of parse_url_overrides and resource_url to not qu…
mcdonc authored
78 https://github.com/Pylons/pyramid/pull/1183
a3654e4 @mmerickel update docs
mmerickel authored
79
80 - Allow sending of ``_query`` and ``_anchor`` options to
81 ``pyramid.request.Request.static_url`` when an external URL is being
82 generated.
83 See https://github.com/Pylons/pyramid/pull/1183
84
06aee8b @mcdonc change the behavior of parse_url_overrides and resource_url to not qu…
mcdonc authored
85 - You can now send a string as the ``_query`` argument to
86 ``pyramid.request.Request.route_url`` and
87 ``pyramid.request.Request.resource_url`` and their derivatives. When a
ca419fb @mcdonc revert my reversion
mcdonc authored
88 string is sent instead of a list or dictionary. it is URL-quoted however it
89 does not need to be in ``k=v`` form. This is useful if you want to be able
90 to use a different query string format than ``x-www-form-urlencoded``. See
91 https://github.com/Pylons/pyramid/pull/1183
06aee8b @mcdonc change the behavior of parse_url_overrides and resource_url to not qu…
mcdonc authored
92
767e44f @mcdonc use CookieProfile from webob in authentication module, add support fo…
mcdonc authored
93 - ``pyramid.testing.DummyRequest`` now has a ``domain`` attribute to match the
94 new WebOb 1.3 API. Its value is ``example.com``.
95
073e524 @mcdonc - Fix the ``pcreate`` script so that when the target directory name e…
mcdonc authored
96 Bug Fixes
97 ---------
98
4803666 @blaflamme updated changes
blaflamme authored
99 - Fix the ``pcreate`` script so that when the target directory name ends with a
100 slash it does not produce a non-working project directory structure.
101 Previously saying ``pcreate -s starter /foo/bar/`` produced different output
073e524 @mcdonc - Fix the ``pcreate`` script so that when the target directory name e…
mcdonc authored
102 than saying ``pcreate -s starter /foo/bar``. The former did not work
103 properly.
104
4803666 @blaflamme updated changes
blaflamme authored
105 - Fix the ``principals_allowed_by_permission`` method of
106 ``ACLAuthorizationPolicy`` so it anticipates a callable ``__acl__``
678f49d @mcdonc - Fix the ``principals_allowed_by_permission`` method of
mcdonc authored
107 on resources. Previously it did not try to call the ``__acl__``
108 if it was callable.
109
97f3660 @mmerickel set custom request methods when doing a pview lookup
mmerickel authored
110 - The ``pviews`` script did not work when a url required custom request
111 methods in order to perform traversal. Custom methods and descriptors added
112 via ``pyramid.config.Configurator.add_request_method`` will now be present,
113 allowing traversal to continue.
114 See https://github.com/Pylons/pyramid/issues/1104
115
4223668 @mcdonc remove unused renderer arg
mcdonc authored
116 - Remove unused ``renderer`` argument from ``Configurator.add_route``.
117
42f0cb2 @mmerickel update changelog
mmerickel authored
118 - Allow the ``BasicAuthenticationPolicy`` to work with non-ascii usernames
119 and passwords. The charset is not passed as part of the header and different
120 browsers alternate between UTF-8 and Latin-1, so the policy now attempts
121 to decode with UTF-8 first, and will fallback to Latin-1.
122 See https://github.com/Pylons/pyramid/pull/1170
123
6422390 @mmerickel update changelog
mmerickel authored
124 - The ``@view_defaults`` now apply to notfound and forbidden views
125 that are defined as methods of a decorated class.
126 See https://github.com/Pylons/pyramid/issues/1173
127
5065a51 @pauleveritt Added a note to CHANGES.txt, push the quick tutorial.
pauleveritt authored
128 Documentation
129 -------------
130
131 - Added a "Quick Tutorial" to go with the Quick Tour
132
4803666 @blaflamme updated changes
blaflamme authored
133 - Removed mention of ``pyramid_beaker`` from docs. Beaker is no longer
66be39b @mcdonc - Removed mention of ``pyramid_beaker`` from docs. Beaker is no longer
mcdonc authored
134 maintained. Point people at ``pyramid_redis_sessions`` instead.
135
b04ae5a @mmerickel modify the docs for the renderer interfaces
mmerickel authored
136 - Add documentation for ``pyramid.interfaces.IRendererFactory`` and
137 ``pyramid.interfaces.IRenderer``.
138
af5fa07 @mmerickel support a None value in query string parameters
mmerickel authored
139 Backwards Incompatibilities
140 ---------------------------
141
142 - The key/values in the ``_query`` parameter of ``request.route_url`` and the
143 ``query`` parameter of ``request.resource_url`` (and their variants), used
144 to encode a value of ``None`` as the string ``'None'``, leaving the resulting
145 query string to be ``a=b&key=None``. The value is now dropped in this
79d9d68 @mcdonc correct the explanation of the behavior change
mcdonc authored
146 situation, leaving a query string of ``a=b&key=``.
af5fa07 @mmerickel support a None value in query string parameters
mmerickel authored
147 See https://github.com/Pylons/pyramid/issues/1119
148
b04ae5a @mmerickel modify the docs for the renderer interfaces
mmerickel authored
149 Deprecations
150 ------------
151
d7550c4 @mcdonc fix merge conflict and prevent warning from showing up during testing…
mcdonc authored
152 - Deprecate the ``pyramid.interfaces.ITemplateRenderer`` interface. It was
153 ill-defined and became unused when Mako and Chameleon template bindings were
154 split into their own packages.
155
4803666 @blaflamme updated changes
blaflamme authored
156 - The ``pyramid.session.UnencryptedCookieSessionFactoryConfig`` API has been
157 deprecated and is superseded by the
d79087c @mcdonc rewording about deprecation and cookie compatibility
mcdonc authored
158 ``pyramid.session.SignedCookieSessionFactory``. Note that while the cookies
159 generated by the ``UnencryptedCookieSessionFactoryConfig``
160 are compatible with cookies generated by old releases, cookies generated by
4803666 @blaflamme updated changes
blaflamme authored
161 the SignedCookieSessionFactory are not. See
d79087c @mcdonc rewording about deprecation and cookie compatibility
mcdonc authored
162 https://github.com/Pylons/pyramid/pull/1142
b04ae5a @mmerickel modify the docs for the renderer interfaces
mmerickel authored
163
0184b52 @mcdonc Bring change log, API docs, and deprecations in line with normal poli…
mcdonc authored
164 - The ``pyramid.security.has_permission`` API is now deprecated. Instead, use
165 the newly-added ``has_permission`` method of the request object.
166
167 - The ``pyramid.security.effective_principals`` API is now deprecated.
168 Instead, use the newly-added ``effective_principals`` attribute of the
169 request object.
170
171 - The ``pyramid.security.authenticated_userid`` API is now deprecated.
172 Instead, use the newly-added ``authenticated_userid`` attribute of the
173 request object.
174
175 - The ``pyramid.security.unauthenticated_userid`` API is now deprecated.
176 Instead, use the newly-added ``unauthenticated_userid`` attribute of the
177 request object.
178
767e44f @mcdonc use CookieProfile from webob in authentication module, add support fo…
mcdonc authored
179 Dependencies
180 ------------
181
182 - Pyramid now depends on WebOb>=1.3 (it uses ``webob.cookies.CookieProfile``
183 from 1.3+).
184
78b41e5 @mcdonc prep for 1.5a2
mcdonc authored
185 1.5a2 (2013-09-22)
186 ==================
f6f1d16 @mmerickel remove the deprecated request.response_* attributes
mmerickel authored
187
c390f4b @bertjwregeer Add feature update to CHANGES.txt
bertjwregeer authored
188 Features
189 --------
190
cbcd4d2 @mcdonc wording
mcdonc authored
191 - Users can now provide dotted Python names to as the ``factory`` argument
4803666 @blaflamme updated changes
blaflamme authored
192 the Configurator methods named ``add_{view,route,subscriber}_predicate``
193 (instead of passing the predicate factory directly, you can pass a
cbcd4d2 @mcdonc wording
mcdonc authored
194 dotted name which refers to the factory).
c390f4b @bertjwregeer Add feature update to CHANGES.txt
bertjwregeer authored
195
c062d5a @dhellmann Update package_name() to work with namespace pkgs
dhellmann authored
196 Bug Fixes
197 ---------
198
f504ccc @mcdonc add change notes
mcdonc authored
199 - Fix an exception in ``pyramid.path.package_name`` when resolving the package
200 name for namespace packages that had no ``__file__`` attribute.
c062d5a @dhellmann Update package_name() to work with namespace pkgs
dhellmann authored
201
f6f1d16 @mmerickel remove the deprecated request.response_* attributes
mmerickel authored
202 Backwards Incompatibilities
203 ---------------------------
204
0778eea @mcdonc better description of mako/chameleon bw incompat in changelog, update…
mcdonc authored
205 - Pyramid no longer depends on or configures the Mako and Chameleon templating
206 system renderers by default. Disincluding these templating systems by
207 default means that the Pyramid core has fewer dependencies and can run on
208 future platforms without immediate concern for the compatibility of its
209 templating add-ons. It also makes maintenance slightly more effective, as
210 different people can maintain the templating system add-ons that they
211 understand and care about without needing commit access to the Pyramid core,
212 and it allows users who just don't want to see any packages they don't use
213 come along for the ride when they install Pyramid.
82f9702 @mmerickel update changelog
mmerickel authored
214
0778eea @mcdonc better description of mako/chameleon bw incompat in changelog, update…
mcdonc authored
215 This means that upon upgrading to Pyramid 1.5a2+, projects that use either
216 of these templating systems will see a traceback that ends something like
217 this when their application attempts to render a Chameleon or Mako template::
218
219 ValueError: No such renderer factory .pt
220
221 Or::
222
223 ValueError: No such renderer factory .mako
224
225 Or::
226
227 ValueError: No such renderer factory .mak
228
4803666 @blaflamme updated changes
blaflamme authored
229 Support for Mako templating has been moved into an add-on package named
230 ``pyramid_mako``, and support for Chameleon templating has been moved into
231 an add-on package named ``pyramid_chameleon``. These packages are drop-in
232 replacements for the old built-in support for these templating langauges.
0778eea @mcdonc better description of mako/chameleon bw incompat in changelog, update…
mcdonc authored
233 All you have to do is install them and make them active in your configuration
234 to register renderer factories for ``.pt`` and/or ``.mako`` (or ``.mak``) to
235 make your application work again.
236
237 To re-add support for Chameleon and/or Mako template renderers into your
238 existing projects, follow the below steps.
239
240 If you depend on Mako templates:
241
242 * Make sure the ``pyramid_mako`` package is installed. One way to do this
243 is by adding ``pyramid_mako`` to the ``install_requires`` section of your
244 package's ``setup.py`` file and afterwards rerunning ``setup.py develop``::
ce138c8 @mmerickel add install_requires example as well
mmerickel authored
245
246 setup(
247 #...
248 install_requires=[
249 'pyramid_mako', # new dependency
250 'pyramid',
251 #...
252 ],
253 )
82f9702 @mmerickel update changelog
mmerickel authored
254
4803666 @blaflamme updated changes
blaflamme authored
255 * Within the portion of your application which instantiates a Pyramid
256 ``pyramid.config.Configurator`` (often the ``main()`` function in
257 your project's ``__init__.py`` file), tell Pyramid to include the
0778eea @mcdonc better description of mako/chameleon bw incompat in changelog, update…
mcdonc authored
258 ``pyramid_mako`` includeme::
82f9702 @mmerickel update changelog
mmerickel authored
259
0778eea @mcdonc better description of mako/chameleon bw incompat in changelog, update…
mcdonc authored
260 config = Configurator(.....)
82f9702 @mmerickel update changelog
mmerickel authored
261 config.include('pyramid_mako')
262
0778eea @mcdonc better description of mako/chameleon bw incompat in changelog, update…
mcdonc authored
263 If you depend on Chameleon templates:
9ed074e @mmerickel add example of rendering to the changelog
mmerickel authored
264
0778eea @mcdonc better description of mako/chameleon bw incompat in changelog, update…
mcdonc authored
265 * Make sure the ``pyramid_chameleon`` package is installed. One way to do
266 this is by adding ``pyramid_chameleon`` to the ``install_requires`` section
4803666 @blaflamme updated changes
blaflamme authored
267 of your package's ``setup.py`` file and afterwards rerunning
0778eea @mcdonc better description of mako/chameleon bw incompat in changelog, update…
mcdonc authored
268 ``setup.py develop``::
9ed074e @mmerickel add example of rendering to the changelog
mmerickel authored
269
0778eea @mcdonc better description of mako/chameleon bw incompat in changelog, update…
mcdonc authored
270 setup(
271 #...
272 install_requires=[
273 'pyramid_chameleon', # new dependency
274 'pyramid',
275 #...
276 ],
277 )
278
4803666 @blaflamme updated changes
blaflamme authored
279 * Within the portion of your application which instantiates a Pyramid
280 ``~pyramid.config.Configurator`` (often the ``main()`` function in
281 your project's ``__init__.py`` file), tell Pyramid to include the
0778eea @mcdonc better description of mako/chameleon bw incompat in changelog, update…
mcdonc authored
282 ``pyramid_chameleon`` includeme::
283
284 config = Configurator(.....)
285 config.include('pyramid_chameleon')
82f9702 @mmerickel update changelog
mmerickel authored
286
0778eea @mcdonc better description of mako/chameleon bw incompat in changelog, update…
mcdonc authored
287 Note that it's also fine to install these packages into *older* Pyramids for
288 forward compatibility purposes. Even if you don't upgrade to Pyramid 1.5
289 immediately, performing the above steps in a Pyramid 1.4 installation is
290 perfectly fine, won't cause any difference, and will give you forward
291 compatibility when you eventually do upgrade to Pyramid 1.5.
292
293 With the removal of Mako and Chameleon support from the core, some
4803666 @blaflamme updated changes
blaflamme authored
294 unit tests that use the ``pyramid.renderers.render*`` methods may begin to
295 fail. If any of your unit tests are invoking either
0778eea @mcdonc better description of mako/chameleon bw incompat in changelog, update…
mcdonc authored
296 ``pyramid.renderers.render()`` or ``pyramid.renderers.render_to_response()``
4803666 @blaflamme updated changes
blaflamme authored
297 with either Mako or Chameleon templates then the
0778eea @mcdonc better description of mako/chameleon bw incompat in changelog, update…
mcdonc authored
298 ``pyramid.config.Configurator`` instance in effect during
299 the unit test should be also be updated to include the addons, as shown
300 above. For example::
301
302 class ATest(unittest.TestCase):
303 def setUp(self):
304 self.config = pyramid.testing.setUp()
305 self.config.include('pyramid_mako')
306
307 def test_it(self):
308 result = pyramid.renderers.render('mypkg:templates/home.mako', {})
309
310 Or::
311
312 class ATest(unittest.TestCase):
313 def setUp(self):
314 self.config = pyramid.testing.setUp()
315 self.config.include('pyramid_chameleon')
316
317 def test_it(self):
318 result = pyramid.renderers.render('mypkg:templates/home.pt', {})
319
320 - If you're using the Pyramid debug toolbar, when you upgrade Pyramid to
4803666 @blaflamme updated changes
blaflamme authored
321 1.5a2+, you'll also need to upgrade the ``pyramid_debugtoolbar`` package to
322 at least version 1.0.8, as older toolbar versions are not compatible with
323 Pyramid 1.5a2+ due to the removal of Mako support from the core. It's
0778eea @mcdonc better description of mako/chameleon bw incompat in changelog, update…
mcdonc authored
324 fine to use this newer version of the toolbar code with older Pyramids too.
ec0c5ca @mcdonc add note about requiring a later pyramid_debugtoolbar package if you …
mcdonc authored
325
f6f1d16 @mmerickel remove the deprecated request.response_* attributes
mmerickel authored
326 - Removed the ``request.response_*`` varying attributes. These attributes
327 have been deprecated since Pyramid 1.1, and as per the deprecation policy,
328 have now been removed.
329
4803666 @blaflamme updated changes
blaflamme authored
330 - ``request.response`` will no longer be mutated when using the
331 ``pyramid.renderers.render()`` API. Almost all renderers mutate the
fbdc3a0 @mmerickel s/view execution machinery/generating a response/
mmerickel authored
332 ``request.response`` response object (for example, the JSON renderer sets
333 ``request.response.content_type`` to ``application/json``), but this is
334 only necessary when the renderer is generating a response; it was a bug
335 when it was done as a side effect of calling ``pyramid.renderers.render()``.
3803d92 @mmerickel update render() to preserve the original response object
mmerickel authored
336
f504ccc @mcdonc add change notes
mcdonc authored
337 - Removed the ``bfg2pyramid`` fixer script.
338
4803666 @blaflamme updated changes
blaflamme authored
339 - The ``pyramid.events.NewResponse`` event is now sent **after** response
fc477b2 @mcdonc - The ``pyramid.events.NewResponse`` event is now sent **after** resp…
mcdonc authored
340 callbacks are executed. It previously executed before response callbacks
341 were executed. Rationale: it's more useful to be able to inspect the response
342 after response callbacks have done their jobs instead of before.
343
2c4f4e3 @mcdonc - Removed the class named ``pyramid.view.static`` that had been depre…
mcdonc authored
344 - Removed the class named ``pyramid.view.static`` that had been deprecated
345 since Pyramid 1.1. Instead use ``pyramid.static.static_view`` with
346 ``use_subpath=True`` argument.
347
780bbf9 @mcdonc - Removed the ``pyramid.view.is_response`` function that had been dep…
mcdonc authored
348 - Removed the ``pyramid.view.is_response`` function that had been deprecated
349 since Pyramid 1.1. Use the ``pyramid.request.Request.is_response`` method
350 instead.
351
fdf30b3 @mcdonc - Removed the ability to pass the following arguments to
mcdonc authored
352 - Removed the ability to pass the following arguments to
6c42933 @mcdonc typo
mcdonc authored
353 ``pyramid.config.Configurator.add_route``: ``view``, ``view_context``.
fdf30b3 @mcdonc - Removed the ability to pass the following arguments to
mcdonc authored
354 ``view_for``, ``view_permission``, ``view_renderer``, and ``view_attr``.
355 Using these arguments had been deprecated since Pyramid 1.1. Instead of
356 passing view-related arguments to ``add_route``, use a separate call to
357 ``pyramid.config.Configurator.add_view`` to associate a view with a route
358 using its ``route_name`` argument. Note that this impacts the
359 ``pyramid.config.Configurator.add_static_view`` function too, because it
360 delegates to ``add_route``.
361
8fe57d8 @mcdonc - Removed the ability to influence and query a ``pyramid.request.Requ…
mcdonc authored
362 - Removed the ability to influence and query a ``pyramid.request.Request``
363 object as if it were a dictionary. Previously it was possible to use methods
364 like ``__getitem__``, ``get``, ``items``, and other dictlike methods to
365 access values in the WSGI environment. This behavior had been deprecated
366 since Pyramid 1.1. Use methods of ``request.environ`` (a real dictionary)
367 instead.
368
95e9711 @mcdonc - Removed ancient backwards compatibily hack in
mcdonc authored
369 - Removed ancient backwards compatibily hack in
370 ``pyramid.traversal.DefaultRootFactory`` which populated the ``__dict__`` of
371 the factory with the matchdict values for compatibility with BFG 0.9.
372
c6601f7 @mcdonc - The ``renderer_globals_factory`` argument to the
mcdonc authored
373 - The ``renderer_globals_factory`` argument to the
374 ``pyramid.config.Configurator` constructor and its ``setup_registry`` method
375 has been removed. The ``set_renderer_globals_factory`` method of
376 ``pyramid.config.Configurator`` has also been removed. The (internal)
377 ``pyramid.interfaces.IRendererGlobals`` interface was also removed. These
378 arguments, methods and interfaces had been deprecated since 1.1. Use a
379 ``BeforeRender`` event subscriber as documented in the "Hooks" chapter of the
380 Pyramid narrative documentation instead of providing renderer globals values
381 to the configurator.
382
75f3857 @mcdonc - The ``pyramid.config.Configurator.set_request_property`` method now…
mcdonc authored
383 Deprecations
384 ------------
385
386 - The ``pyramid.config.Configurator.set_request_property`` method now issues
387 a deprecation warning when used. It had been docs-deprecated in 1.4
388 but did not issue a deprecation warning when used.
389
00bb95f @mcdonc prep for 1.5a1
mcdonc authored
390 1.5a1 (2013-08-30)
391 ==================
2d93140 @mmerickel support acl as a callable
mmerickel authored
392
393 Features
394 --------
395
c5ed549 @mcdonc add HTTPSuccessful base class, allowing HTTPOk to be caught independe…
mcdonc authored
396 - A new http exception subclass named ``pyramid.httpexceptions.HTTPSuccessful``
397 was added. You can use this class as the ``context`` of an exception
4803666 @blaflamme updated changes
blaflamme authored
398 view to catch all 200-series "exceptions" (e.g. "raise HTTPOk"). This
c5ed549 @mcdonc add HTTPSuccessful base class, allowing HTTPOk to be caught independe…
mcdonc authored
399 also allows you to catch *only* the ``HTTPOk`` exception itself; previously
4803666 @blaflamme updated changes
blaflamme authored
400 this was impossible because a number of other exceptions
c5ed549 @mcdonc add HTTPSuccessful base class, allowing HTTPOk to be caught independe…
mcdonc authored
401 (such as ``HTTPNoContent``) inherited from ``HTTPOk``, but now they do not.
402
0a4aed1 @mcdonc documentation for hybrid url generation
mcdonc authored
403 - You can now generate "hybrid" urldispatch/traversal URLs more easily
4803666 @blaflamme updated changes
blaflamme authored
404 by using the new ``route_name``, ``route_kw`` and ``route_remainder_name``
c29603e @mcdonc get rid of remainder_name on route, and just default to passing trave…
mcdonc authored
405 arguments to ``request.resource_url`` and ``request.resource_path``. See
4803666 @blaflamme updated changes
blaflamme authored
406 the new section of the "Combining Traversal and URL Dispatch" documentation
c29603e @mcdonc get rid of remainder_name on route, and just default to passing trave…
mcdonc authored
407 chapter entitled "Hybrid URL Generation".
0a4aed1 @mcdonc documentation for hybrid url generation
mcdonc authored
408
4803666 @blaflamme updated changes
blaflamme authored
409 - It is now possible to escape double braces in Pyramid scaffolds (unescaped,
1930ebf @mcdonc Permit escaping of double braces in scaffolds, see #862
mcdonc authored
410 these represent replacement values). You can use ``\{\{a\}\}`` to
4803666 @blaflamme updated changes
blaflamme authored
411 represent a "bare" ``{{a}}``. See
1930ebf @mcdonc Permit escaping of double braces in scaffolds, see #862
mcdonc authored
412 https://github.com/Pylons/pyramid/pull/862
413
330164c @mcdonc make local_name an attribute of Request, move logic from get_localize…
mcdonc authored
414 - Add ``localizer`` and ``locale_name`` properties (reified) to the request.
4803666 @blaflamme updated changes
blaflamme authored
415 See https://github.com/Pylons/pyramid/issues/508. Note that the
330164c @mcdonc make local_name an attribute of Request, move logic from get_localize…
mcdonc authored
416 ``pyramid.i18n.get_localizer`` and ``pyramid.i18n.get_locale_name`` functions
417 now simply look up these properties on the request.
c614ffc @witsch add ``localizer`` property to the request (refs #508)
witsch authored
418
b210ce3 @mcdonc add pdistreport command
mcdonc authored
419 - Add ``pdistreport`` script, which prints the Python version in use, the
420 Pyramid version in use, and the version number and location of all Python
421 distributions currently installed.
422
32333e4 @mcdonc add not_ predicate feature
mcdonc authored
423 - Add the ability to invert the result of any view, route, or subscriber
424 predicate using the ``not_`` class. For example::
425
426 from pyramid.config import not_
427
428 @view_config(route_name='myroute', request_method=not_('POST'))
429 def myview(request): ...
430
431 The above example will ensure that the view is called if the request method
432 is not POST (at least if no other view is more specific).
433
5e8eadb @mcdonc fix rst rendering of changes
mcdonc authored
434 The ``pyramid.config.not_`` class can be used against any value that is
32333e4 @mcdonc add not_ predicate feature
mcdonc authored
435 a predicate value passed in any of these contexts:
436
437 - ``pyramid.config.Configurator.add_view``
438
439 - ``pyramid.config.Configurator.add_route``
440
441 - ``pyramid.config.Configurator.add_subscriber``
442
443 - ``pyramid.view.view_config``
444
445 - ``pyramid.events.subscriber``
446
a178631 @mcdonc add an entry to changes about code merged from feature.prequest_login…
mcdonc authored
447 - ``scripts/prequest.py``: add support for submitting ``PUT`` and ``PATCH``
448 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
449 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
450 basic authentication credentials in the request via a ``--login`` argument to
451 the script. See https://github.com/Pylons/pyramid/pull/1039.
f0f92b0 @tseaver Changelog for PR #1033.
tseaver authored
452
2d93140 @mmerickel support acl as a callable
mmerickel authored
453 - ``ACLAuthorizationPolicy`` supports ``__acl__`` as a callable. This
454 removes the ambiguity between the potential ``AttributeError`` that would
455 be raised on the ``context`` when the property was not defined and the
456 ``AttributeError`` that could be raised from any user-defined code within
457 a dynamic property. It is recommended to define a dynamic ACL as a callable
458 to avoid this ambiguity. See https://github.com/Pylons/pyramid/issues/735.
459
ff41f86 @wosc Fixes #798: Allow a protocol-relative URL to be passed to add_static_…
wosc authored
460 - Allow a protocol-relative URL (e.g. ``//example.com/images``) to be passed to
461 ``pyramid.config.Configurator.add_static_view``. This allows
462 externally-hosted static URLs to be generated based on the current protocol.
463
a1f768c @wichert Allow explicit cookie domain setting.
wichert authored
464 - The ``AuthTktAuthenticationPolicy`` has two new options to configure its
4803666 @blaflamme updated changes
blaflamme authored
465 domain usage:
58c5fef @tshepang fix some rST issues
tshepang authored
466
a1f768c @wichert Allow explicit cookie domain setting.
wichert authored
467 * ``parent_domain``: if set the authentication cookie is set on
468 the parent domain. This is useful if you have multiple sites sharing the
469 same domain.
470 * ``domain``: if provided the cookie is always set for this domain, bypassing
58c5fef @tshepang fix some rST issues
tshepang authored
471 all usual logic.
472
3ea7883 @tomster Add reference to the pull requests
tomster authored
473 See https://github.com/Pylons/pyramid/pull/1028,
474 https://github.com/Pylons/pyramid/pull/1072 and
475 https://github.com/Pylons/pyramid/pull/1078.
188aa7e @wichert Add a parent_domain option for auth_tkt policy
wichert authored
476
23a7c6d @mmerickel update CHANGES.txt
mmerickel authored
477 - The ``AuthTktAuthenticationPolicy`` now supports IPv6 addresses when using
478 the ``include_ip=True`` option. This is possibly incompatible with
479 alternative ``auth_tkt`` implementations, as the specification does not
480 define how to properly handle IPv6. See
481 https://github.com/Pylons/pyramid/issues/831.
482
38844f7 @mmerickel update CHANGES.txt
mmerickel authored
483 - Make it possible to use variable arguments via
484 ``pyramid.paster.get_appsettings``. This also allowed the generated
485 ``initialize_db`` script from the ``alchemy`` scaffold to grow support
486 for options in the form ``a=1 b=2`` so you can fill in
487 values in a parameterized ``.ini`` file, e.g.
488 ``initialize_myapp_db etc/development.ini a=1 b=2``.
489 See https://github.com/Pylons/pyramid/pull/911
490
fab8454 @mcdonc add changelog note
mcdonc authored
491 - The ``request.session.check_csrf_token()`` method and the ``check_csrf`` view
492 predicate now take into account the value of the HTTP header named
493 ``X-CSRF-Token`` (as well as the ``csrf_token`` form parameter, which they
494 always did). The header is tried when the form parameter does not exist.
495
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
496 - View lookup will now search for valid views based on the inheritance
497 hierarchy of the context. It tries to find views based on the most
498 specific context first, and upon predicate failure, will move up the
499 inheritance chain to test views found by the super-type of the context.
500 In the past, only the most specific type containing views would be checked
501 and if no matching view could be found then a PredicateMismatch would be
502 raised. Now predicate mismatches don't hide valid views registered on
5e8eadb @mcdonc fix rst rendering of changes
mcdonc authored
503 super-types. Here's an example that now works::
9e1e6d3 @latteier Change log note.
latteier authored
504
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
505 class IResource(Interface):
07c189d @stevepiercy Fix whitespace in CHANGES.txt to permit build.
stevepiercy authored
506
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
507 ...
9e1e6d3 @latteier Change log note.
latteier authored
508
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
509 @view_config(context=IResource)
510 def get(context, request):
07c189d @stevepiercy Fix whitespace in CHANGES.txt to permit build.
stevepiercy authored
511
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
512 ...
9e1e6d3 @latteier Change log note.
latteier authored
513
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
514 @view_config(context=IResource, request_method='POST')
515 def post(context, request):
07c189d @stevepiercy Fix whitespace in CHANGES.txt to permit build.
stevepiercy authored
516
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
517 ...
9e1e6d3 @latteier Change log note.
latteier authored
518
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
519 @view_config(context=IResource, request_method='DELETE')
520 def delete(context, request):
07c189d @stevepiercy Fix whitespace in CHANGES.txt to permit build.
stevepiercy authored
521
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
522 ...
9e1e6d3 @latteier Change log note.
latteier authored
523
e01b1ca @mcdonc update whatsnew
mcdonc authored
524 @implementer(IResource)
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
525 class MyResource:
07c189d @stevepiercy Fix whitespace in CHANGES.txt to permit build.
stevepiercy authored
526
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
527 ...
9e1e6d3 @latteier Change log note.
latteier authored
528
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
529 @view_config(context=MyResource, request_method='POST')
530 def override_post(context, request):
07c189d @stevepiercy Fix whitespace in CHANGES.txt to permit build.
stevepiercy authored
531
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
532 ...
9e1e6d3 @latteier Change log note.
latteier authored
533
534 Previously the override_post view registration would hide the get
535 and delete views in the context of MyResource -- leading to a
536 predicate mismatch error when trying to use GET or DELETE
537 methods. Now the views are found and no predicate mismatch is
538 raised.
6b97003 @mmerickel update changlog
mmerickel authored
539 See https://github.com/Pylons/pyramid/pull/786 and
75fc4ac @mmerickel update changelog
mmerickel authored
540 https://github.com/Pylons/pyramid/pull/1004 and
541 https://github.com/Pylons/pyramid/pull/1046
9e1e6d3 @latteier Change log note.
latteier authored
542
1377480 @mcdonc add change note
mcdonc authored
543 - The ``pserve`` command now takes a ``-v`` (or ``--verbose``) flag and a
544 ``-q`` (or ``--quiet``) flag. Output from running ``pserve`` can be
545 controlled using these flags. ``-v`` can be specified multiple times to
546 increase verbosity. ``-q`` sets verbosity to ``0`` unconditionally. The
547 default verbosity level is ``1``.
548
986dc5f @mcdonc add change note
mcdonc authored
549 - The ``alchemy`` scaffold tests now provide better coverage. See
550 https://github.com/Pylons/pyramid/pull/1029
551
d07d167 @mcdonc raise ValueError instead of generating just path when _app_url is pro…
mcdonc authored
552 - The ``pyramid.config.Configurator.add_route`` method now supports being
553 called with an external URL as pattern. See
4803666 @blaflamme updated changes
blaflamme authored
554 https://github.com/Pylons/pyramid/issues/611 and the documentation section
67674f9 @mcdonc point at docs section
mcdonc authored
555 in the "URL Dispatch" chapter entitled "External Routes" for more information.
8a8eff5 @tomster update changelog
tomster authored
556
0d96b77 @mcdonc version bump in setup.py conf.py CHANGES.txt, rejigger changes bugs v…
mcdonc authored
557 Bug Fixes
558 ---------
559
97ed56d @mcdonc allow exception view registrations for HTTPException to override defa…
mcdonc authored
560 - It was not possible to use ``pyramid.httpexceptions.HTTPException`` as
561 the ``context`` of an exception view as very general catchall for
4803666 @blaflamme updated changes
blaflamme authored
562 http-related exceptions when you wanted that exception view to override the
97ed56d @mcdonc allow exception view registrations for HTTPException to override defa…
mcdonc authored
563 default exception view. See https://github.com/Pylons/pyramid/issues/985
564
4803666 @blaflamme updated changes
blaflamme authored
565 - When the ``pyramid.reload_templates`` setting was true, and a Chameleon
566 template was reloaded, and the renderer specification named a macro
8a7e80d @mcdonc - When the ``pyramid.reload_templates`` setting was true, and a Chame…
mcdonc authored
567 (e.g. ``foo#macroname.pt``), renderings of the template after the template
4803666 @blaflamme updated changes
blaflamme authored
568 was reloaded due to a file change would produce the entire template body
569 instead of just a rendering of the macro. See
8a7e80d @mcdonc - When the ``pyramid.reload_templates`` setting was true, and a Chame…
mcdonc authored
570 https://github.com/Pylons/pyramid/issues/1013.
571
4803666 @blaflamme updated changes
blaflamme authored
572 - Fix an obscure problem when combining a virtual root with a route with a
ece96f6 @mcdonc - Fix an obscure problem when combining a virtual root with a route w…
mcdonc authored
573 ``*traverse`` in its pattern. Now the traversal path generated in
574 such a configuration will be correct, instead of an element missing
575 a leading slash.
576
24c9326 @blaflamme added bug fix to changes
blaflamme authored
577 - Fixed a Mako renderer bug returning a tuple with a previous defname value
3de54e3 @blaflamme fixed line indentation
blaflamme authored
578 in some circumstances. See https://github.com/Pylons/pyramid/issues/1037
579 for more information.
24c9326 @blaflamme added bug fix to changes
blaflamme authored
580
0d96b77 @mcdonc version bump in setup.py conf.py CHANGES.txt, rejigger changes bugs v…
mcdonc authored
581 - Make the ``pyramid.config.assets.PackageOverrides`` object implement the API
582 for ``__loader__`` objects specified in PEP 302. Proxies to the
583 ``__loader__`` set by the importer, if present; otherwise, raises
584 ``NotImplementedError``. This makes Pyramid static view overrides work
585 properly under Python 3.3 (previously they would not). See
586 https://github.com/Pylons/pyramid/pull/1015 for more information.
587
588 - ``mako_templating``: added defensive workaround for non-importability of
589 ``mako`` due to upstream ``markupsafe`` dropping Python 3.2 support. Mako
590 templating will no longer work under the combination of MarkupSafe 0.17 and
591 Python 3.2 (although the combination of MarkupSafe 0.17 and Python 3.3 or any
592 supported Python 2 version will work OK).
593
ea278e1 @mmerickel update changelog
mmerickel authored
594 - Spaces and dots may now be in mako renderer template paths. This was
595 broken when support for the new makodef syntax was added in 1.4a1.
596 See https://github.com/Pylons/pyramid/issues/950
597
20c57e6 @mmerickel update changelog
mmerickel authored
598 - ``pyramid.debug_authorization=true`` will now correctly print out
599 ``Allowed`` for views registered with ``NO_PERMISSION_REQUIRED`` instead
600 of invoking the ``permits`` method of the authorization policy.
601 See https://github.com/Pylons/pyramid/issues/954
602
c35b298 @mmerickel update changes.txt
mmerickel authored
603 - Pyramid failed to install on some systems due to being packaged with
604 some test files containing higher order characters in their names. These
605 files have now been removed. See
606 https://github.com/Pylons/pyramid/issues/981
607
050b71c @mcdonc - ``pyramid.testing.DummyResource`` didn't define ``__bool__``, so co…
mcdonc authored
608 - ``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
609 Python 3 would use ``__len__`` to find truthiness; this usually caused an
610 instance of DummyResource to be "falsy" instead of "truthy". See
611 https://github.com/Pylons/pyramid/pull/1032
050b71c @mcdonc - ``pyramid.testing.DummyResource`` didn't define ``__bool__``, so co…
mcdonc authored
612
0a8d50f @mcdonc add change note
mcdonc authored
613 - The ``alchemy`` scaffold would break when the database was MySQL during
614 tables creation. See https://github.com/Pylons/pyramid/pull/1049
615
6a4a341 @odontomachus Fixed documentation width, signed contributors agreement and added a …
odontomachus authored
616 - The ``current_route_url`` method now attaches the query string to the URL by
617 default. See
0f1bc52 @odontomachus Updated CHANGES
odontomachus authored
618 https://github.com/Pylons/pyramid/issues/1040
619
d6e8b86 @tomster Make ``pserve.cherrypy_server_runner`` Python 3 compatible.
tomster authored
620 - Make ``pserve.cherrypy_server_runner`` Python 3 compatible. See
621 https://github.com/Pylons/pyramid/issues/718
622
33e0fe1 @odontomachus Fixes to documentation, added change to what's new.
odontomachus authored
623 Backwards Incompatibilities
624 ---------------------------
625
6a4a341 @odontomachus Fixed documentation width, signed contributors agreement and added a …
odontomachus authored
626 - Modified the ``current_route_url`` method in pyramid.Request. The method
627 previously returned the URL without the query string by default, it now does
628 attach the query string unless it is overriden.
33e0fe1 @odontomachus Fixes to documentation, added change to what's new.
odontomachus authored
629
4803666 @blaflamme updated changes
blaflamme authored
630 - The ``route_url`` and ``route_path`` APIs no longer quote ``/``
58951c0 @mcdonc - The ``route_url`` and ``route_path`` APIs no longer quote ``/``
mcdonc authored
631 to ``%2F`` when a replacement value contains a ``/``. This was pointless,
4803666 @blaflamme updated changes
blaflamme authored
632 as WSGI servers always unquote the slash anyway, and Pyramid never sees the
58951c0 @mcdonc - The ``route_url`` and ``route_path`` APIs no longer quote ``/``
mcdonc authored
633 quoted value.
634
4803666 @blaflamme updated changes
blaflamme authored
635 - It is no longer possible to set a ``locale_name`` attribute of the request,
330164c @mcdonc make local_name an attribute of Request, move logic from get_localize…
mcdonc authored
636 nor is it possible to set a ``localizer`` attribute of the request. These
637 are now "reified" properties that look up a locale name and localizer
638 respectively using the machinery described in the "Internationalization"
639 chapter of the documentation.
640
db0185f @mcdonc first cut at hybrid url generation; still needs tests for resource_ur…
mcdonc authored
641 - If you send an ``X-Vhm-Root`` header with a value that ends with a slash (or
642 any number of slashes), the trailing slash(es) will be removed before a URL
643 is generated when you use use ``request.resource_url`` or
644 ``request.resource_path``. Previously the virtual root path would not have
645 trailing slashes stripped, which would influence URL generation.
646
647 - The ``pyramid.interfaces.IResourceURL`` interface has now grown two new
648 attributes: ``virtual_path_tuple`` and ``physical_path_tuple``. These should
649 be the tuple form of the resource's path (physical and virtual).
650
Something went wrong with that request. Please try again.