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