Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 339 lines (255 sloc) 14.738 kB
f6f1d16 @mmerickel remove the deprecated request.response_* attributes
mmerickel authored
1 Next Release
2 ============
3
c390f4b @bertjwregeer Add feature update to CHANGES.txt
bertjwregeer authored
4 Features
5 --------
6
cbcd4d2 @mcdonc wording
mcdonc authored
7 - Users can now provide dotted Python names to as the ``factory`` argument
8 the Configurator methods named ``add_{view,route,subscriber}_predicate``
9 (instead of passing the predicate factory directly, you can pass a
10 dotted name which refers to the factory).
c390f4b @bertjwregeer Add feature update to CHANGES.txt
bertjwregeer authored
11
c062d5a @dhellmann Update package_name() to work with namespace pkgs
dhellmann authored
12 Bug Fixes
13 ---------
14
f504ccc @mcdonc add change notes
mcdonc authored
15 - Fix an exception in ``pyramid.path.package_name`` when resolving the package
16 name for namespace packages that had no ``__file__`` attribute.
c062d5a @dhellmann Update package_name() to work with namespace pkgs
dhellmann authored
17
f6f1d16 @mmerickel remove the deprecated request.response_* attributes
mmerickel authored
18 Backwards Incompatibilities
19 ---------------------------
20
82f9702 @mmerickel update changelog
mmerickel authored
21 - Pyramid has dropped native support for the Mako and Chameleon renderers. To
22 re-add support for these renderers into existing projects there are 3 steps:
23
24 - Add `pyramid_mako` and/or `pyramid_chameleon` as dependencies by
ce138c8 @mmerickel add install_requires example as well
mmerickel authored
25 adding them to the `install_requires` section of the package's `setup.py`::
26
27 setup(
28 #...
29 install_requires=[
30 'pyramid_mako', # new dependency
31 'pyramid_chameleon', # new dependency
32 'pyramid',
33 #...
34 ],
35 )
82f9702 @mmerickel update changelog
mmerickel authored
36
4315c0d @mmerickel fix markup
mmerickel authored
37 - Update instances of the ``pyramid.config.Configurator`` to include the
ce138c8 @mmerickel add install_requires example as well
mmerickel authored
38 required addons::
82f9702 @mmerickel update changelog
mmerickel authored
39
40 config.include('pyramid_chameleon')
41 config.include('pyramid_mako')
42
4315c0d @mmerickel fix markup
mmerickel authored
43 - If any unit tests are invoking either ``pyramid.renderers.render()`` or
9ed074e @mmerickel add example of rendering to the changelog
mmerickel authored
44 ``pyramid.renderers.render_to_response()`` with either Mako or Chameleon
45 templates then the ``pyramid.config.Configurator`` instance at the root of
46 the unit test should be also be updated to include the addons, as shown
ce138c8 @mmerickel add install_requires example as well
mmerickel authored
47 above. For example::
9ed074e @mmerickel add example of rendering to the changelog
mmerickel authored
48
49 config = pyramid.testing.setUp()
50 config.include('pyramid_mako')
51
52 result = pyramid.renderers.render('mypkg:templates/home.mako', {})
82f9702 @mmerickel update changelog
mmerickel authored
53
f6f1d16 @mmerickel remove the deprecated request.response_* attributes
mmerickel authored
54 - Removed the ``request.response_*`` varying attributes. These attributes
55 have been deprecated since Pyramid 1.1, and as per the deprecation policy,
56 have now been removed.
57
027c980 @mcdonc resolve conflicts, reword change entry a bit
mcdonc authored
58 - ``request.response`` will no longer be mutated when using the
59 ``pyramid.renderers.render()`` API. Almost all renderers mutate the
fbdc3a0 @mmerickel s/view execution machinery/generating a response/
mmerickel authored
60 ``request.response`` response object (for example, the JSON renderer sets
61 ``request.response.content_type`` to ``application/json``), but this is
62 only necessary when the renderer is generating a response; it was a bug
63 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
64
f504ccc @mcdonc add change notes
mcdonc authored
65 - The Mako and Chameleon renderers have been removed from Pyramid. Their
66 functionality has been moved to the ``pyramid_mako`` and
67 ``pyramid_chameleon`` distributions respectively.
68
69 - Removed the ``bfg2pyramid`` fixer script.
70
fc477b2 @mcdonc - The ``pyramid.events.NewResponse`` event is now sent **after** resp…
mcdonc authored
71 - The ``pyramid.events.NewResponse`` event is now sent **after** response
72 callbacks are executed. It previously executed before response callbacks
73 were executed. Rationale: it's more useful to be able to inspect the response
74 after response callbacks have done their jobs instead of before.
75
00bb95f @mcdonc prep for 1.5a1
mcdonc authored
76 1.5a1 (2013-08-30)
77 ==================
2d93140 @mmerickel support acl as a callable
mmerickel authored
78
79 Features
80 --------
81
c5ed549 @mcdonc add HTTPSuccessful base class, allowing HTTPOk to be caught independe…
mcdonc authored
82 - A new http exception subclass named ``pyramid.httpexceptions.HTTPSuccessful``
83 was added. You can use this class as the ``context`` of an exception
84 view to catch all 200-series "exceptions" (e.g. "raise HTTPOk"). This
85 also allows you to catch *only* the ``HTTPOk`` exception itself; previously
86 this was impossible because a number of other exceptions
87 (such as ``HTTPNoContent``) inherited from ``HTTPOk``, but now they do not.
88
0a4aed1 @mcdonc documentation for hybrid url generation
mcdonc authored
89 - 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
90 by using the new ``route_name``, ``route_kw`` and ``route_remainder_name``
91 arguments to ``request.resource_url`` and ``request.resource_path``. See
92 the new section of the "Combining Traversal and URL Dispatch" documentation
93 chapter entitled "Hybrid URL Generation".
0a4aed1 @mcdonc documentation for hybrid url generation
mcdonc authored
94
1930ebf @mcdonc Permit escaping of double braces in scaffolds, see #862
mcdonc authored
95 - It is now possible to escape double braces in Pyramid scaffolds (unescaped,
96 these represent replacement values). You can use ``\{\{a\}\}`` to
97 represent a "bare" ``{{a}}``. See
98 https://github.com/Pylons/pyramid/pull/862
99
330164c @mcdonc make local_name an attribute of Request, move logic from get_localize…
mcdonc authored
100 - Add ``localizer`` and ``locale_name`` properties (reified) to the request.
101 See https://github.com/Pylons/pyramid/issues/508. Note that the
102 ``pyramid.i18n.get_localizer`` and ``pyramid.i18n.get_locale_name`` functions
103 now simply look up these properties on the request.
c614ffc @witsch add ``localizer`` property to the request (refs #508)
witsch authored
104
b210ce3 @mcdonc add pdistreport command
mcdonc authored
105 - Add ``pdistreport`` script, which prints the Python version in use, the
106 Pyramid version in use, and the version number and location of all Python
107 distributions currently installed.
108
32333e4 @mcdonc add not_ predicate feature
mcdonc authored
109 - Add the ability to invert the result of any view, route, or subscriber
110 predicate using the ``not_`` class. For example::
111
112 from pyramid.config import not_
113
114 @view_config(route_name='myroute', request_method=not_('POST'))
115 def myview(request): ...
116
117 The above example will ensure that the view is called if the request method
118 is not POST (at least if no other view is more specific).
119
120 The :class:`pyramid.config.not_` class can be used against any value that is
121 a predicate value passed in any of these contexts:
122
123 - ``pyramid.config.Configurator.add_view``
124
125 - ``pyramid.config.Configurator.add_route``
126
127 - ``pyramid.config.Configurator.add_subscriber``
128
129 - ``pyramid.view.view_config``
130
131 - ``pyramid.events.subscriber``
132
a178631 @mcdonc add an entry to changes about code merged from feature.prequest_login…
mcdonc authored
133 - ``scripts/prequest.py``: add support for submitting ``PUT`` and ``PATCH``
134 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
135 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
136 basic authentication credentials in the request via a ``--login`` argument to
137 the script. See https://github.com/Pylons/pyramid/pull/1039.
f0f92b0 @tseaver Changelog for PR #1033.
tseaver authored
138
2d93140 @mmerickel support acl as a callable
mmerickel authored
139 - ``ACLAuthorizationPolicy`` supports ``__acl__`` as a callable. This
140 removes the ambiguity between the potential ``AttributeError`` that would
141 be raised on the ``context`` when the property was not defined and the
142 ``AttributeError`` that could be raised from any user-defined code within
143 a dynamic property. It is recommended to define a dynamic ACL as a callable
144 to avoid this ambiguity. See https://github.com/Pylons/pyramid/issues/735.
145
ff41f86 @wosc Fixes #798: Allow a protocol-relative URL to be passed to add_static_…
wosc authored
146 - Allow a protocol-relative URL (e.g. ``//example.com/images``) to be passed to
147 ``pyramid.config.Configurator.add_static_view``. This allows
148 externally-hosted static URLs to be generated based on the current protocol.
149
a1f768c @wichert Allow explicit cookie domain setting.
wichert authored
150 - The ``AuthTktAuthenticationPolicy`` has two new options to configure its
151 domain usage:
58c5fef @tshepang fix some rST issues
tshepang authored
152
a1f768c @wichert Allow explicit cookie domain setting.
wichert authored
153 * ``parent_domain``: if set the authentication cookie is set on
154 the parent domain. This is useful if you have multiple sites sharing the
155 same domain.
156 * ``domain``: if provided the cookie is always set for this domain, bypassing
58c5fef @tshepang fix some rST issues
tshepang authored
157 all usual logic.
158
3ea7883 @tomster Add reference to the pull requests
tomster authored
159 See https://github.com/Pylons/pyramid/pull/1028,
160 https://github.com/Pylons/pyramid/pull/1072 and
161 https://github.com/Pylons/pyramid/pull/1078.
188aa7e @wichert Add a parent_domain option for auth_tkt policy
wichert authored
162
23a7c6d @mmerickel update CHANGES.txt
mmerickel authored
163 - The ``AuthTktAuthenticationPolicy`` now supports IPv6 addresses when using
164 the ``include_ip=True`` option. This is possibly incompatible with
165 alternative ``auth_tkt`` implementations, as the specification does not
166 define how to properly handle IPv6. See
167 https://github.com/Pylons/pyramid/issues/831.
168
38844f7 @mmerickel update CHANGES.txt
mmerickel authored
169 - Make it possible to use variable arguments via
170 ``pyramid.paster.get_appsettings``. This also allowed the generated
171 ``initialize_db`` script from the ``alchemy`` scaffold to grow support
172 for options in the form ``a=1 b=2`` so you can fill in
173 values in a parameterized ``.ini`` file, e.g.
174 ``initialize_myapp_db etc/development.ini a=1 b=2``.
175 See https://github.com/Pylons/pyramid/pull/911
176
fab8454 @mcdonc add changelog note
mcdonc authored
177 - The ``request.session.check_csrf_token()`` method and the ``check_csrf`` view
178 predicate now take into account the value of the HTTP header named
179 ``X-CSRF-Token`` (as well as the ``csrf_token`` form parameter, which they
180 always did). The header is tried when the form parameter does not exist.
181
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
182 - View lookup will now search for valid views based on the inheritance
183 hierarchy of the context. It tries to find views based on the most
184 specific context first, and upon predicate failure, will move up the
185 inheritance chain to test views found by the super-type of the context.
186 In the past, only the most specific type containing views would be checked
187 and if no matching view could be found then a PredicateMismatch would be
188 raised. Now predicate mismatches don't hide valid views registered on
0d96b77 @mcdonc version bump in setup.py conf.py CHANGES.txt, rejigger changes bugs v…
mcdonc authored
189 super-types. Here's an example that now works:
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
190
191 .. code-block:: python
9e1e6d3 @latteier Change log note.
latteier authored
192
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
193 class IResource(Interface):
07c189d @stevepiercy Fix whitespace in CHANGES.txt to permit build.
stevepiercy authored
194
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
195 ...
9e1e6d3 @latteier Change log note.
latteier authored
196
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
197 @view_config(context=IResource)
198 def get(context, request):
07c189d @stevepiercy Fix whitespace in CHANGES.txt to permit build.
stevepiercy authored
199
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
200 ...
9e1e6d3 @latteier Change log note.
latteier authored
201
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
202 @view_config(context=IResource, request_method='POST')
203 def post(context, request):
07c189d @stevepiercy Fix whitespace in CHANGES.txt to permit build.
stevepiercy authored
204
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
205 ...
9e1e6d3 @latteier Change log note.
latteier authored
206
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
207 @view_config(context=IResource, request_method='DELETE')
208 def delete(context, request):
07c189d @stevepiercy Fix whitespace in CHANGES.txt to permit build.
stevepiercy authored
209
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
210 ...
9e1e6d3 @latteier Change log note.
latteier authored
211
e01b1ca @mcdonc update whatsnew
mcdonc authored
212 @implementer(IResource)
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
213 class MyResource:
07c189d @stevepiercy Fix whitespace in CHANGES.txt to permit build.
stevepiercy authored
214
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
215 ...
9e1e6d3 @latteier Change log note.
latteier authored
216
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
217 @view_config(context=MyResource, request_method='POST')
218 def override_post(context, request):
07c189d @stevepiercy Fix whitespace in CHANGES.txt to permit build.
stevepiercy authored
219
b6a4d40 @mmerickel Merge branch 'master' of latteier/pyramid into pull.786
mmerickel authored
220 ...
9e1e6d3 @latteier Change log note.
latteier authored
221
222 Previously the override_post view registration would hide the get
223 and delete views in the context of MyResource -- leading to a
224 predicate mismatch error when trying to use GET or DELETE
225 methods. Now the views are found and no predicate mismatch is
226 raised.
6b97003 @mmerickel update changlog
mmerickel authored
227 See https://github.com/Pylons/pyramid/pull/786 and
75fc4ac @mmerickel update changelog
mmerickel authored
228 https://github.com/Pylons/pyramid/pull/1004 and
229 https://github.com/Pylons/pyramid/pull/1046
9e1e6d3 @latteier Change log note.
latteier authored
230
1377480 @mcdonc add change note
mcdonc authored
231 - The ``pserve`` command now takes a ``-v`` (or ``--verbose``) flag and a
232 ``-q`` (or ``--quiet``) flag. Output from running ``pserve`` can be
233 controlled using these flags. ``-v`` can be specified multiple times to
234 increase verbosity. ``-q`` sets verbosity to ``0`` unconditionally. The
235 default verbosity level is ``1``.
236
986dc5f @mcdonc add change note
mcdonc authored
237 - The ``alchemy`` scaffold tests now provide better coverage. See
238 https://github.com/Pylons/pyramid/pull/1029
239
d07d167 @mcdonc raise ValueError instead of generating just path when _app_url is pro…
mcdonc authored
240 - The ``pyramid.config.Configurator.add_route`` method now supports being
241 called with an external URL as pattern. See
67674f9 @mcdonc point at docs section
mcdonc authored
242 https://github.com/Pylons/pyramid/issues/611 and the documentation section
243 in the "URL Dispatch" chapter entitled "External Routes" for more information.
8a8eff5 @tomster update changelog
tomster authored
244
0d96b77 @mcdonc version bump in setup.py conf.py CHANGES.txt, rejigger changes bugs v…
mcdonc authored
245 Bug Fixes
246 ---------
247
97ed56d @mcdonc allow exception view registrations for HTTPException to override defa…
mcdonc authored
248 - It was not possible to use ``pyramid.httpexceptions.HTTPException`` as
249 the ``context`` of an exception view as very general catchall for
250 http-related exceptions when you wanted that exception view to override the
251 default exception view. See https://github.com/Pylons/pyramid/issues/985
252
8a7e80d @mcdonc - When the ``pyramid.reload_templates`` setting was true, and a Chame…
mcdonc authored
253 - When the ``pyramid.reload_templates`` setting was true, and a Chameleon
254 template was reloaded, and the renderer specification named a macro
255 (e.g. ``foo#macroname.pt``), renderings of the template after the template
256 was reloaded due to a file change would produce the entire template body
257 instead of just a rendering of the macro. See
258 https://github.com/Pylons/pyramid/issues/1013.
259
ece96f6 @mcdonc - Fix an obscure problem when combining a virtual root with a route w…
mcdonc authored
260 - Fix an obscure problem when combining a virtual root with a route with a
261 ``*traverse`` in its pattern. Now the traversal path generated in
262 such a configuration will be correct, instead of an element missing
263 a leading slash.
264
24c9326 @blaflamme added bug fix to changes
blaflamme authored
265 - Fixed a Mako renderer bug returning a tuple with a previous defname value
3de54e3 @blaflamme fixed line indentation
blaflamme authored
266 in some circumstances. See https://github.com/Pylons/pyramid/issues/1037
267 for more information.
24c9326 @blaflamme added bug fix to changes
blaflamme authored
268
0d96b77 @mcdonc version bump in setup.py conf.py CHANGES.txt, rejigger changes bugs v…
mcdonc authored
269 - Make the ``pyramid.config.assets.PackageOverrides`` object implement the API
270 for ``__loader__`` objects specified in PEP 302. Proxies to the
271 ``__loader__`` set by the importer, if present; otherwise, raises
272 ``NotImplementedError``. This makes Pyramid static view overrides work
273 properly under Python 3.3 (previously they would not). See
274 https://github.com/Pylons/pyramid/pull/1015 for more information.
275
276 - ``mako_templating``: added defensive workaround for non-importability of
277 ``mako`` due to upstream ``markupsafe`` dropping Python 3.2 support. Mako
278 templating will no longer work under the combination of MarkupSafe 0.17 and
279 Python 3.2 (although the combination of MarkupSafe 0.17 and Python 3.3 or any
280 supported Python 2 version will work OK).
281
ea278e1 @mmerickel update changelog
mmerickel authored
282 - Spaces and dots may now be in mako renderer template paths. This was
283 broken when support for the new makodef syntax was added in 1.4a1.
284 See https://github.com/Pylons/pyramid/issues/950
285
20c57e6 @mmerickel update changelog
mmerickel authored
286 - ``pyramid.debug_authorization=true`` will now correctly print out
287 ``Allowed`` for views registered with ``NO_PERMISSION_REQUIRED`` instead
288 of invoking the ``permits`` method of the authorization policy.
289 See https://github.com/Pylons/pyramid/issues/954
290
c35b298 @mmerickel update changes.txt
mmerickel authored
291 - Pyramid failed to install on some systems due to being packaged with
292 some test files containing higher order characters in their names. These
293 files have now been removed. See
294 https://github.com/Pylons/pyramid/issues/981
295
050b71c @mcdonc - ``pyramid.testing.DummyResource`` didn't define ``__bool__``, so co…
mcdonc authored
296 - ``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
297 Python 3 would use ``__len__`` to find truthiness; this usually caused an
298 instance of DummyResource to be "falsy" instead of "truthy". See
299 https://github.com/Pylons/pyramid/pull/1032
050b71c @mcdonc - ``pyramid.testing.DummyResource`` didn't define ``__bool__``, so co…
mcdonc authored
300
0a8d50f @mcdonc add change note
mcdonc authored
301 - The ``alchemy`` scaffold would break when the database was MySQL during
302 tables creation. See https://github.com/Pylons/pyramid/pull/1049
303
6a4a341 @odontomachus Fixed documentation width, signed contributors agreement and added a …
odontomachus authored
304 - The ``current_route_url`` method now attaches the query string to the URL by
305 default. See
0f1bc52 @odontomachus Updated CHANGES
odontomachus authored
306 https://github.com/Pylons/pyramid/issues/1040
307
d6e8b86 @tomster Make ``pserve.cherrypy_server_runner`` Python 3 compatible.
tomster authored
308 - Make ``pserve.cherrypy_server_runner`` Python 3 compatible. See
309 https://github.com/Pylons/pyramid/issues/718
310
33e0fe1 @odontomachus Fixes to documentation, added change to what's new.
odontomachus authored
311 Backwards Incompatibilities
312 ---------------------------
313
6a4a341 @odontomachus Fixed documentation width, signed contributors agreement and added a …
odontomachus authored
314 - Modified the ``current_route_url`` method in pyramid.Request. The method
315 previously returned the URL without the query string by default, it now does
316 attach the query string unless it is overriden.
33e0fe1 @odontomachus Fixes to documentation, added change to what's new.
odontomachus authored
317
58951c0 @mcdonc - The ``route_url`` and ``route_path`` APIs no longer quote ``/``
mcdonc authored
318 - The ``route_url`` and ``route_path`` APIs no longer quote ``/``
319 to ``%2F`` when a replacement value contains a ``/``. This was pointless,
320 as WSGI servers always unquote the slash anyway, and Pyramid never sees the
321 quoted value.
322
330164c @mcdonc make local_name an attribute of Request, move logic from get_localize…
mcdonc authored
323 - It is no longer possible to set a ``locale_name`` attribute of the request,
324 nor is it possible to set a ``localizer`` attribute of the request. These
325 are now "reified" properties that look up a locale name and localizer
326 respectively using the machinery described in the "Internationalization"
327 chapter of the documentation.
328
db0185f @mcdonc first cut at hybrid url generation; still needs tests for resource_ur…
mcdonc authored
329 - If you send an ``X-Vhm-Root`` header with a value that ends with a slash (or
330 any number of slashes), the trailing slash(es) will be removed before a URL
331 is generated when you use use ``request.resource_url`` or
332 ``request.resource_path``. Previously the virtual root path would not have
333 trailing slashes stripped, which would influence URL generation.
334
335 - The ``pyramid.interfaces.IResourceURL`` interface has now grown two new
336 attributes: ``virtual_path_tuple`` and ``physical_path_tuple``. These should
337 be the tuple form of the resource's path (physical and virtual).
338
Something went wrong with that request. Please try again.