commit | author | age
|
a44845
|
1 |
1.0b1 (2011-01-18) |
CM |
2 |
================== |
acc2a6
|
3 |
|
6fd450
|
4 |
Features |
CM |
5 |
-------- |
|
6 |
|
|
7 |
- The AuthTktAuthenticationPolicy now accepts a ``tokens`` parameter via |
|
8 |
``pyramid.security.remember``. The value must be a sequence of strings. |
|
9 |
Tokens are placed into the auth_tkt "tokens" field and returned in the |
|
10 |
auth_tkt cookie. |
|
11 |
|
d0e101
|
12 |
- Add ``wild_domain`` argument to AuthTktAuthenticationPolicy, which defaults |
CM |
13 |
to ``True``. If it is set to ``False``, the feature of the policy which |
|
14 |
sets a cookie with a wilcard domain will be turned off. |
|
15 |
|
47442f
|
16 |
- Add a ``MANIFEST.in`` file to each paster template. See |
CM |
17 |
https://github.com/Pylons/pyramid/issues#issue/95 |
|
18 |
|
2a13b0
|
19 |
Bug Fixes |
CM |
20 |
--------- |
|
21 |
|
|
22 |
- ``testing.setUp`` now adds a ``settings`` attribute to the registry (both |
|
23 |
when it's passed a registry without any settings and when it creates one). |
|
24 |
|
|
25 |
- The ``testing.setUp`` function now takes a ``settings`` argument, which |
|
26 |
should be a dictionary. Its values will subsequently be available on the |
|
27 |
returned ``config`` object as ``config.registry.settings``. |
|
28 |
|
acc2a6
|
29 |
Documentation |
CM |
30 |
------------- |
|
31 |
|
c88d44
|
32 |
- Added "What's New in Pyramid 1.0" chapter to HTML rendering of |
CM |
33 |
documentation. |
|
34 |
|
acc2a6
|
35 |
- Merged caseman-master narrative editing branch, many wording fixes and |
CM |
36 |
extensions. |
|
37 |
|
9904b3
|
38 |
- Fix deprecated example showing ``chameleon_zpt`` API call in testing |
CM |
39 |
narrative chapter. |
|
40 |
|
14e91b
|
41 |
- Added "Adding Methods to the Configurator via ``add_directive``" section to |
CM |
42 |
Advanced Configuration narrative chapter. |
|
43 |
|
72ad33
|
44 |
- Add docs for ``add_finished_callback``, ``add_response_callback``, |
CM |
45 |
``route_path``, ``route_url``, and ``static_url`` methods to |
|
46 |
``pyramid.request.Request`` API docs. |
|
47 |
|
ddf07e
|
48 |
- Add (minimal) documentation about using I18N within Mako templates to |
CM |
49 |
"Internationalization and Localization" narrative chapter. |
|
50 |
|
770495
|
51 |
- Move content of "Forms" chapter back to "Views" chapter; I can't think of a |
CM |
52 |
better place to put it. |
|
53 |
|
57cc86
|
54 |
- Slightly improved interface docs for ``IAuthorizationPolicy``. |
CM |
55 |
|
65f203
|
56 |
- Minimally explain usage of custom regular expressions in URL dispatch |
CM |
57 |
replacement markers within URL Dispatch chapter. |
|
58 |
|
5f4780
|
59 |
Deprecations |
CM |
60 |
------------- |
|
61 |
|
|
62 |
- Using the ``pyramid.view.bfg_view`` alias for ``pyramid.view.view_config`` |
|
63 |
(a backwards compatibility shim) now issues a deprecation warning. |
|
64 |
|
a05353
|
65 |
Backwards Incompatibilities |
CM |
66 |
--------------------------- |
|
67 |
|
|
68 |
- When a ``pyramid.exceptions.Forbidden`` error is raised, its status code |
|
69 |
now ``403 Forbidden``. It was previously ``401 Unauthorized``, for |
|
70 |
backwards compatibility purposes with ``repoze.bfg``. This change will |
|
71 |
cause problems for users of Pyramid with ``repoze.who``, which intercepts |
|
72 |
``401 Unauthorized`` by default, but allows ``403 Forbidden`` to pass |
|
73 |
through. Those deployments will need to configure ``repoze.who`` to also |
|
74 |
react to ``403 Forbidden``. |
|
75 |
|
765336
|
76 |
- The default value for the ``cookie_on_exception`` parameter to |
CM |
77 |
``pyramid.session.UnencyrptedCookieSessionFactory`` is now ``True``. This |
|
78 |
means that when view code causes an exception to be raised, and the session |
|
79 |
has been mutated, a cookie will be sent back in the response. Previously |
|
80 |
its default value was ``False``. |
|
81 |
|
607d75
|
82 |
Paster Templates |
CM |
83 |
---------------- |
|
84 |
|
|
85 |
- The ``pyramid_zodb``, ``pyramid_routesalchemy`` and ``pyramid_alchemy`` |
|
86 |
paster templates now use a default "commit veto" hook when configuring the |
|
87 |
``repoze.tm2`` transaction manager in ``development.ini``. This prevents a |
|
88 |
transaction from being committed when the response status code is within |
|
89 |
the 400 or 500 ranges. See also |
|
90 |
http://docs.repoze.org/tm2/#using-a-commit-veto. |
|
91 |
|
079bb2
|
92 |
1.0a10 (2011-01-18) |
CM |
93 |
=================== |
45b636
|
94 |
|
49315b
|
95 |
Bug Fixes |
BB |
96 |
--------- |
|
97 |
|
059289
|
98 |
- URL dispatch now properly handles a ``.*`` or ``*`` appearing in a regex |
CM |
99 |
match when used inside brackets. Resolves issue #90. |
49315b
|
100 |
|
e333c2
|
101 |
Backwards Incompatibilities |
CM |
102 |
--------------------------- |
|
103 |
|
|
104 |
- The ``add_handler`` method of a Configurator has been removed from the |
|
105 |
Pyramid core. Handlers are now a feature of the ``pyramid_handlers`` |
|
106 |
package, which can be downloaded from PyPI. Documentation for the package |
079bb2
|
107 |
should be available via |
36a3bf
|
108 |
http://pylonsproject.org/projects/pyramid_handlers/dev/, which describes how |
079bb2
|
109 |
to add a configuration statement to your ``main`` block to reobtain this |
CM |
110 |
method. You will also need to add an ``install_requires`` dependency upon |
|
111 |
``pyramid_handlers`` to your ``setup.py`` file. |
e333c2
|
112 |
|
d4b0ea
|
113 |
- The ``load_zcml`` method of a Configurator has been removed from the |
CM |
114 |
Pyramid core. Loading ZCML is now a feature of the ``pyramid_zcml`` |
|
115 |
package, which can be downloaded from PyPI. Documentation for the package |
079bb2
|
116 |
should be available via |
36a3bf
|
117 |
http://pylonsproject.org/projects/pyramid_zcml/dev/, which describes how |
079bb2
|
118 |
to add a configuration statement to your ``main`` block to reobtain this |
CM |
119 |
method. You will also need to add an ``install_requires`` dependency upon |
|
120 |
``pyramid_zcml`` to your ``setup.py`` file. |
d4b0ea
|
121 |
|
CM |
122 |
- The ``pyramid.includes`` subpackage has been removed. ZCML files which use |
|
123 |
include the package ``pyramid.includes`` (e.g. ``<include |
c9c3c4
|
124 |
package="pyramid.includes"/>``) now must include the ``pyramid_zcml`` |
CM |
125 |
package instead (e.g. ``<include package="pyramid_zcml"/>``). |
d4b0ea
|
126 |
|
e333c2
|
127 |
- The ``pyramid.view.action`` decorator has been removed from the Pyramid |
CM |
128 |
core. Handlers are now a feature of the ``pyramid_handlers`` package. It |
|
129 |
should now be imported from ``pyramid_handlers`` e.g. ``from |
|
130 |
pyramid_handlers import action``. |
|
131 |
|
|
132 |
- The ``handler`` ZCML directive has been removed. It is now a feature of |
|
133 |
the ``pyramid_handlers`` package. |
|
134 |
|
2fa576
|
135 |
- The ``pylons_minimal``, ``pylons_basic`` and ``pylons_sqla`` paster |
CM |
136 |
templates were removed. Use ``pyramid_sqla`` (available from PyPI) as a |
|
137 |
generic replacement for Pylons-esque development. |
|
138 |
|
c1eb0c
|
139 |
- The ``make_app`` function has been removed from the ``pyramid.router`` |
CM |
140 |
module. It continues life within the ``pyramid_zcml`` package. This |
|
141 |
leaves the ``pyramid.router`` module without any API functions. |
|
142 |
|
|
143 |
- The ``configure_zcml`` setting within the deployment settings (within |
|
144 |
``**settings`` passed to a Pyramid ``main`` function) has ceased to have any |
|
145 |
meaning. |
|
146 |
|
f52d59
|
147 |
Features |
CM |
148 |
-------- |
|
149 |
|
|
150 |
- ``pyramid.testing.setUp`` and ``pyramid.testing.tearDown`` have been |
|
151 |
undeprecated. They are now the canonical setup and teardown APIs for test |
|
152 |
configuration, replacing "direct" creation of a Configurator. This is a |
|
153 |
change designed to provide a facade that will protect against any future |
|
154 |
Configurator deprecations. |
|
155 |
|
f2681a
|
156 |
- Add ``charset`` attribute to ``pyramid.testing.DummyRequest`` |
CM |
157 |
(unconditionally ``UTF-8``). |
|
158 |
|
d93ea2
|
159 |
- Add ``add_directive`` method to configurator, which allows framework |
CM |
160 |
extenders to add methods to the configurator (ala ZCML directives). |
|
161 |
|
08170a
|
162 |
- When ``Configurator.include`` is passed a *module* as an argument, it |
CM |
163 |
defaults to attempting to find and use a callable named ``includeme`` |
|
164 |
within that module. This makes it possible to use |
|
165 |
``config.include('some.module')`` rather than |
|
166 |
``config.include('some.module.somefunc')`` as long as the include function |
|
167 |
within ``some.module`` is named ``includeme``. |
|
168 |
|
c1eb0c
|
169 |
- The ``bfg2pyramid`` script now converts ZCML include tags that have |
CM |
170 |
``repoze.bfg.includes`` as a package attribute to the value |
|
171 |
``pyramid_zcml``. For example, ``<include package="repoze.bfg.includes">`` |
|
172 |
will be converted to ``<include package="pyramid_zcml">``. |
|
173 |
|
f52d59
|
174 |
Paster Templates |
CM |
175 |
---------------- |
|
176 |
|
|
177 |
- All paster templates now use ``pyramid.testing.setUp`` and |
|
178 |
``pyramid.testing.tearDown`` rather than creating a Configurator "by hand" |
|
179 |
within their ``tests.py`` module, as per decision in features above. |
|
180 |
|
079bb2
|
181 |
- The ``starter_zcml`` paster template has been moved to the ``pyramid_zcml`` |
CM |
182 |
package. |
|
183 |
|
f52d59
|
184 |
Documentation |
CM |
185 |
------------- |
|
186 |
|
|
187 |
- The wiki and wiki2 tutorials now use ``pyramid.testing.setUp`` and |
|
188 |
``pyramid.testing.tearDown`` rather than creating a Configurator "by hand", |
|
189 |
as per decision in features above. |
|
190 |
|
|
191 |
- The "Testing" narrative chapter now explains ``pyramid.testing.setUp`` and |
|
192 |
``pyramid.testing.tearDown`` instead of Configurator creation and |
|
193 |
``Configurator.begin()`` and ``Configurator.end()``. |
45b636
|
194 |
|
6a790b
|
195 |
- Document the ``request.override_renderer`` attribute within the narrative |
CM |
196 |
"Renderers" chapter in a section named "Overriding A Renderer at Runtime". |
|
197 |
|
d4b0ea
|
198 |
- The "Declarative Configuration" narrative chapter has been removed (it was |
c9c3c4
|
199 |
moved to the ``pyramid_zcml`` package). |
CM |
200 |
|
|
201 |
- Most references to ZCML in narrative chapters have been removed or |
|
202 |
redirected to ``pyramid_zcml`` locations. |
d4b0ea
|
203 |
|
206188
|
204 |
Deprecations |
CM |
205 |
------------ |
|
206 |
|
|
207 |
- Deprecation warnings related to import of the following API functions were |
|
208 |
added: ``pyramid.traversal.find_model``, ``pyramid.traversal.model_path``, |
|
209 |
``pyramid.traversal.model_path_tuple``, ``pyramid.url.model_url``. The |
|
210 |
instructions emitted by the deprecation warnings instruct the developer to |
|
211 |
change these method spellings to their ``resource`` equivalents. This is a |
|
212 |
consequence of the mass concept rename of "model" to "resource" performed |
|
213 |
in 1.0a7. |
|
214 |
|
a063af
|
215 |
1.0a9 (2011-01-08) |
CM |
216 |
================== |
096c4b
|
217 |
|
afbc5d
|
218 |
Bug Fixes |
CM |
219 |
--------- |
|
220 |
|
|
221 |
- The ``proutes`` command tried too hard to resolve the view for printing, |
|
222 |
resulting in exceptions when an exceptional root factory was encountered. |
|
223 |
Instead of trying to resolve the view, if it cannot, it will now just print |
|
224 |
``<unknown>``. |
bae647
|
225 |
|
07ee47
|
226 |
- The `self` argument was included in new methods of the ``ISession`` interface |
56a8d0
|
227 |
signature, causing ``pyramid_beaker`` tests to fail. |
07ee47
|
228 |
|
8673fb
|
229 |
- Readd ``pyramid.traversal.model_path_tuple`` as an alias for |
CM |
230 |
``pyramid.traversal.resource_path_tuple`` for backwards compatibility. |
|
231 |
|
bae647
|
232 |
Features |
RM |
233 |
-------- |
|
234 |
|
5653d1
|
235 |
- Add a new API ``pyramid.url.current_route_url``, which computes a URL based |
CM |
236 |
on the "current" route (if any) and its matchdict values. |
|
237 |
|
95c9f6
|
238 |
- ``config.add_view`` now accepts a ``decorator`` keyword argument, a callable |
CM |
239 |
which will decorate the view callable before it is added to the registry. |
bae647
|
240 |
|
60eccf
|
241 |
- If a handler class provides an ``__action_decorator__`` attribute (usually |
CM |
242 |
a classmethod or staticmethod), use that as the decorator for each view |
95c9f6
|
243 |
registration for that handler. |
744d76
|
244 |
|
2526d8
|
245 |
- The ``pyramid.interfaces.IAuthenticationPolicy`` interface now specifies an |
CM |
246 |
``unauthenticated_userid`` method. This method supports an important |
|
247 |
optimization required by people who are using persistent storages which do |
|
248 |
not support object caching and whom want to create a "user object" as a |
|
249 |
request attribute. |
|
250 |
|
|
251 |
- A new API has been added to the ``pyramid.security`` module named |
|
252 |
``unauthenticated_userid``. This API function calls the |
|
253 |
``unauthenticated_userid`` method of the effective security policy. |
|
254 |
|
|
255 |
- An ``unauthenticated_userid`` method has been added to the dummy |
|
256 |
authentication policy returned by |
|
257 |
``pyramid.config.Configurator.testing_securitypolicy``. It returns the |
|
258 |
same thing as that the dummy authentication policy's |
|
259 |
``authenticated_userid`` method. |
|
260 |
|
441666
|
261 |
- The class ``pyramid.authentication.AuthTktCookieHelper`` is now an API. |
CM |
262 |
This class can be used by third-party authentication policy developers to |
|
263 |
help in the mechanics of authentication cookie-setting. |
|
264 |
|
d95cd9
|
265 |
- New constructor argument to Configurator: ``default_view_mapper``. Useful |
CM |
266 |
to create systems that have alternate view calling conventions. A view |
|
267 |
mapper allows objects that are meant to be used as view callables to have |
|
268 |
an arbitrary argument list and an arbitrary result. The object passed as |
|
269 |
``default_view_mapper`` should implement the |
|
270 |
``pyramid.interfaces.IViewMapperFactory`` interface. |
|
271 |
|
|
272 |
- add a ``set_view_mapper`` API to Configurator. Has |
|
273 |
the same result as passing ``default_view_mapper`` to the Configurator |
|
274 |
constructor. |
|
275 |
|
5e3d64
|
276 |
- ``config.add_view`` now accepts a ``mapper`` keyword argument, which should |
CM |
277 |
either be ``None``, a string representing a Python dotted name, or an |
|
278 |
object which is an ``IViewMapperFactory``. This feature is not useful for |
|
279 |
"civilians", only for extension writers. |
d95cd9
|
280 |
|
CM |
281 |
- Allow static renderer provided during view registration to be overridden at |
|
282 |
request time via a request attribute named ``override_renderer``, which |
|
283 |
should be the name of a previously registered renderer. Useful to provide |
|
284 |
"omnipresent" RPC using existing rendered views. |
|
285 |
|
51b2e8
|
286 |
- Instances of ``pyramid.testing.DummyRequest`` now have a ``session`` |
CM |
287 |
object, which is mostly a dictionary, but also implements the other session |
|
288 |
API methods for flash and CSRF. |
|
289 |
|
2526d8
|
290 |
Backwards Incompatibilities |
CM |
291 |
--------------------------- |
|
292 |
|
|
293 |
- Since the ``pyramid.interfaces.IAuthenticationPolicy`` interface now |
|
294 |
specifies that a policy implementation must implement an |
|
295 |
``unauthenticated_userid`` method, all third-party custom authentication |
|
296 |
policies now must implement this method. It, however, will only be called |
|
297 |
when the global function named ``pyramid.security.unauthenticated_userid`` |
|
298 |
is invoked, so if you're not invoking that, you will not notice any issues. |
|
299 |
|
14f863
|
300 |
- ``pyramid.interfaces.ISession.get_csrf_token`` now mandates that an |
CM |
301 |
implementation should return a *new* token if one doesn't already exist in |
|
302 |
the session (previously it would return None). The internal sessioning |
|
303 |
implementation has been changed. |
|
304 |
|
7e9d3c
|
305 |
Documentation |
CM |
306 |
------------- |
|
307 |
|
|
308 |
- The (weak) "Converting a CMF Application to Pyramid" tutorial has been |
|
309 |
removed from the tutorials section. It was moved to the |
|
310 |
``pyramid_tutorials`` Github repository. |
|
311 |
|
a65bec
|
312 |
- The "Resource Location and View Lookup" chapter has been replaced with a |
CM |
313 |
variant of Rob Miller's "Much Ado About Traversal" (originally published at |
|
314 |
http://blog.nonsequitarian.org/2010/much-ado-about-traversal/). |
|
315 |
|
|
316 |
- Many minor wording tweaks and refactorings (merged Casey Duncan's docs |
|
317 |
fork, in which he is working on general editing). |
|
318 |
|
8839b6
|
319 |
- Added (weak) description of new view mapper feature to Hooks narrative |
CM |
320 |
chapter. |
|
321 |
|
f3f45a
|
322 |
- Split views chapter into 2: View Callables and View Configuration. |
CM |
323 |
|
|
324 |
- Reorder Renderers and Templates chapters after View Callables but before |
|
325 |
View Configuration. |
|
326 |
|
|
327 |
- Merge Session Objects, Cross-Site Request Forgery, and Flash Messaging |
|
328 |
chapter into a single Sessions chapter. |
|
329 |
|
5b20ad
|
330 |
- The Wiki and Wiki2 tutorials now have much nicer CSS and graphics. |
CM |
331 |
|
95c9f6
|
332 |
Internals |
CM |
333 |
--------- |
|
334 |
|
|
335 |
- The "view derivation" code is now factored into a set of classes rather |
|
336 |
than a large number of standalone functions (a side effect of the |
5e3d64
|
337 |
view mapper refactoring). |
95c9f6
|
338 |
|
CM |
339 |
- The ``pyramid.renderer.RendererHelper`` class has grown a ``render_view`` |
|
340 |
method, which is used by the default view mapper (a side effect of the |
5e3d64
|
341 |
view mapper refactoring). |
95c9f6
|
342 |
|
CM |
343 |
- The object passed as ``renderer`` to the "view deriver" is now an instance |
|
344 |
of ``pyramid.renderers.RendererHelper`` rather than a dictionary (a side |
5e3d64
|
345 |
effect of view mapper refactoring). |
95c9f6
|
346 |
|
13bfb5
|
347 |
- The class used as the "page template" in ``pyramid.chameleon_text`` was |
CM |
348 |
removed, in preference to using a Chameleon-inbuilt version. |
|
349 |
|
95c95b
|
350 |
- A view callable wrapper registered in the registry now contains an |
CM |
351 |
``__original_view__`` attribute which references the original view callable |
|
352 |
(or class). |
|
353 |
|
2526d8
|
354 |
- The (non-API) method of all internal authentication policy implementations |
CM |
355 |
previously named ``_get_userid`` is now named ``unauthenticated_userid``, |
|
356 |
promoted to an API method. If you were overriding this method, you'll now |
|
357 |
need to override it as ``unauthenticated_userid`` instead. |
|
358 |
|
80aa77
|
359 |
- Remove (non-API) function of config.py named _map_view. |
9c1d34
|
360 |
|
636294
|
361 |
1.0a8 (2010-12-27) |
CM |
362 |
================== |
13de5d
|
363 |
|
e6f45b
|
364 |
Bug Fixes |
CM |
365 |
--------- |
|
366 |
|
|
367 |
- The name ``registry`` was not available in the ``paster pshell`` |
|
368 |
environment under IPython. |
|
369 |
|
bac5b3
|
370 |
Features |
CM |
371 |
-------- |
17c4de
|
372 |
|
bac5b3
|
373 |
- If a resource implements a ``__resource_url__`` method, it will be called |
CM |
374 |
as the result of invoking the ``pyramid.url.resource_url`` function to |
|
375 |
generate a URL, overriding the default logic. See the new "Generating The |
|
376 |
URL Of A Resource" section within the Resources narrative chapter. |
|
377 |
|
4df636
|
378 |
- Added flash messaging, as described in the "Flash Messaging" narrative |
CM |
379 |
documentation chapter. |
|
380 |
|
319793
|
381 |
- Added CSRF token generation, as described in the narrative chapter entitled |
CM |
382 |
"Preventing Cross-Site Request Forgery Attacks". |
|
383 |
|
f5bafd
|
384 |
- Prevent misunderstanding of how the ``view`` and ``view_permission`` |
CM |
385 |
arguments to add_route work by raising an exception during configuration if |
|
386 |
view-related arguments exist but no ``view`` argument is passed. |
|
387 |
|
90a327
|
388 |
- Add ``paster proute`` command which displays a summary of the routing |
CM |
389 |
table. See the narrative documentation section within the "URL Dispatch" |
|
390 |
chapter entitled "Displaying All Application Routes". |
|
391 |
|
2a5ae0
|
392 |
Paster Templates |
CM |
393 |
---------------- |
|
394 |
|
|
395 |
- The ``pyramid_zodb`` Paster template no longer employs ZCML. Instead, it |
|
396 |
is based on scanning. |
|
397 |
|
bac5b3
|
398 |
Documentation |
CM |
399 |
------------- |
|
400 |
|
|
401 |
- Added "Generating The URL Of A Resource" section to the Resources narrative |
|
402 |
chapter (includes information about overriding URL generation using |
|
403 |
``__resource_url__``). |
|
404 |
|
|
405 |
- Added "Generating the Path To a Resource" section to the Resources |
|
406 |
narrative chapter. |
|
407 |
|
|
408 |
- Added "Finding a Resource by Path" section to the Resources narrative |
|
409 |
chapter. |
13de5d
|
410 |
|
f4f41f
|
411 |
- Added "Obtaining the Lineage of a Resource" to the Resources narrative |
CM |
412 |
chapter. |
|
413 |
|
|
414 |
- Added "Determining if a Resource is In The Lineage of Another Resource" to |
|
415 |
Resources narrative chapter. |
|
416 |
|
b32bfd
|
417 |
- Added "Finding the Root Resource" to Resources narrative chapter. |
CM |
418 |
|
|
419 |
- Added "Finding a Resource With a Class or Interface in Lineage" to |
|
420 |
Resources narrative chapter. |
|
421 |
|
4df636
|
422 |
- Added a "Flash Messaging" narrative documentation chapter. |
CM |
423 |
|
319793
|
424 |
- Added a narrative chapter entitled "Preventing Cross-Site Request Forgery |
CM |
425 |
Attacks". |
|
426 |
|
2a5ae0
|
427 |
- Changed the "ZODB + Traversal Wiki Tutorial" based on changes to |
CM |
428 |
``pyramid_zodb`` Paster template. |
|
429 |
|
10fd8f
|
430 |
- Added "Advanced Configuration" narrative chapter which documents how to |
CM |
431 |
deal with configuration conflicts, two-phase configuration, ``include`` and |
|
432 |
``commit``. |
|
433 |
|
b33dca
|
434 |
- Fix API documentation rendering for ``pyramid.view.static`` |
CM |
435 |
|
22533d
|
436 |
- Add "Pyramid Provides More Than One Way to Do It" to Design Defense |
CM |
437 |
documentation. |
|
438 |
|
56db9e
|
439 |
- Changed "Static Assets" narrative chapter: clarify that ``name`` represents |
CM |
440 |
a prefix unless it's a URL, added an example of a root-relative static view |
|
441 |
fallback for URL dispatch, added an example of creating a simple view that |
|
442 |
returns the body of a file. |
|
443 |
|
e1a7e0
|
444 |
- Move ZCML usage in Hooks chapter to Declarative Configuration chapter. |
CM |
445 |
|
88b9ee
|
446 |
- Merge "Static Assets" chapter into the "Assets" chapter. |
CM |
447 |
|
90a327
|
448 |
- Added narrative documentation section within the "URL Dispatch" chapter |
CM |
449 |
entitled "Displaying All Application Routes" (for ``paster proutes`` |
|
450 |
command). |
|
451 |
|
bd3bf1
|
452 |
1.0a7 (2010-12-20) |
CM |
453 |
================== |
a2796f
|
454 |
|
aa1ec8
|
455 |
Terminology Changes |
CM |
456 |
------------------- |
|
457 |
|
|
458 |
- The Pyramid concept previously known as "model" is now known as "resource". |
|
459 |
As a result: |
|
460 |
|
|
461 |
- The following API changes have been made:: |
|
462 |
|
|
463 |
pyramid.url.model_url -> |
|
464 |
pyramid.url.resource_url |
477e99
|
465 |
|
aa1ec8
|
466 |
pyramid.traversal.find_model -> |
CM |
467 |
pyramid.url.find_resource |
477e99
|
468 |
|
aa1ec8
|
469 |
pyramid.traversal.model_path -> |
CM |
470 |
pyramid.traversal.resource_path |
477e99
|
471 |
|
aa1ec8
|
472 |
pyramid.traversal.model_path_tuple -> |
CM |
473 |
pyramid.traversal.resource_path_tuple |
477e99
|
474 |
|
aa1ec8
|
475 |
pyramid.traversal.ModelGraphTraverser -> |
CM |
476 |
pyramid.traversal.ResourceTreeTraverser |
477e99
|
477 |
|
aa1ec8
|
478 |
pyramid.config.Configurator.testing_models -> |
CM |
479 |
pyramid.config.Configurator.testing_resources |
477e99
|
480 |
|
aa1ec8
|
481 |
pyramid.testing.registerModels -> |
CM |
482 |
pyramid.testing.registerResources |
477e99
|
483 |
|
aa1ec8
|
484 |
pyramid.testing.DummyModel -> |
CM |
485 |
pyramid.testing.DummyResource |
|
486 |
|
|
487 |
- All documentation which previously referred to "model" now refers to |
bbb9b5
|
488 |
"resource". |
aa1ec8
|
489 |
|
CM |
490 |
- The ``starter`` and ``starter_zcml`` paster templates now have a |
|
491 |
``resources.py`` module instead of a ``models.py`` module. |
|
492 |
|
|
493 |
- Positional argument names of various APIs have been changed from |
|
494 |
``model`` to ``resource``. |
|
495 |
|
|
496 |
Backwards compatibility shims have been left in place in all cases. They |
|
497 |
will continue to work "forever". |
|
498 |
|
|
499 |
- The Pyramid concept previously known as "resource" is now known as "asset". |
|
500 |
As a result: |
|
501 |
|
|
502 |
- The (non-API) module previously known as ``pyramid.resource`` is now |
|
503 |
known as ``pyramid.asset``. |
|
504 |
|
|
505 |
- All docs that previously referred to "resource specification" now refer |
|
506 |
to "asset specification". |
|
507 |
|
|
508 |
- The following API changes were made:: |
|
509 |
|
|
510 |
pyramid.config.Configurator.absolute_resource_spec -> |
|
511 |
pyramid.config.Configurator.absolute_asset_spec |
477e99
|
512 |
|
aa1ec8
|
513 |
pyramid.config.Configurator.override_resource -> |
CM |
514 |
pyramid.config.Configurator.override_asset |
|
515 |
|
|
516 |
- The ZCML directive previously known as ``resource`` is now known as |
|
517 |
``asset``. |
|
518 |
|
|
519 |
- The setting previously known as ``BFG_RELOAD_RESOURCES`` (envvar) or |
|
520 |
``reload_resources`` (config file) is now known, respectively, as |
7b9066
|
521 |
``PYRAMID_RELOAD_ASSETS`` and ``reload_assets``. |
aa1ec8
|
522 |
|
CM |
523 |
Backwards compatibility shims have been left in place in all cases. They |
|
524 |
will continue to work "forever". |
|
525 |
|
7906d2
|
526 |
Bug Fixes |
CM |
527 |
--------- |
|
528 |
|
|
529 |
- Make it possible to succesfully run all tests via ``nosetests`` command |
|
530 |
directly (rather than indirectly via ``python setup.py nosetests``). |
|
531 |
|
14b78b
|
532 |
- When a configuration conflict is encountered during scanning, the conflict |
CM |
533 |
exception now shows the decorator information that caused the conflict. |
|
534 |
|
24bf2a
|
535 |
Features |
CM |
536 |
-------- |
|
537 |
|
|
538 |
- Added ``debug_routematch`` configuration setting that logs matched routes |
|
539 |
(including the matchdict and predicates). |
|
540 |
|
dc06b0
|
541 |
- The name ``registry`` is now available in a ``pshell`` environment by |
CM |
542 |
default. It is the application registry object. |
|
543 |
|
e79d36
|
544 |
Environment |
CM |
545 |
----------- |
|
546 |
|
|
547 |
- All environment variables which used to be prefixed with ``BFG_`` are now |
|
548 |
prefixed with ``PYRAMID_`` (e.g. ``BFG_DEBUG_NOTFOUND`` is now |
|
549 |
``PYRAMID_DEBUG_NOTFOUND``) |
|
550 |
|
24bf2a
|
551 |
Documentation |
CM |
552 |
------------- |
|
553 |
|
|
554 |
- Added "Debugging Route Matching" section to the urldispatch narrative |
|
555 |
documentation chapter. |
|
556 |
|
7b9066
|
557 |
- Added reference to ``PYRAMID_DEBUG_ROUTEMATCH`` envvar and ``debug_routematch`` |
24bf2a
|
558 |
config file setting to the Environment narrative docs chapter. |
CM |
559 |
|
dc06b0
|
560 |
- Changed "Project" chapter slightly to expand on use of ``paster pshell``. |
CM |
561 |
|
b3edcf
|
562 |
- Direct Jython users to Mako rather than Jinja2 in "Install" narrative |
CM |
563 |
chapter. |
|
564 |
|
aa1ec8
|
565 |
- Many changes to support terminological renaming of "model" to "resource" |
CM |
566 |
and "resource" to "asset". |
|
567 |
|
6ee49a
|
568 |
- Added an example of ``WebTest`` functional testing to the testing narrative |
CM |
569 |
chapter. |
|
570 |
|
bdb5ed
|
571 |
- Rearranged chapter ordering by popular demand (URL dispatch first, then |
CM |
572 |
traversal). Put hybrid chapter after views chapter. |
|
573 |
|
a59c78
|
574 |
- Split off "Renderers" as its own chapter from "Views" chapter in narrative |
CM |
575 |
documentation. |
|
576 |
|
3f6b38
|
577 |
Paster Templates |
CM |
578 |
---------------- |
|
579 |
|
|
580 |
- Added ``debug_routematch = false`` to all paster templates. |
|
581 |
|
14b78b
|
582 |
Dependencies |
CM |
583 |
------------ |
|
584 |
|
|
585 |
- Depend on Venusian >= 0.5 (for scanning conflict exception decoration). |
|
586 |
|
07bd03
|
587 |
1.0a6 (2010-12-15) |
CM |
588 |
================== |
73b432
|
589 |
|
c5d172
|
590 |
Bug Fixes |
CM |
591 |
--------- |
|
592 |
|
7cfd68
|
593 |
- 1.0a5 introduced a bug when ``pyramid.config.Configurator.scan`` was used |
CM |
594 |
without a ``package`` argument (e.g. ``config.scan()`` as opposed to |
|
595 |
``config.scan('packagename')``. The symptoms were: lots of deprecation |
|
596 |
warnings printed to the console about imports of deprecated Pyramid |
43d075
|
597 |
functions and classes and non-detection of view callables decorated with |
CM |
598 |
``view_config`` decorators. This has been fixed. |
73b432
|
599 |
|
86a304
|
600 |
- Tests now pass on Windows (no bugs found, but a few tests in the test suite |
CM |
601 |
assumed UNIX path segments in filenames). |
|
602 |
|
55e60c
|
603 |
Documentation |
CM |
604 |
------------- |
|
605 |
|
|
606 |
- If you followed it to-the-letter, the ZODB+Traversal Wiki tutorial would |
|
607 |
instruct you to run a test which would fail because the view callable |
|
608 |
generated by the ``pyramid_zodb`` tutorial used a one-arg view callable, |
|
609 |
but the test in the sample code used a two-arg call. |
|
610 |
|
|
611 |
- Updated ZODB+Traversal tutorial setup.py of all steps to match what's |
|
612 |
generated by ``pyramid_zodb``. |
|
613 |
|
a66a13
|
614 |
- Fix reference to ``repoze.bfg.traversalwrapper`` in "Models" chapter (point |
CM |
615 |
at ``pyramid_traversalwrapper`` instead). |
|
616 |
|
ec8833
|
617 |
1.0a5 (2010-12-14) |
CM |
618 |
================== |
aedc21
|
619 |
|
957f61
|
620 |
Features |
CM |
621 |
-------- |
|
622 |
|
e8edd5
|
623 |
- Add a ``handler`` ZCML directive. This directive does the same thing as |
CM |
624 |
``pyramid.configuration.add_handler``. |
|
625 |
|
d7f259
|
626 |
- A new module named ``pyramid.config`` was added. It subsumes the duties of |
f360d9
|
627 |
the older ``pyramid.configuration`` module. |
d7f259
|
628 |
|
CM |
629 |
- The new ``pyramid.config.Configurator` class has API methods that the older |
|
630 |
``pyramid.configuration.Configurator`` class did not: ``with_context`` (a |
|
631 |
classmethod), ``include``, ``action``, and ``commit``. These methods exist |
|
632 |
for imperative application extensibility purposes. |
e16ab0
|
633 |
|
CM |
634 |
- The ``pyramid.testing.setUp`` function now accepts an ``autocommit`` |
|
635 |
keyword argument, which defaults to ``True``. If it is passed ``False``, |
|
636 |
the Config object returned by ``setUp`` will be a non-autocommiting Config |
|
637 |
object. |
957f61
|
638 |
|
CM |
639 |
- Add logging configuration to all paster templates. |
|
640 |
|
|
641 |
- ``pyramid_alchemy``, ``pyramid_routesalchemy``, and ``pylons_sqla`` paster |
|
642 |
templates now use idiomatic SQLAlchemy configuration in their respective |
|
643 |
``.ini`` files and Python code. |
|
644 |
|
0cb7ac
|
645 |
- ``pyramid.testing.DummyRequest`` now has a class variable, |
CM |
646 |
``query_string``, which defaults to the empty string. |
c5f557
|
647 |
|
e880a4
|
648 |
- Add support for json on GAE by catching NotImplementedError and importing |
CM |
649 |
simplejson from django.utils. |
|
650 |
|
a9f17c
|
651 |
- The Mako renderer now accepts a resource specification for |
CM |
652 |
``mako.module_directory``. |
|
653 |
|
81e648
|
654 |
- New boolean Mako settings variable ``mako.strict_undefined``. See `Mako |
CM |
655 |
Context Variables |
|
656 |
<http://www.makotemplates.org/docs/runtime.html#context-variables>`_ for |
|
657 |
its meaning. |
|
658 |
|
|
659 |
Dependencies |
|
660 |
------------ |
|
661 |
|
|
662 |
- Depend on Mako 0.3.6+ (we now require the ``strict_undefined`` feature). |
|
663 |
|
b44b93
|
664 |
Bug Fixes |
CM |
665 |
--------- |
|
666 |
|
a56564
|
667 |
- When creating a Configurator from within a ``paster pshell`` session, you |
CM |
668 |
were required to pass a ``package`` argument although ``package`` is not |
|
669 |
actually required. If you didn't pass ``package``, you would receive an |
|
670 |
error something like ``KeyError: '__name__'`` emanating from the |
|
671 |
``pyramid.path.caller_module`` function. This has now been fixed. |
|
672 |
|
b44b93
|
673 |
- The ``pyramid_routesalchemy`` paster template's unit tests failed |
CM |
674 |
(``AssertionError: 'SomeProject' != 'someproject'``). This is fixed. |
|
675 |
|
76e48b
|
676 |
- Make default renderer work (renderer factory registered with no name, which |
CM |
677 |
is active for every view unless the view names a specific renderer). |
|
678 |
|
a9f17c
|
679 |
- The Mako renderer did not properly turn the ``mako.imports``, |
CM |
680 |
``mako.default_filters``, and ``mako.imports`` settings into lists. |
|
681 |
|
|
682 |
- The Mako renderer did not properly convert the ``mako.error_handler`` |
|
683 |
setting from a dotted name to a callable. |
|
684 |
|
2197ff
|
685 |
Documentation |
CM |
686 |
------------- |
|
687 |
|
ec8833
|
688 |
- Merged many wording, readability, and correctness changes to narrative |
CM |
689 |
documentation chapters from https://github.com/caseman/pyramid (up to and |
|
690 |
including "Models" narrative chapter). |
|
691 |
|
2197ff
|
692 |
- "Sample Applications" section of docs changed to note existence of Cluegun, |
CM |
693 |
Shootout and Virginia sample applications, ported from their repoze.bfg |
|
694 |
origin packages. |
|
695 |
|
d0e2f6
|
696 |
- SQLAlchemy+URLDispatch tutorial updated to integrate changes to |
CM |
697 |
``pyramid_routesalchemy`` template. |
|
698 |
|
e26903
|
699 |
- Add ``pyramid.interfaces.ITemplateRenderer`` interface to Interfaces API |
CM |
700 |
chapter (has ``implementation()`` method, required to be used when getting |
|
701 |
at Chameleon macros). |
|
702 |
|
aa3306
|
703 |
- Add a "Modifying Package Structure" section to the project narrative |
CM |
704 |
documentation chapter (explain turning a module into a package). |
aedc21
|
705 |
|
4d660d
|
706 |
- Documentation was added for the new ``handler`` ZCML directive in the ZCML |
CM |
707 |
section. |
|
708 |
|
f360d9
|
709 |
Deprecations |
CM |
710 |
------------ |
|
711 |
|
|
712 |
- ``pyramid.configuration.Configurator`` is now deprecated. Use |
|
713 |
``pyramid.config.Configurator``, passing its constructor |
|
714 |
``autocommit=True`` instead. The ``pyramid.configuration.Configurator`` |
|
715 |
alias will live for a long time, as every application uses it, but its |
|
716 |
import now issues a deprecation warning. The |
|
717 |
``pyramid.config.Configurator`` class has the same API as |
|
718 |
``pyramid.configuration.Configurator`` class, which it means to replace, |
|
719 |
except by default it is a *non-autocommitting* configurator. The |
|
720 |
now-deprecated ``pyramid.configuration.Configurator`` will autocommit every |
|
721 |
time a configuration method is called. |
|
722 |
|
|
723 |
The ``pyramid.configuration`` module remains, but it is deprecated. Use |
|
724 |
``pyramid.config`` instead. |
|
725 |
|
7eb4ad
|
726 |
1.0a4 (2010-11-21) |
CM |
727 |
================== |
745a61
|
728 |
|
2c9d14
|
729 |
Features |
CM |
730 |
-------- |
|
731 |
|
e84116
|
732 |
- URL Dispatch now allows for replacement markers to be located anywhere |
BB |
733 |
in the pattern, instead of immediately following a ``/``. |
47c9f8
|
734 |
|
4018ad
|
735 |
- URL Dispatch now uses the form ``{marker}`` to denote a replace marker in |
7eb4ad
|
736 |
the route pattern instead of ``:marker``. The old colon-style marker syntax |
CM |
737 |
is still accepted for backwards compatibility. The new format allows a |
|
738 |
regular expression for that marker location to be used instead of the |
|
739 |
default ``[^/]+``, for example ``{marker:\d+}`` is now valid to require the |
|
740 |
marker to be digits. |
47c9f8
|
741 |
|
2c9d14
|
742 |
- Add a ``pyramid.url.route_path`` API, allowing folks to generate relative |
CM |
743 |
URLs. Calling ``route_path`` is the same as calling |
|
744 |
``pyramid.url.route_url`` with the argument ``_app_url`` equal to the empty |
|
745 |
string. |
|
746 |
|
|
747 |
- Add a ``pyramid.request.Request.route_path`` API. This is a convenience |
|
748 |
method of the request which calls ``pyramid.url.route_url``. |
|
749 |
|
85ee02
|
750 |
- Make test suite pass on Jython (requires PasteScript trunk, presumably to |
CM |
751 |
be 1.7.4). |
|
752 |
|
29b7aa
|
753 |
- Make test suite pass on PyPy (Chameleon doesn't work). |
CM |
754 |
|
614f00
|
755 |
- Surrounding application configuration with ``config.begin()`` and |
CM |
756 |
``config.end()`` is no longer necessary. All paster templates have been |
|
757 |
changed to no longer call these functions. |
|
758 |
|
35ce2a
|
759 |
- Fix configurator to not convert ``ImportError`` to ``ConfigurationError`` |
CM |
760 |
if the import that failed was unrelated to the import requested via a |
|
761 |
dotted name when resolving dotted names (such as view dotted names). |
|
762 |
|
614f00
|
763 |
Documentation |
CM |
764 |
------------- |
|
765 |
|
|
766 |
- SQLAlchemy+URLDispatch and ZODB+Traversal tutorials have been updated to |
|
767 |
not call ``config.begin()`` or ``config.end()``. |
|
768 |
|
111a6f
|
769 |
Bug Fixes |
CM |
770 |
--------- |
|
771 |
|
|
772 |
- Add deprecation warnings to import of ``pyramid.chameleon_text`` and |
|
773 |
``pyramid.chameleon_zpt`` of ``get_renderer``, ``get_template``, |
|
774 |
``render_template``, and ``render_template_to_response``. |
|
775 |
|
34f44d
|
776 |
- Add deprecation warning for import of ``pyramid.zcml.zcml_configure`` and |
CM |
777 |
``pyramid.zcml.file_configure``. |
|
778 |
|
1e00f3
|
779 |
- The ``pyramid_alchemy`` paster template had a typo, preventing an import |
CM |
780 |
from working. |
|
781 |
|
a66593
|
782 |
- Fix apparent failures when calling ``pyramid.traversal.find_model(root, |
CM |
783 |
path)`` or ``pyramid.traversal.traverse(path)`` when ``path`` is |
|
784 |
(erroneously) a Unicode object. The user is meant to pass these APIs a |
|
785 |
string object, never a Unicode object. In practice, however, users indeed |
|
786 |
pass Unicode. Because the string that is passed must be ASCII encodeable, |
|
787 |
now, if they pass a Unicode object, its data is eagerly converted to an |
|
788 |
ASCII string rather than being passed along to downstream code as a |
|
789 |
convenience to the user and to prevent puzzling second-order failures from |
|
790 |
cropping up (all failures will occur within ``pyramid.traversal.traverse`` |
7eb4ad
|
791 |
rather than later down the line as the result of calling e.g. |
a66593
|
792 |
``traversal_path``). |
CM |
793 |
|
34f44d
|
794 |
Backwards Incompatibilities |
CM |
795 |
--------------------------- |
|
796 |
|
|
797 |
- The ``pyramid.testing.zcml_configure`` API has been removed. It had been |
406259
|
798 |
advertised as removed since repoze.bfg 1.2a1, but hadn't actually been. |
34f44d
|
799 |
|
b68aad
|
800 |
Deprecations |
CM |
801 |
------------ |
|
802 |
|
|
803 |
- The ``pyramid.settings.get_settings`` API is now deprecated. Use |
84df81
|
804 |
``pyramid.threadlocals.get_current_registry().settings`` instead or use the |
b68aad
|
805 |
``settings`` attribute of the registry available from the request |
CM |
806 |
(``request.registry.settings``). |
745a61
|
807 |
|
cb96e2
|
808 |
Documentation |
CM |
809 |
------------- |
|
810 |
|
|
811 |
- Removed ``zodbsessions`` tutorial chapter. It's still useful, but we now |
|
812 |
have a SessionFactory abstraction which competes with it, and maintaining |
|
813 |
documentation on both ways to do it is a distraction. |
|
814 |
|
dbaa08
|
815 |
Internal |
CM |
816 |
-------- |
|
817 |
|
|
818 |
- Replace Twill with WebTest in internal integration tests (avoid deprecation |
|
819 |
warnings generated by Twill). |
|
820 |
|
3fa994
|
821 |
1.0a3 (2010-11-16) |
CM |
822 |
================== |
f4d693
|
823 |
|
9cca72
|
824 |
Features |
CM |
825 |
-------- |
|
826 |
|
ae60ba
|
827 |
- Added Mako TemplateLookup settings for ``mako.error_handler``, |
BB |
828 |
``mako.default_filters``, and ``mako.imports``. |
|
829 |
|
9cca72
|
830 |
- Normalized all paster templates: each now uses the name ``main`` to |
CM |
831 |
represent the function that returns a WSGI application, each now uses |
|
832 |
WebError, each now has roughly the same shape of development.ini style. |
|
833 |
|
51c305
|
834 |
- Added class vars ``matchdict`` and ``matched_route`` to |
CR |
835 |
``pyramid.request.Request``. Each is set to ``None``. |
|
836 |
|
fe4172
|
837 |
- New API method: ``pyramid.settings.asbool``. |
CM |
838 |
|
9e2e1c
|
839 |
- New API methods for ``pyramid.request.Request``: ``model_url``, |
CM |
840 |
``route_url``, and ``static_url``. These are simple passthroughs for their |
|
841 |
respective functions in ``pyramid.url``. |
4eafaa
|
842 |
|
5a972b
|
843 |
- The ``settings`` object which used to be available only when |
CM |
844 |
``request.settings.get_settings`` was called is now available as |
|
845 |
``registry.settings`` (e.g. ``request.registry.settings`` in view code). |
|
846 |
|
9cca72
|
847 |
Bug Fixes |
CM |
848 |
--------- |
|
849 |
|
|
850 |
- The pylons_* paster templates erroneously used the ``{squiggly}`` routing |
|
851 |
syntax as the pattern supplied to ``add_route``. This style of routing is |
|
852 |
not supported. They were replaced with ``:colon`` style route patterns. |
f4d693
|
853 |
|
7bd14c
|
854 |
- The pylons_* paster template used the same string |
CM |
855 |
(``your_app_secret_string``) for the ``session.secret`` setting in the |
|
856 |
generated ``development.ini``. This was a security risk if left unchanged |
|
857 |
in a project that used one of the templates to produce production |
|
858 |
applications. It now uses a randomly generated string. |
|
859 |
|
1ad856
|
860 |
Documentation |
CM |
861 |
------------- |
|
862 |
|
|
863 |
- ZODB+traversal wiki (``wiki``) tutorial updated due to changes to |
|
864 |
``pyramid_zodb`` paster template. |
|
865 |
|
40eb89
|
866 |
- SQLAlchemy+urldispach wiki (``wiki2``) tutorial updated due to changes to |
CM |
867 |
``pyramid_routesalchemy`` paster template. |
|
868 |
|
4eafaa
|
869 |
- Documented the ``matchdict`` and ``matched_route`` attributes of the |
CM |
870 |
request object in the Request API documentation. |
|
871 |
|
5a972b
|
872 |
Deprecations |
CM |
873 |
------------ |
|
874 |
|
|
875 |
- Obtaining the ``settings`` object via |
|
876 |
``registry.{get|query}Utility(ISettings)`` is now deprecated. Instead, |
|
877 |
obtain the ``settings`` object via the ``registry.settings`` attribute. A |
|
878 |
backwards compatibility shim was added to the registry object to register |
|
879 |
the settings object as an ISettings utility when ``setattr(registry, |
|
880 |
'settings', foo)`` is called, but it will be removed in a later release. |
|
881 |
|
|
882 |
- Obtaining the ``settings`` object via ``pyramid.settings.get_settings`` is |
|
883 |
now deprecated. Obtain it as the ``settings`` attribute of the registry |
|
884 |
now (obtain the registry via ``pyramid.threadlocal.get_registry`` or as |
|
885 |
``request.registry``). |
|
886 |
|
76d7eb
|
887 |
Behavior Differences |
CM |
888 |
-------------------- |
|
889 |
|
|
890 |
- Internal: ZCML directives no longer call get_current_registry() if there's |
|
891 |
a ``registry`` attribute on the ZCML context (kill off use of |
|
892 |
threadlocals). |
|
893 |
|
7b8d65
|
894 |
- Internal: Chameleon template renderers now accept two arguments: ``path`` |
CM |
895 |
and ``lookup``. ``Lookup`` will be an instance of a lookup class which |
|
896 |
supplies (late-bound) arguments for debug, reload, and translate. Any |
|
897 |
third-party renderers which use (the non-API) function |
|
898 |
``pyramid.renderers.template_renderer_factory`` will need to adjust their |
|
899 |
implementations to obey the new callback argument list. This change was to |
|
900 |
kill off inappropriate use of threadlocals. |
|
901 |
|
3d4e56
|
902 |
1.0a2 (2010-11-09) |
CM |
903 |
================== |
0af394
|
904 |
|
c721fd
|
905 |
Documentation |
CM |
906 |
------------- |
|
907 |
|
|
908 |
- All references to events by interface |
|
909 |
(e.g. ``pyramid.interfaces.INewRequest``) have been changed to reference |
|
910 |
their concrete classes (e.g. ``pyramid.events.NewRequest``) in |
|
911 |
documentation about making subscriptions. |
|
912 |
|
3d4e56
|
913 |
- All references to Pyramid-the-application were changed from mod-`pyramid` |
CM |
914 |
to app-`Pyramid`. A custom role setting was added to ``docs/conf.py`` to |
fd5ae9
|
915 |
allow for this. (internal) |
CM |
916 |
|
fcc3d1
|
917 |
1.0a1 (2010-11-05) |
CM |
918 |
================== |
5bbc23
|
919 |
|
fcc3d1
|
920 |
Features (delta from BFG 1.3) |
2e6905
|
921 |
------------------------------- |
CM |
922 |
|
07437c
|
923 |
- Mako templating renderer supports resource specification format for |
BB |
924 |
template lookups and within Mako templates. Absolute filenames must |
a62cc2
|
925 |
be used in Pyramid to avoid this lookup process. |
07437c
|
926 |
|
2e6905
|
927 |
- Add ``pyramid.httpexceptions`` module, which is a facade for the |
CM |
928 |
``webob.exc`` module. |
|
929 |
|
9b8d0c
|
930 |
- Direct built-in support for the Mako templating language. |
CM |
931 |
|
|
932 |
- A new configurator method exists: ``add_handler``. This method adds |
|
933 |
a Pylons-style "view handler" (such a thing used to be called a |
|
934 |
"controller" in Pylons 1.0). |
|
935 |
|
968209
|
936 |
- New argument to configurator: ``session_factory``. |
CM |
937 |
|
|
938 |
- New method on configurator: ``set_session_factory`` |
|
939 |
|
|
940 |
- Using ``request.session`` now returns a (dictionary-like) session |
|
941 |
object if a session factory has been configured. |
14dc81
|
942 |
|
CM |
943 |
- The request now has a new attribute: ``tmpl_context`` for benefit of |
|
944 |
Pylons users. |
|
945 |
|
197f0c
|
946 |
- The decorator previously known as ``pyramid.view.bfg_view`` is now |
CM |
947 |
known most formally as ``pyramid.view.view_config`` in docs and |
|
948 |
paster templates. An import of ``pyramid.view.bfg_view``, however, |
|
949 |
will continue to work "forever". |
|
950 |
|
6a3184
|
951 |
- New API methods in ``pyramid.session``: ``signed_serialize`` and |
CM |
952 |
``signed_deserialize``. |
|
953 |
|
1dad60
|
954 |
- New interface: ``pyramid.interfaces.IRendererInfo``. An object of this type |
CM |
955 |
is passed to renderer factory constructors (see "Backwards |
|
956 |
Incompatibilities"). |
|
957 |
|
a76e99
|
958 |
- New event type: ``pyramid.interfaces.IBeforeRender``. An object of this type |
CM |
959 |
is sent as an event before a renderer is invoked (but after the |
|
960 |
application-level renderer globals factory added via |
|
961 |
``pyramid.configurator.configuration.set_renderer_globals_factory``, if any, |
|
962 |
has injected its own keys). Applications may now subscribe to the |
|
963 |
``IBeforeRender`` event type in order to introspect the and modify the set of |
|
964 |
renderer globals before they are passed to a renderer. The event object |
|
965 |
iself has a dictionary-like interface that can be used for this purpose. For |
|
966 |
example:: |
|
967 |
|
|
968 |
from repoze.events import subscriber |
|
969 |
from pyramid.interfaces import IRendererGlobalsEvent |
|
970 |
|
|
971 |
@subscriber(IRendererGlobalsEvent) |
|
972 |
def add_global(event): |
|
973 |
event['mykey'] = 'foo' |
|
974 |
|
|
975 |
If a subscriber attempts to add a key that already exist in the renderer |
|
976 |
globals dictionary, a ``KeyError`` is raised. This limitation is due to the |
|
977 |
fact that subscribers cannot be ordered relative to each other. The set of |
|
978 |
keys added to the renderer globals dictionary by all subscribers and |
|
979 |
app-level globals factories must be unique. |
|
980 |
|
e65e5b
|
981 |
- New class: ``pyramid.response.Response``. This is a pure facade for |
CM |
982 |
``webob.Response`` (old code need not change to use this facade, it's |
94b889
|
983 |
existence is mostly for vanity and documentation-generation purposes). |
CM |
984 |
|
a3dc13
|
985 |
- All preexisting paster templates (except ``zodb``) now use "imperative" |
CM |
986 |
configuration (``starter``, ``routesalchemy``, ``alchemy``). |
|
987 |
|
|
988 |
- A new paster template named ``pyramid_starter_zcml`` exists, which uses |
|
989 |
declarative configuration. |
|
990 |
|
2e6905
|
991 |
Documentation (delta from BFG 1.3) |
CM |
992 |
----------------------------------- |
|
993 |
|
|
994 |
- Added a ``pyramid.httpexceptions`` API documentation chapter. |
|
995 |
|
14dc81
|
996 |
- Added a ``pyramid.session`` API documentation chapter. |
CM |
997 |
|
|
998 |
- Added a ``Session Objects`` narrative documentation chapter. |
|
999 |
|
|
1000 |
- Added an API chapter for the ``pyramid.personality`` module. |
|
1001 |
|
94b889
|
1002 |
- Added an API chapter for the ``pyramid.response`` module. |
CM |
1003 |
|
|
1004 |
- All documentation which previously referred to ``webob.Response`` now uses |
|
1005 |
``pyramid.response.Response`` instead. |
|
1006 |
|
7a3465
|
1007 |
- The documentation has been overhauled to use imperative configuration, |
CM |
1008 |
moving declarative configuration (ZCML) explanations to a separate |
|
1009 |
narrative chapter ``declarative.rst``. |
|
1010 |
|
b3b713
|
1011 |
- The ZODB Wiki tutorial was updated to take into account changes to the |
CM |
1012 |
``pyramid_zodb`` paster template. |
|
1013 |
|
b2adfe
|
1014 |
- The SQL Wiki tutorial was updated to take into account changes to the |
CM |
1015 |
``pyramid_routesalchemy`` paster template. |
6067de
|
1016 |
|
fcc3d1
|
1017 |
Backwards Incompatibilities (with BFG 1.3) |
CM |
1018 |
------------------------------------------ |
2d7993
|
1019 |
|
c81aad
|
1020 |
- There is no longer an ``IDebugLogger`` registered as a named utility |
CM |
1021 |
with the name ``repoze.bfg.debug``. |
|
1022 |
|
|
1023 |
- The logger which used to have the name of ``repoze.bfg.debug`` now |
|
1024 |
has the name ``pyramid.debug``. |
|
1025 |
|
588733
|
1026 |
- The deprecated API ``pyramid.testing.registerViewPermission`` |
CM |
1027 |
has been removed. |
|
1028 |
|
51c305
|
1029 |
- The deprecated API named ``pyramid.testing.registerRoutesMapper`` |
588733
|
1030 |
has been removed. |
CM |
1031 |
|
c81aad
|
1032 |
- The deprecated API named ``pyramid.request.get_request`` was removed. |
CM |
1033 |
|
|
1034 |
- The deprecated API named ``pyramid.security.Unauthorized`` was |
|
1035 |
removed. |
|
1036 |
|
|
1037 |
- The deprecated API named ``pyramid.view.view_execution_permitted`` |
|
1038 |
was removed. |
|
1039 |
|
|
1040 |
- The deprecated API named ``pyramid.view.NotFound`` was removed. |
6a3184
|
1041 |
|
CM |
1042 |
- The ``bfgshell`` paster command is now named ``pshell``. |
|
1043 |
|
cba2e1
|
1044 |
- The Venusian "category" for all built-in Venusian decorators |
CM |
1045 |
(e.g. ``subscriber`` and ``view_config``/``bfg_view``) is now |
|
1046 |
``pyramid`` instead of ``bfg``. |
3d9dd0
|
1047 |
|
CM |
1048 |
- ``pyramid.renderers.rendered_response`` function removed; use |
|
1049 |
``render_pyramid.renderers.render_to_response`` instead. |
|
1050 |
|
1dad60
|
1051 |
- Renderer factories now accept a *renderer info object* rather than an |
CM |
1052 |
absolute resource specification or an absolute path. The object has the |
|
1053 |
following attributes: ``name`` (the ``renderer=`` value), ``package`` (the |
|
1054 |
'current package' when the renderer configuration statement was found), |
|
1055 |
``type``: the renderer type, ``registry``: the current registry, and |
|
1056 |
``settings``: the deployment settings dictionary. |
3d9dd0
|
1057 |
|
CM |
1058 |
Third-party ``repoze.bfg`` renderer implementations that must be ported to |
|
1059 |
Pyramid will need to account for this. |
|
1060 |
|
f5fa3f
|
1061 |
This change was made primarily to support more flexible Mako template |
CM |
1062 |
rendering. |
2876a8
|
1063 |
|
CM |
1064 |
- The presence of the key ``repoze.bfg.message`` in the WSGI environment when |
|
1065 |
an exception occurs is now deprecated. Instead, code which relies on this |
|
1066 |
environ value should use the ``exception`` attribute of the request |
|
1067 |
(e.g. ``request.exception[0]``) to retrieve the message. |
8129f9
|
1068 |
|
CM |
1069 |
- The values ``bfg_localizer`` and ``bfg_locale_name`` kept on the request |
|
1070 |
during internationalization for caching purposes were never APIs. These |
|
1071 |
however have changed to ``localizer`` and ``locale_name``, respectively. |
|
1072 |
|
968f46
|
1073 |
- The default ``cookie_name`` value of the ``authtktauthenticationpolicy`` ZCML |
CM |
1074 |
now defaults to ``auth_tkt`` (it used to default to ``repoze.bfg.auth_tkt``). |
|
1075 |
|
|
1076 |
- The default ``cookie_name`` value of the |
|
1077 |
``pyramid.authentication.AuthTktAuthenticationPolicy`` constructor now |
|
1078 |
defaults to ``auth_tkt`` (it used to default to ``repoze.bfg.auth_tkt``). |
7a3465
|
1079 |
|
a3dc13
|
1080 |
- The ``request_type`` argument to the ``view`` ZCML directive, the |
CM |
1081 |
``pyramid.configuration.Configurator.add_view`` method, or the |
|
1082 |
``pyramid.view.view_config`` decorator (nee ``bfg_view``) is no longer |
|
1083 |
permitted to be one of the strings ``GET``, ``HEAD``, ``PUT``, ``POST`` or |
|
1084 |
``DELETE``, and now must always be an interface. Accepting the |
|
1085 |
method-strings as ``request_type`` was a backwards compatibility strategy |
|
1086 |
servicing repoze.bfg 1.0 applications. Use the ``request_method`` |
|
1087 |
parameter instead to specify that a view a string request-method predicate. |