Skip to content

HTTPS clone URL

Subversion checkout URL

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