Skip to content

HTTPS clone URL

Subversion checkout URL

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