commit | author | age
|
636294
|
1 |
1.0a8 (2010-12-27) |
CM |
2 |
================== |
13de5d
|
3 |
|
e6f45b
|
4 |
Bug Fixes |
CM |
5 |
--------- |
|
6 |
|
|
7 |
- The name ``registry`` was not available in the ``paster pshell`` |
|
8 |
environment under IPython. |
|
9 |
|
bac5b3
|
10 |
Features |
CM |
11 |
-------- |
|
12 |
|
|
13 |
- If a resource implements a ``__resource_url__`` method, it will be called |
|
14 |
as the result of invoking the ``pyramid.url.resource_url`` function to |
|
15 |
generate a URL, overriding the default logic. See the new "Generating The |
|
16 |
URL Of A Resource" section within the Resources narrative chapter. |
|
17 |
|
4df636
|
18 |
- Added flash messaging, as described in the "Flash Messaging" narrative |
CM |
19 |
documentation chapter. |
|
20 |
|
319793
|
21 |
- Added CSRF token generation, as described in the narrative chapter entitled |
CM |
22 |
"Preventing Cross-Site Request Forgery Attacks". |
|
23 |
|
f5bafd
|
24 |
- Prevent misunderstanding of how the ``view`` and ``view_permission`` |
CM |
25 |
arguments to add_route work by raising an exception during configuration if |
|
26 |
view-related arguments exist but no ``view`` argument is passed. |
|
27 |
|
90a327
|
28 |
- Add ``paster proute`` command which displays a summary of the routing |
CM |
29 |
table. See the narrative documentation section within the "URL Dispatch" |
|
30 |
chapter entitled "Displaying All Application Routes". |
|
31 |
|
2a5ae0
|
32 |
Paster Templates |
CM |
33 |
---------------- |
|
34 |
|
|
35 |
- The ``pyramid_zodb`` Paster template no longer employs ZCML. Instead, it |
|
36 |
is based on scanning. |
|
37 |
|
bac5b3
|
38 |
Documentation |
CM |
39 |
------------- |
|
40 |
|
|
41 |
- Added "Generating The URL Of A Resource" section to the Resources narrative |
|
42 |
chapter (includes information about overriding URL generation using |
|
43 |
``__resource_url__``). |
|
44 |
|
|
45 |
- Added "Generating the Path To a Resource" section to the Resources |
|
46 |
narrative chapter. |
|
47 |
|
|
48 |
- Added "Finding a Resource by Path" section to the Resources narrative |
|
49 |
chapter. |
13de5d
|
50 |
|
f4f41f
|
51 |
- Added "Obtaining the Lineage of a Resource" to the Resources narrative |
CM |
52 |
chapter. |
|
53 |
|
|
54 |
- Added "Determining if a Resource is In The Lineage of Another Resource" to |
|
55 |
Resources narrative chapter. |
|
56 |
|
b32bfd
|
57 |
- Added "Finding the Root Resource" to Resources narrative chapter. |
CM |
58 |
|
|
59 |
- Added "Finding a Resource With a Class or Interface in Lineage" to |
|
60 |
Resources narrative chapter. |
|
61 |
|
4df636
|
62 |
- Added a "Flash Messaging" narrative documentation chapter. |
CM |
63 |
|
319793
|
64 |
- Added a narrative chapter entitled "Preventing Cross-Site Request Forgery |
CM |
65 |
Attacks". |
|
66 |
|
2a5ae0
|
67 |
- Changed the "ZODB + Traversal Wiki Tutorial" based on changes to |
CM |
68 |
``pyramid_zodb`` Paster template. |
|
69 |
|
10fd8f
|
70 |
- Added "Advanced Configuration" narrative chapter which documents how to |
CM |
71 |
deal with configuration conflicts, two-phase configuration, ``include`` and |
|
72 |
``commit``. |
|
73 |
|
b33dca
|
74 |
- Fix API documentation rendering for ``pyramid.view.static`` |
CM |
75 |
|
22533d
|
76 |
- Add "Pyramid Provides More Than One Way to Do It" to Design Defense |
CM |
77 |
documentation. |
|
78 |
|
56db9e
|
79 |
- Changed "Static Assets" narrative chapter: clarify that ``name`` represents |
CM |
80 |
a prefix unless it's a URL, added an example of a root-relative static view |
|
81 |
fallback for URL dispatch, added an example of creating a simple view that |
|
82 |
returns the body of a file. |
|
83 |
|
e1a7e0
|
84 |
- Move ZCML usage in Hooks chapter to Declarative Configuration chapter. |
CM |
85 |
|
88b9ee
|
86 |
- Merge "Static Assets" chapter into the "Assets" chapter. |
CM |
87 |
|
90a327
|
88 |
- Added narrative documentation section within the "URL Dispatch" chapter |
CM |
89 |
entitled "Displaying All Application Routes" (for ``paster proutes`` |
|
90 |
command). |
|
91 |
|
bd3bf1
|
92 |
1.0a7 (2010-12-20) |
CM |
93 |
================== |
a2796f
|
94 |
|
aa1ec8
|
95 |
Terminology Changes |
CM |
96 |
------------------- |
|
97 |
|
|
98 |
- The Pyramid concept previously known as "model" is now known as "resource". |
|
99 |
As a result: |
|
100 |
|
|
101 |
- The following API changes have been made:: |
|
102 |
|
|
103 |
pyramid.url.model_url -> |
|
104 |
pyramid.url.resource_url |
477e99
|
105 |
|
aa1ec8
|
106 |
pyramid.traversal.find_model -> |
CM |
107 |
pyramid.url.find_resource |
477e99
|
108 |
|
aa1ec8
|
109 |
pyramid.traversal.model_path -> |
CM |
110 |
pyramid.traversal.resource_path |
477e99
|
111 |
|
aa1ec8
|
112 |
pyramid.traversal.model_path_tuple -> |
CM |
113 |
pyramid.traversal.resource_path_tuple |
477e99
|
114 |
|
aa1ec8
|
115 |
pyramid.traversal.ModelGraphTraverser -> |
CM |
116 |
pyramid.traversal.ResourceTreeTraverser |
477e99
|
117 |
|
aa1ec8
|
118 |
pyramid.config.Configurator.testing_models -> |
CM |
119 |
pyramid.config.Configurator.testing_resources |
477e99
|
120 |
|
aa1ec8
|
121 |
pyramid.testing.registerModels -> |
CM |
122 |
pyramid.testing.registerResources |
477e99
|
123 |
|
aa1ec8
|
124 |
pyramid.testing.DummyModel -> |
CM |
125 |
pyramid.testing.DummyResource |
|
126 |
|
|
127 |
- All documentation which previously referred to "model" now refers to |
bbb9b5
|
128 |
"resource". |
aa1ec8
|
129 |
|
CM |
130 |
- The ``starter`` and ``starter_zcml`` paster templates now have a |
|
131 |
``resources.py`` module instead of a ``models.py`` module. |
|
132 |
|
|
133 |
- Positional argument names of various APIs have been changed from |
|
134 |
``model`` to ``resource``. |
|
135 |
|
|
136 |
Backwards compatibility shims have been left in place in all cases. They |
|
137 |
will continue to work "forever". |
|
138 |
|
|
139 |
- The Pyramid concept previously known as "resource" is now known as "asset". |
|
140 |
As a result: |
|
141 |
|
|
142 |
- The (non-API) module previously known as ``pyramid.resource`` is now |
|
143 |
known as ``pyramid.asset``. |
|
144 |
|
|
145 |
- All docs that previously referred to "resource specification" now refer |
|
146 |
to "asset specification". |
|
147 |
|
|
148 |
- The following API changes were made:: |
|
149 |
|
|
150 |
pyramid.config.Configurator.absolute_resource_spec -> |
|
151 |
pyramid.config.Configurator.absolute_asset_spec |
477e99
|
152 |
|
aa1ec8
|
153 |
pyramid.config.Configurator.override_resource -> |
CM |
154 |
pyramid.config.Configurator.override_asset |
|
155 |
|
|
156 |
- The ZCML directive previously known as ``resource`` is now known as |
|
157 |
``asset``. |
|
158 |
|
|
159 |
- The setting previously known as ``BFG_RELOAD_RESOURCES`` (envvar) or |
|
160 |
``reload_resources`` (config file) is now known, respectively, as |
7b9066
|
161 |
``PYRAMID_RELOAD_ASSETS`` and ``reload_assets``. |
aa1ec8
|
162 |
|
CM |
163 |
Backwards compatibility shims have been left in place in all cases. They |
|
164 |
will continue to work "forever". |
|
165 |
|
7906d2
|
166 |
Bug Fixes |
CM |
167 |
--------- |
|
168 |
|
|
169 |
- Make it possible to succesfully run all tests via ``nosetests`` command |
|
170 |
directly (rather than indirectly via ``python setup.py nosetests``). |
|
171 |
|
14b78b
|
172 |
- When a configuration conflict is encountered during scanning, the conflict |
CM |
173 |
exception now shows the decorator information that caused the conflict. |
|
174 |
|
24bf2a
|
175 |
Features |
CM |
176 |
-------- |
|
177 |
|
|
178 |
- Added ``debug_routematch`` configuration setting that logs matched routes |
|
179 |
(including the matchdict and predicates). |
|
180 |
|
dc06b0
|
181 |
- The name ``registry`` is now available in a ``pshell`` environment by |
CM |
182 |
default. It is the application registry object. |
|
183 |
|
e79d36
|
184 |
Environment |
CM |
185 |
----------- |
|
186 |
|
|
187 |
- All environment variables which used to be prefixed with ``BFG_`` are now |
|
188 |
prefixed with ``PYRAMID_`` (e.g. ``BFG_DEBUG_NOTFOUND`` is now |
|
189 |
``PYRAMID_DEBUG_NOTFOUND``) |
|
190 |
|
24bf2a
|
191 |
Documentation |
CM |
192 |
------------- |
|
193 |
|
|
194 |
- Added "Debugging Route Matching" section to the urldispatch narrative |
|
195 |
documentation chapter. |
|
196 |
|
7b9066
|
197 |
- Added reference to ``PYRAMID_DEBUG_ROUTEMATCH`` envvar and ``debug_routematch`` |
24bf2a
|
198 |
config file setting to the Environment narrative docs chapter. |
CM |
199 |
|
dc06b0
|
200 |
- Changed "Project" chapter slightly to expand on use of ``paster pshell``. |
CM |
201 |
|
b3edcf
|
202 |
- Direct Jython users to Mako rather than Jinja2 in "Install" narrative |
CM |
203 |
chapter. |
|
204 |
|
aa1ec8
|
205 |
- Many changes to support terminological renaming of "model" to "resource" |
CM |
206 |
and "resource" to "asset". |
|
207 |
|
6ee49a
|
208 |
- Added an example of ``WebTest`` functional testing to the testing narrative |
CM |
209 |
chapter. |
|
210 |
|
bdb5ed
|
211 |
- Rearranged chapter ordering by popular demand (URL dispatch first, then |
CM |
212 |
traversal). Put hybrid chapter after views chapter. |
|
213 |
|
a59c78
|
214 |
- Split off "Renderers" as its own chapter from "Views" chapter in narrative |
CM |
215 |
documentation. |
|
216 |
|
3f6b38
|
217 |
Paster Templates |
CM |
218 |
---------------- |
|
219 |
|
|
220 |
- Added ``debug_routematch = false`` to all paster templates. |
|
221 |
|
14b78b
|
222 |
Dependencies |
CM |
223 |
------------ |
|
224 |
|
|
225 |
- Depend on Venusian >= 0.5 (for scanning conflict exception decoration). |
|
226 |
|
07bd03
|
227 |
1.0a6 (2010-12-15) |
CM |
228 |
================== |
73b432
|
229 |
|
c5d172
|
230 |
Bug Fixes |
CM |
231 |
--------- |
|
232 |
|
7cfd68
|
233 |
- 1.0a5 introduced a bug when ``pyramid.config.Configurator.scan`` was used |
CM |
234 |
without a ``package`` argument (e.g. ``config.scan()`` as opposed to |
|
235 |
``config.scan('packagename')``. The symptoms were: lots of deprecation |
|
236 |
warnings printed to the console about imports of deprecated Pyramid |
43d075
|
237 |
functions and classes and non-detection of view callables decorated with |
CM |
238 |
``view_config`` decorators. This has been fixed. |
73b432
|
239 |
|
86a304
|
240 |
- Tests now pass on Windows (no bugs found, but a few tests in the test suite |
CM |
241 |
assumed UNIX path segments in filenames). |
|
242 |
|
55e60c
|
243 |
Documentation |
CM |
244 |
------------- |
|
245 |
|
|
246 |
- If you followed it to-the-letter, the ZODB+Traversal Wiki tutorial would |
|
247 |
instruct you to run a test which would fail because the view callable |
|
248 |
generated by the ``pyramid_zodb`` tutorial used a one-arg view callable, |
|
249 |
but the test in the sample code used a two-arg call. |
|
250 |
|
|
251 |
- Updated ZODB+Traversal tutorial setup.py of all steps to match what's |
|
252 |
generated by ``pyramid_zodb``. |
|
253 |
|
a66a13
|
254 |
- Fix reference to ``repoze.bfg.traversalwrapper`` in "Models" chapter (point |
CM |
255 |
at ``pyramid_traversalwrapper`` instead). |
|
256 |
|
ec8833
|
257 |
1.0a5 (2010-12-14) |
CM |
258 |
================== |
aedc21
|
259 |
|
957f61
|
260 |
Features |
CM |
261 |
-------- |
|
262 |
|
e8edd5
|
263 |
- Add a ``handler`` ZCML directive. This directive does the same thing as |
CM |
264 |
``pyramid.configuration.add_handler``. |
|
265 |
|
d7f259
|
266 |
- A new module named ``pyramid.config`` was added. It subsumes the duties of |
f360d9
|
267 |
the older ``pyramid.configuration`` module. |
d7f259
|
268 |
|
CM |
269 |
- The new ``pyramid.config.Configurator` class has API methods that the older |
|
270 |
``pyramid.configuration.Configurator`` class did not: ``with_context`` (a |
|
271 |
classmethod), ``include``, ``action``, and ``commit``. These methods exist |
|
272 |
for imperative application extensibility purposes. |
e16ab0
|
273 |
|
CM |
274 |
- The ``pyramid.testing.setUp`` function now accepts an ``autocommit`` |
|
275 |
keyword argument, which defaults to ``True``. If it is passed ``False``, |
|
276 |
the Config object returned by ``setUp`` will be a non-autocommiting Config |
|
277 |
object. |
957f61
|
278 |
|
CM |
279 |
- Add logging configuration to all paster templates. |
|
280 |
|
|
281 |
- ``pyramid_alchemy``, ``pyramid_routesalchemy``, and ``pylons_sqla`` paster |
|
282 |
templates now use idiomatic SQLAlchemy configuration in their respective |
|
283 |
``.ini`` files and Python code. |
|
284 |
|
0cb7ac
|
285 |
- ``pyramid.testing.DummyRequest`` now has a class variable, |
CM |
286 |
``query_string``, which defaults to the empty string. |
c5f557
|
287 |
|
e880a4
|
288 |
- Add support for json on GAE by catching NotImplementedError and importing |
CM |
289 |
simplejson from django.utils. |
|
290 |
|
a9f17c
|
291 |
- The Mako renderer now accepts a resource specification for |
CM |
292 |
``mako.module_directory``. |
|
293 |
|
81e648
|
294 |
- New boolean Mako settings variable ``mako.strict_undefined``. See `Mako |
CM |
295 |
Context Variables |
|
296 |
<http://www.makotemplates.org/docs/runtime.html#context-variables>`_ for |
|
297 |
its meaning. |
|
298 |
|
|
299 |
Dependencies |
|
300 |
------------ |
|
301 |
|
|
302 |
- Depend on Mako 0.3.6+ (we now require the ``strict_undefined`` feature). |
|
303 |
|
b44b93
|
304 |
Bug Fixes |
CM |
305 |
--------- |
|
306 |
|
a56564
|
307 |
- When creating a Configurator from within a ``paster pshell`` session, you |
CM |
308 |
were required to pass a ``package`` argument although ``package`` is not |
|
309 |
actually required. If you didn't pass ``package``, you would receive an |
|
310 |
error something like ``KeyError: '__name__'`` emanating from the |
|
311 |
``pyramid.path.caller_module`` function. This has now been fixed. |
|
312 |
|
b44b93
|
313 |
- The ``pyramid_routesalchemy`` paster template's unit tests failed |
CM |
314 |
(``AssertionError: 'SomeProject' != 'someproject'``). This is fixed. |
|
315 |
|
76e48b
|
316 |
- Make default renderer work (renderer factory registered with no name, which |
CM |
317 |
is active for every view unless the view names a specific renderer). |
|
318 |
|
a9f17c
|
319 |
- The Mako renderer did not properly turn the ``mako.imports``, |
CM |
320 |
``mako.default_filters``, and ``mako.imports`` settings into lists. |
|
321 |
|
|
322 |
- The Mako renderer did not properly convert the ``mako.error_handler`` |
|
323 |
setting from a dotted name to a callable. |
|
324 |
|
2197ff
|
325 |
Documentation |
CM |
326 |
------------- |
|
327 |
|
ec8833
|
328 |
- Merged many wording, readability, and correctness changes to narrative |
CM |
329 |
documentation chapters from https://github.com/caseman/pyramid (up to and |
|
330 |
including "Models" narrative chapter). |
|
331 |
|
2197ff
|
332 |
- "Sample Applications" section of docs changed to note existence of Cluegun, |
CM |
333 |
Shootout and Virginia sample applications, ported from their repoze.bfg |
|
334 |
origin packages. |
|
335 |
|
d0e2f6
|
336 |
- SQLAlchemy+URLDispatch tutorial updated to integrate changes to |
CM |
337 |
``pyramid_routesalchemy`` template. |
|
338 |
|
e26903
|
339 |
- Add ``pyramid.interfaces.ITemplateRenderer`` interface to Interfaces API |
CM |
340 |
chapter (has ``implementation()`` method, required to be used when getting |
|
341 |
at Chameleon macros). |
|
342 |
|
aa3306
|
343 |
- Add a "Modifying Package Structure" section to the project narrative |
CM |
344 |
documentation chapter (explain turning a module into a package). |
aedc21
|
345 |
|
4d660d
|
346 |
- Documentation was added for the new ``handler`` ZCML directive in the ZCML |
CM |
347 |
section. |
|
348 |
|
f360d9
|
349 |
Deprecations |
CM |
350 |
------------ |
|
351 |
|
|
352 |
- ``pyramid.configuration.Configurator`` is now deprecated. Use |
|
353 |
``pyramid.config.Configurator``, passing its constructor |
|
354 |
``autocommit=True`` instead. The ``pyramid.configuration.Configurator`` |
|
355 |
alias will live for a long time, as every application uses it, but its |
|
356 |
import now issues a deprecation warning. The |
|
357 |
``pyramid.config.Configurator`` class has the same API as |
|
358 |
``pyramid.configuration.Configurator`` class, which it means to replace, |
|
359 |
except by default it is a *non-autocommitting* configurator. The |
|
360 |
now-deprecated ``pyramid.configuration.Configurator`` will autocommit every |
|
361 |
time a configuration method is called. |
|
362 |
|
|
363 |
The ``pyramid.configuration`` module remains, but it is deprecated. Use |
|
364 |
``pyramid.config`` instead. |
|
365 |
|
7eb4ad
|
366 |
1.0a4 (2010-11-21) |
CM |
367 |
================== |
745a61
|
368 |
|
2c9d14
|
369 |
Features |
CM |
370 |
-------- |
|
371 |
|
e84116
|
372 |
- URL Dispatch now allows for replacement markers to be located anywhere |
BB |
373 |
in the pattern, instead of immediately following a ``/``. |
47c9f8
|
374 |
|
4018ad
|
375 |
- URL Dispatch now uses the form ``{marker}`` to denote a replace marker in |
7eb4ad
|
376 |
the route pattern instead of ``:marker``. The old colon-style marker syntax |
CM |
377 |
is still accepted for backwards compatibility. The new format allows a |
|
378 |
regular expression for that marker location to be used instead of the |
|
379 |
default ``[^/]+``, for example ``{marker:\d+}`` is now valid to require the |
|
380 |
marker to be digits. |
47c9f8
|
381 |
|
2c9d14
|
382 |
- Add a ``pyramid.url.route_path`` API, allowing folks to generate relative |
CM |
383 |
URLs. Calling ``route_path`` is the same as calling |
|
384 |
``pyramid.url.route_url`` with the argument ``_app_url`` equal to the empty |
|
385 |
string. |
|
386 |
|
|
387 |
- Add a ``pyramid.request.Request.route_path`` API. This is a convenience |
|
388 |
method of the request which calls ``pyramid.url.route_url``. |
|
389 |
|
85ee02
|
390 |
- Make test suite pass on Jython (requires PasteScript trunk, presumably to |
CM |
391 |
be 1.7.4). |
|
392 |
|
29b7aa
|
393 |
- Make test suite pass on PyPy (Chameleon doesn't work). |
CM |
394 |
|
614f00
|
395 |
- Surrounding application configuration with ``config.begin()`` and |
CM |
396 |
``config.end()`` is no longer necessary. All paster templates have been |
|
397 |
changed to no longer call these functions. |
|
398 |
|
35ce2a
|
399 |
- Fix configurator to not convert ``ImportError`` to ``ConfigurationError`` |
CM |
400 |
if the import that failed was unrelated to the import requested via a |
|
401 |
dotted name when resolving dotted names (such as view dotted names). |
|
402 |
|
614f00
|
403 |
Documentation |
CM |
404 |
------------- |
|
405 |
|
|
406 |
- SQLAlchemy+URLDispatch and ZODB+Traversal tutorials have been updated to |
|
407 |
not call ``config.begin()`` or ``config.end()``. |
|
408 |
|
111a6f
|
409 |
Bug Fixes |
CM |
410 |
--------- |
|
411 |
|
|
412 |
- Add deprecation warnings to import of ``pyramid.chameleon_text`` and |
|
413 |
``pyramid.chameleon_zpt`` of ``get_renderer``, ``get_template``, |
|
414 |
``render_template``, and ``render_template_to_response``. |
|
415 |
|
34f44d
|
416 |
- Add deprecation warning for import of ``pyramid.zcml.zcml_configure`` and |
CM |
417 |
``pyramid.zcml.file_configure``. |
|
418 |
|
1e00f3
|
419 |
- The ``pyramid_alchemy`` paster template had a typo, preventing an import |
CM |
420 |
from working. |
|
421 |
|
a66593
|
422 |
- Fix apparent failures when calling ``pyramid.traversal.find_model(root, |
CM |
423 |
path)`` or ``pyramid.traversal.traverse(path)`` when ``path`` is |
|
424 |
(erroneously) a Unicode object. The user is meant to pass these APIs a |
|
425 |
string object, never a Unicode object. In practice, however, users indeed |
|
426 |
pass Unicode. Because the string that is passed must be ASCII encodeable, |
|
427 |
now, if they pass a Unicode object, its data is eagerly converted to an |
|
428 |
ASCII string rather than being passed along to downstream code as a |
|
429 |
convenience to the user and to prevent puzzling second-order failures from |
|
430 |
cropping up (all failures will occur within ``pyramid.traversal.traverse`` |
7eb4ad
|
431 |
rather than later down the line as the result of calling e.g. |
a66593
|
432 |
``traversal_path``). |
CM |
433 |
|
34f44d
|
434 |
Backwards Incompatibilities |
CM |
435 |
--------------------------- |
|
436 |
|
|
437 |
- The ``pyramid.testing.zcml_configure`` API has been removed. It had been |
406259
|
438 |
advertised as removed since repoze.bfg 1.2a1, but hadn't actually been. |
34f44d
|
439 |
|
b68aad
|
440 |
Deprecations |
CM |
441 |
------------ |
|
442 |
|
|
443 |
- The ``pyramid.settings.get_settings`` API is now deprecated. Use |
84df81
|
444 |
``pyramid.threadlocals.get_current_registry().settings`` instead or use the |
b68aad
|
445 |
``settings`` attribute of the registry available from the request |
CM |
446 |
(``request.registry.settings``). |
745a61
|
447 |
|
cb96e2
|
448 |
Documentation |
CM |
449 |
------------- |
|
450 |
|
|
451 |
- Removed ``zodbsessions`` tutorial chapter. It's still useful, but we now |
|
452 |
have a SessionFactory abstraction which competes with it, and maintaining |
|
453 |
documentation on both ways to do it is a distraction. |
|
454 |
|
dbaa08
|
455 |
Internal |
CM |
456 |
-------- |
|
457 |
|
|
458 |
- Replace Twill with WebTest in internal integration tests (avoid deprecation |
|
459 |
warnings generated by Twill). |
|
460 |
|
3fa994
|
461 |
1.0a3 (2010-11-16) |
CM |
462 |
================== |
f4d693
|
463 |
|
9cca72
|
464 |
Features |
CM |
465 |
-------- |
|
466 |
|
ae60ba
|
467 |
- Added Mako TemplateLookup settings for ``mako.error_handler``, |
BB |
468 |
``mako.default_filters``, and ``mako.imports``. |
|
469 |
|
9cca72
|
470 |
- Normalized all paster templates: each now uses the name ``main`` to |
CM |
471 |
represent the function that returns a WSGI application, each now uses |
|
472 |
WebError, each now has roughly the same shape of development.ini style. |
|
473 |
|
51c305
|
474 |
- Added class vars ``matchdict`` and ``matched_route`` to |
CR |
475 |
``pyramid.request.Request``. Each is set to ``None``. |
|
476 |
|
fe4172
|
477 |
- New API method: ``pyramid.settings.asbool``. |
CM |
478 |
|
9e2e1c
|
479 |
- New API methods for ``pyramid.request.Request``: ``model_url``, |
CM |
480 |
``route_url``, and ``static_url``. These are simple passthroughs for their |
|
481 |
respective functions in ``pyramid.url``. |
4eafaa
|
482 |
|
5a972b
|
483 |
- The ``settings`` object which used to be available only when |
CM |
484 |
``request.settings.get_settings`` was called is now available as |
|
485 |
``registry.settings`` (e.g. ``request.registry.settings`` in view code). |
|
486 |
|
9cca72
|
487 |
Bug Fixes |
CM |
488 |
--------- |
|
489 |
|
|
490 |
- The pylons_* paster templates erroneously used the ``{squiggly}`` routing |
|
491 |
syntax as the pattern supplied to ``add_route``. This style of routing is |
|
492 |
not supported. They were replaced with ``:colon`` style route patterns. |
f4d693
|
493 |
|
7bd14c
|
494 |
- The pylons_* paster template used the same string |
CM |
495 |
(``your_app_secret_string``) for the ``session.secret`` setting in the |
|
496 |
generated ``development.ini``. This was a security risk if left unchanged |
|
497 |
in a project that used one of the templates to produce production |
|
498 |
applications. It now uses a randomly generated string. |
|
499 |
|
1ad856
|
500 |
Documentation |
CM |
501 |
------------- |
|
502 |
|
|
503 |
- ZODB+traversal wiki (``wiki``) tutorial updated due to changes to |
|
504 |
``pyramid_zodb`` paster template. |
|
505 |
|
40eb89
|
506 |
- SQLAlchemy+urldispach wiki (``wiki2``) tutorial updated due to changes to |
CM |
507 |
``pyramid_routesalchemy`` paster template. |
|
508 |
|
4eafaa
|
509 |
- Documented the ``matchdict`` and ``matched_route`` attributes of the |
CM |
510 |
request object in the Request API documentation. |
|
511 |
|
5a972b
|
512 |
Deprecations |
CM |
513 |
------------ |
|
514 |
|
|
515 |
- Obtaining the ``settings`` object via |
|
516 |
``registry.{get|query}Utility(ISettings)`` is now deprecated. Instead, |
|
517 |
obtain the ``settings`` object via the ``registry.settings`` attribute. A |
|
518 |
backwards compatibility shim was added to the registry object to register |
|
519 |
the settings object as an ISettings utility when ``setattr(registry, |
|
520 |
'settings', foo)`` is called, but it will be removed in a later release. |
|
521 |
|
|
522 |
- Obtaining the ``settings`` object via ``pyramid.settings.get_settings`` is |
|
523 |
now deprecated. Obtain it as the ``settings`` attribute of the registry |
|
524 |
now (obtain the registry via ``pyramid.threadlocal.get_registry`` or as |
|
525 |
``request.registry``). |
|
526 |
|
76d7eb
|
527 |
Behavior Differences |
CM |
528 |
-------------------- |
|
529 |
|
|
530 |
- Internal: ZCML directives no longer call get_current_registry() if there's |
|
531 |
a ``registry`` attribute on the ZCML context (kill off use of |
|
532 |
threadlocals). |
|
533 |
|
7b8d65
|
534 |
- Internal: Chameleon template renderers now accept two arguments: ``path`` |
CM |
535 |
and ``lookup``. ``Lookup`` will be an instance of a lookup class which |
|
536 |
supplies (late-bound) arguments for debug, reload, and translate. Any |
|
537 |
third-party renderers which use (the non-API) function |
|
538 |
``pyramid.renderers.template_renderer_factory`` will need to adjust their |
|
539 |
implementations to obey the new callback argument list. This change was to |
|
540 |
kill off inappropriate use of threadlocals. |
|
541 |
|
3d4e56
|
542 |
1.0a2 (2010-11-09) |
CM |
543 |
================== |
0af394
|
544 |
|
c721fd
|
545 |
Documentation |
CM |
546 |
------------- |
|
547 |
|
|
548 |
- All references to events by interface |
|
549 |
(e.g. ``pyramid.interfaces.INewRequest``) have been changed to reference |
|
550 |
their concrete classes (e.g. ``pyramid.events.NewRequest``) in |
|
551 |
documentation about making subscriptions. |
|
552 |
|
3d4e56
|
553 |
- All references to Pyramid-the-application were changed from mod-`pyramid` |
CM |
554 |
to app-`Pyramid`. A custom role setting was added to ``docs/conf.py`` to |
fd5ae9
|
555 |
allow for this. (internal) |
CM |
556 |
|
fcc3d1
|
557 |
1.0a1 (2010-11-05) |
CM |
558 |
================== |
5bbc23
|
559 |
|
fcc3d1
|
560 |
Features (delta from BFG 1.3) |
2e6905
|
561 |
------------------------------- |
CM |
562 |
|
07437c
|
563 |
- Mako templating renderer supports resource specification format for |
BB |
564 |
template lookups and within Mako templates. Absolute filenames must |
a62cc2
|
565 |
be used in Pyramid to avoid this lookup process. |
07437c
|
566 |
|
2e6905
|
567 |
- Add ``pyramid.httpexceptions`` module, which is a facade for the |
CM |
568 |
``webob.exc`` module. |
|
569 |
|
9b8d0c
|
570 |
- Direct built-in support for the Mako templating language. |
CM |
571 |
|
|
572 |
- A new configurator method exists: ``add_handler``. This method adds |
|
573 |
a Pylons-style "view handler" (such a thing used to be called a |
|
574 |
"controller" in Pylons 1.0). |
|
575 |
|
968209
|
576 |
- New argument to configurator: ``session_factory``. |
CM |
577 |
|
|
578 |
- New method on configurator: ``set_session_factory`` |
|
579 |
|
|
580 |
- Using ``request.session`` now returns a (dictionary-like) session |
|
581 |
object if a session factory has been configured. |
14dc81
|
582 |
|
CM |
583 |
- The request now has a new attribute: ``tmpl_context`` for benefit of |
|
584 |
Pylons users. |
|
585 |
|
197f0c
|
586 |
- The decorator previously known as ``pyramid.view.bfg_view`` is now |
CM |
587 |
known most formally as ``pyramid.view.view_config`` in docs and |
|
588 |
paster templates. An import of ``pyramid.view.bfg_view``, however, |
|
589 |
will continue to work "forever". |
|
590 |
|
6a3184
|
591 |
- New API methods in ``pyramid.session``: ``signed_serialize`` and |
CM |
592 |
``signed_deserialize``. |
|
593 |
|
1dad60
|
594 |
- New interface: ``pyramid.interfaces.IRendererInfo``. An object of this type |
CM |
595 |
is passed to renderer factory constructors (see "Backwards |
|
596 |
Incompatibilities"). |
|
597 |
|
a76e99
|
598 |
- New event type: ``pyramid.interfaces.IBeforeRender``. An object of this type |
CM |
599 |
is sent as an event before a renderer is invoked (but after the |
|
600 |
application-level renderer globals factory added via |
|
601 |
``pyramid.configurator.configuration.set_renderer_globals_factory``, if any, |
|
602 |
has injected its own keys). Applications may now subscribe to the |
|
603 |
``IBeforeRender`` event type in order to introspect the and modify the set of |
|
604 |
renderer globals before they are passed to a renderer. The event object |
|
605 |
iself has a dictionary-like interface that can be used for this purpose. For |
|
606 |
example:: |
|
607 |
|
|
608 |
from repoze.events import subscriber |
|
609 |
from pyramid.interfaces import IRendererGlobalsEvent |
|
610 |
|
|
611 |
@subscriber(IRendererGlobalsEvent) |
|
612 |
def add_global(event): |
|
613 |
event['mykey'] = 'foo' |
|
614 |
|
|
615 |
If a subscriber attempts to add a key that already exist in the renderer |
|
616 |
globals dictionary, a ``KeyError`` is raised. This limitation is due to the |
|
617 |
fact that subscribers cannot be ordered relative to each other. The set of |
|
618 |
keys added to the renderer globals dictionary by all subscribers and |
|
619 |
app-level globals factories must be unique. |
|
620 |
|
e65e5b
|
621 |
- New class: ``pyramid.response.Response``. This is a pure facade for |
CM |
622 |
``webob.Response`` (old code need not change to use this facade, it's |
94b889
|
623 |
existence is mostly for vanity and documentation-generation purposes). |
CM |
624 |
|
a3dc13
|
625 |
- All preexisting paster templates (except ``zodb``) now use "imperative" |
CM |
626 |
configuration (``starter``, ``routesalchemy``, ``alchemy``). |
|
627 |
|
|
628 |
- A new paster template named ``pyramid_starter_zcml`` exists, which uses |
|
629 |
declarative configuration. |
|
630 |
|
2e6905
|
631 |
Documentation (delta from BFG 1.3) |
CM |
632 |
----------------------------------- |
|
633 |
|
|
634 |
- Added a ``pyramid.httpexceptions`` API documentation chapter. |
|
635 |
|
14dc81
|
636 |
- Added a ``pyramid.session`` API documentation chapter. |
CM |
637 |
|
|
638 |
- Added a ``Session Objects`` narrative documentation chapter. |
|
639 |
|
|
640 |
- Added an API chapter for the ``pyramid.personality`` module. |
|
641 |
|
94b889
|
642 |
- Added an API chapter for the ``pyramid.response`` module. |
CM |
643 |
|
|
644 |
- All documentation which previously referred to ``webob.Response`` now uses |
|
645 |
``pyramid.response.Response`` instead. |
|
646 |
|
7a3465
|
647 |
- The documentation has been overhauled to use imperative configuration, |
CM |
648 |
moving declarative configuration (ZCML) explanations to a separate |
|
649 |
narrative chapter ``declarative.rst``. |
|
650 |
|
b3b713
|
651 |
- The ZODB Wiki tutorial was updated to take into account changes to the |
CM |
652 |
``pyramid_zodb`` paster template. |
|
653 |
|
b2adfe
|
654 |
- The SQL Wiki tutorial was updated to take into account changes to the |
CM |
655 |
``pyramid_routesalchemy`` paster template. |
6067de
|
656 |
|
fcc3d1
|
657 |
Backwards Incompatibilities (with BFG 1.3) |
CM |
658 |
------------------------------------------ |
2d7993
|
659 |
|
c81aad
|
660 |
- There is no longer an ``IDebugLogger`` registered as a named utility |
CM |
661 |
with the name ``repoze.bfg.debug``. |
|
662 |
|
|
663 |
- The logger which used to have the name of ``repoze.bfg.debug`` now |
|
664 |
has the name ``pyramid.debug``. |
|
665 |
|
588733
|
666 |
- The deprecated API ``pyramid.testing.registerViewPermission`` |
CM |
667 |
has been removed. |
|
668 |
|
51c305
|
669 |
- The deprecated API named ``pyramid.testing.registerRoutesMapper`` |
588733
|
670 |
has been removed. |
CM |
671 |
|
c81aad
|
672 |
- The deprecated API named ``pyramid.request.get_request`` was removed. |
CM |
673 |
|
|
674 |
- The deprecated API named ``pyramid.security.Unauthorized`` was |
|
675 |
removed. |
|
676 |
|
|
677 |
- The deprecated API named ``pyramid.view.view_execution_permitted`` |
|
678 |
was removed. |
|
679 |
|
|
680 |
- The deprecated API named ``pyramid.view.NotFound`` was removed. |
6a3184
|
681 |
|
CM |
682 |
- The ``bfgshell`` paster command is now named ``pshell``. |
|
683 |
|
cba2e1
|
684 |
- The Venusian "category" for all built-in Venusian decorators |
CM |
685 |
(e.g. ``subscriber`` and ``view_config``/``bfg_view``) is now |
|
686 |
``pyramid`` instead of ``bfg``. |
3d9dd0
|
687 |
|
CM |
688 |
- ``pyramid.renderers.rendered_response`` function removed; use |
|
689 |
``render_pyramid.renderers.render_to_response`` instead. |
|
690 |
|
1dad60
|
691 |
- Renderer factories now accept a *renderer info object* rather than an |
CM |
692 |
absolute resource specification or an absolute path. The object has the |
|
693 |
following attributes: ``name`` (the ``renderer=`` value), ``package`` (the |
|
694 |
'current package' when the renderer configuration statement was found), |
|
695 |
``type``: the renderer type, ``registry``: the current registry, and |
|
696 |
``settings``: the deployment settings dictionary. |
3d9dd0
|
697 |
|
CM |
698 |
Third-party ``repoze.bfg`` renderer implementations that must be ported to |
|
699 |
Pyramid will need to account for this. |
|
700 |
|
f5fa3f
|
701 |
This change was made primarily to support more flexible Mako template |
CM |
702 |
rendering. |
2876a8
|
703 |
|
CM |
704 |
- The presence of the key ``repoze.bfg.message`` in the WSGI environment when |
|
705 |
an exception occurs is now deprecated. Instead, code which relies on this |
|
706 |
environ value should use the ``exception`` attribute of the request |
|
707 |
(e.g. ``request.exception[0]``) to retrieve the message. |
8129f9
|
708 |
|
CM |
709 |
- The values ``bfg_localizer`` and ``bfg_locale_name`` kept on the request |
|
710 |
during internationalization for caching purposes were never APIs. These |
|
711 |
however have changed to ``localizer`` and ``locale_name``, respectively. |
|
712 |
|
968f46
|
713 |
- The default ``cookie_name`` value of the ``authtktauthenticationpolicy`` ZCML |
CM |
714 |
now defaults to ``auth_tkt`` (it used to default to ``repoze.bfg.auth_tkt``). |
|
715 |
|
|
716 |
- The default ``cookie_name`` value of the |
|
717 |
``pyramid.authentication.AuthTktAuthenticationPolicy`` constructor now |
|
718 |
defaults to ``auth_tkt`` (it used to default to ``repoze.bfg.auth_tkt``). |
7a3465
|
719 |
|
a3dc13
|
720 |
- The ``request_type`` argument to the ``view`` ZCML directive, the |
CM |
721 |
``pyramid.configuration.Configurator.add_view`` method, or the |
|
722 |
``pyramid.view.view_config`` decorator (nee ``bfg_view``) is no longer |
|
723 |
permitted to be one of the strings ``GET``, ``HEAD``, ``PUT``, ``POST`` or |
|
724 |
``DELETE``, and now must always be an interface. Accepting the |
|
725 |
method-strings as ``request_type`` was a backwards compatibility strategy |
|
726 |
servicing repoze.bfg 1.0 applications. Use the ``request_method`` |
|
727 |
parameter instead to specify that a view a string request-method predicate. |