Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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