Skip to content

HTTPS clone URL

Subversion checkout URL

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