commit | author | age
|
aedc21
|
1 |
Next release |
CM |
2 |
============ |
|
3 |
|
957f61
|
4 |
Features |
CM |
5 |
-------- |
|
6 |
|
|
7 |
- Add logging configuration to all paster templates. |
|
8 |
|
|
9 |
- ``pyramid_alchemy``, ``pyramid_routesalchemy``, and ``pylons_sqla`` paster |
|
10 |
templates now use idiomatic SQLAlchemy configuration in their respective |
|
11 |
``.ini`` files and Python code. |
|
12 |
|
b44b93
|
13 |
Bug Fixes |
CM |
14 |
--------- |
|
15 |
|
|
16 |
- The ``pyramid_routesalchemy`` paster template's unit tests failed |
|
17 |
(``AssertionError: 'SomeProject' != 'someproject'``). This is fixed. |
|
18 |
|
76e48b
|
19 |
- Make default renderer work (renderer factory registered with no name, which |
CM |
20 |
is active for every view unless the view names a specific renderer). |
|
21 |
|
2197ff
|
22 |
Documentation |
CM |
23 |
------------- |
|
24 |
|
|
25 |
- "Sample Applications" section of docs changed to note existence of Cluegun, |
|
26 |
Shootout and Virginia sample applications, ported from their repoze.bfg |
|
27 |
origin packages. |
|
28 |
|
d0e2f6
|
29 |
- SQLAlchemy+URLDispatch tutorial updated to integrate changes to |
CM |
30 |
``pyramid_routesalchemy`` template. |
|
31 |
|
e26903
|
32 |
- Add ``pyramid.interfaces.ITemplateRenderer`` interface to Interfaces API |
CM |
33 |
chapter (has ``implementation()`` method, required to be used when getting |
|
34 |
at Chameleon macros). |
|
35 |
|
aedc21
|
36 |
|
7eb4ad
|
37 |
1.0a4 (2010-11-21) |
CM |
38 |
================== |
745a61
|
39 |
|
2c9d14
|
40 |
Features |
CM |
41 |
-------- |
|
42 |
|
e84116
|
43 |
- URL Dispatch now allows for replacement markers to be located anywhere |
BB |
44 |
in the pattern, instead of immediately following a ``/``. |
47c9f8
|
45 |
|
4018ad
|
46 |
- URL Dispatch now uses the form ``{marker}`` to denote a replace marker in |
7eb4ad
|
47 |
the route pattern instead of ``:marker``. The old colon-style marker syntax |
CM |
48 |
is still accepted for backwards compatibility. The new format allows a |
|
49 |
regular expression for that marker location to be used instead of the |
|
50 |
default ``[^/]+``, for example ``{marker:\d+}`` is now valid to require the |
|
51 |
marker to be digits. |
47c9f8
|
52 |
|
2c9d14
|
53 |
- Add a ``pyramid.url.route_path`` API, allowing folks to generate relative |
CM |
54 |
URLs. Calling ``route_path`` is the same as calling |
|
55 |
``pyramid.url.route_url`` with the argument ``_app_url`` equal to the empty |
|
56 |
string. |
|
57 |
|
|
58 |
- Add a ``pyramid.request.Request.route_path`` API. This is a convenience |
|
59 |
method of the request which calls ``pyramid.url.route_url``. |
|
60 |
|
85ee02
|
61 |
- Make test suite pass on Jython (requires PasteScript trunk, presumably to |
CM |
62 |
be 1.7.4). |
|
63 |
|
29b7aa
|
64 |
- Make test suite pass on PyPy (Chameleon doesn't work). |
CM |
65 |
|
614f00
|
66 |
- Surrounding application configuration with ``config.begin()`` and |
CM |
67 |
``config.end()`` is no longer necessary. All paster templates have been |
|
68 |
changed to no longer call these functions. |
|
69 |
|
35ce2a
|
70 |
- Fix configurator to not convert ``ImportError`` to ``ConfigurationError`` |
CM |
71 |
if the import that failed was unrelated to the import requested via a |
|
72 |
dotted name when resolving dotted names (such as view dotted names). |
|
73 |
|
614f00
|
74 |
Documentation |
CM |
75 |
------------- |
|
76 |
|
|
77 |
- SQLAlchemy+URLDispatch and ZODB+Traversal tutorials have been updated to |
|
78 |
not call ``config.begin()`` or ``config.end()``. |
|
79 |
|
111a6f
|
80 |
Bug Fixes |
CM |
81 |
--------- |
|
82 |
|
|
83 |
- Add deprecation warnings to import of ``pyramid.chameleon_text`` and |
|
84 |
``pyramid.chameleon_zpt`` of ``get_renderer``, ``get_template``, |
|
85 |
``render_template``, and ``render_template_to_response``. |
|
86 |
|
34f44d
|
87 |
- Add deprecation warning for import of ``pyramid.zcml.zcml_configure`` and |
CM |
88 |
``pyramid.zcml.file_configure``. |
|
89 |
|
1e00f3
|
90 |
- The ``pyramid_alchemy`` paster template had a typo, preventing an import |
CM |
91 |
from working. |
|
92 |
|
a66593
|
93 |
- Fix apparent failures when calling ``pyramid.traversal.find_model(root, |
CM |
94 |
path)`` or ``pyramid.traversal.traverse(path)`` when ``path`` is |
|
95 |
(erroneously) a Unicode object. The user is meant to pass these APIs a |
|
96 |
string object, never a Unicode object. In practice, however, users indeed |
|
97 |
pass Unicode. Because the string that is passed must be ASCII encodeable, |
|
98 |
now, if they pass a Unicode object, its data is eagerly converted to an |
|
99 |
ASCII string rather than being passed along to downstream code as a |
|
100 |
convenience to the user and to prevent puzzling second-order failures from |
|
101 |
cropping up (all failures will occur within ``pyramid.traversal.traverse`` |
7eb4ad
|
102 |
rather than later down the line as the result of calling e.g. |
a66593
|
103 |
``traversal_path``). |
CM |
104 |
|
34f44d
|
105 |
Backwards Incompatibilities |
CM |
106 |
--------------------------- |
|
107 |
|
|
108 |
- The ``pyramid.testing.zcml_configure`` API has been removed. It had been |
406259
|
109 |
advertised as removed since repoze.bfg 1.2a1, but hadn't actually been. |
34f44d
|
110 |
|
b68aad
|
111 |
Deprecations |
CM |
112 |
------------ |
|
113 |
|
|
114 |
- The ``pyramid.settings.get_settings`` API is now deprecated. Use |
84df81
|
115 |
``pyramid.threadlocals.get_current_registry().settings`` instead or use the |
b68aad
|
116 |
``settings`` attribute of the registry available from the request |
CM |
117 |
(``request.registry.settings``). |
745a61
|
118 |
|
cb96e2
|
119 |
Documentation |
CM |
120 |
------------- |
|
121 |
|
|
122 |
- Removed ``zodbsessions`` tutorial chapter. It's still useful, but we now |
|
123 |
have a SessionFactory abstraction which competes with it, and maintaining |
|
124 |
documentation on both ways to do it is a distraction. |
|
125 |
|
dbaa08
|
126 |
Internal |
CM |
127 |
-------- |
|
128 |
|
|
129 |
- Replace Twill with WebTest in internal integration tests (avoid deprecation |
|
130 |
warnings generated by Twill). |
|
131 |
|
3fa994
|
132 |
1.0a3 (2010-11-16) |
CM |
133 |
================== |
f4d693
|
134 |
|
9cca72
|
135 |
Features |
CM |
136 |
-------- |
|
137 |
|
ae60ba
|
138 |
- Added Mako TemplateLookup settings for ``mako.error_handler``, |
BB |
139 |
``mako.default_filters``, and ``mako.imports``. |
|
140 |
|
9cca72
|
141 |
- Normalized all paster templates: each now uses the name ``main`` to |
CM |
142 |
represent the function that returns a WSGI application, each now uses |
|
143 |
WebError, each now has roughly the same shape of development.ini style. |
|
144 |
|
51c305
|
145 |
- Added class vars ``matchdict`` and ``matched_route`` to |
CR |
146 |
``pyramid.request.Request``. Each is set to ``None``. |
|
147 |
|
fe4172
|
148 |
- New API method: ``pyramid.settings.asbool``. |
CM |
149 |
|
9e2e1c
|
150 |
- New API methods for ``pyramid.request.Request``: ``model_url``, |
CM |
151 |
``route_url``, and ``static_url``. These are simple passthroughs for their |
|
152 |
respective functions in ``pyramid.url``. |
4eafaa
|
153 |
|
5a972b
|
154 |
- The ``settings`` object which used to be available only when |
CM |
155 |
``request.settings.get_settings`` was called is now available as |
|
156 |
``registry.settings`` (e.g. ``request.registry.settings`` in view code). |
|
157 |
|
9cca72
|
158 |
Bug Fixes |
CM |
159 |
--------- |
|
160 |
|
|
161 |
- The pylons_* paster templates erroneously used the ``{squiggly}`` routing |
|
162 |
syntax as the pattern supplied to ``add_route``. This style of routing is |
|
163 |
not supported. They were replaced with ``:colon`` style route patterns. |
f4d693
|
164 |
|
7bd14c
|
165 |
- The pylons_* paster template used the same string |
CM |
166 |
(``your_app_secret_string``) for the ``session.secret`` setting in the |
|
167 |
generated ``development.ini``. This was a security risk if left unchanged |
|
168 |
in a project that used one of the templates to produce production |
|
169 |
applications. It now uses a randomly generated string. |
|
170 |
|
1ad856
|
171 |
Documentation |
CM |
172 |
------------- |
|
173 |
|
|
174 |
- ZODB+traversal wiki (``wiki``) tutorial updated due to changes to |
|
175 |
``pyramid_zodb`` paster template. |
|
176 |
|
40eb89
|
177 |
- SQLAlchemy+urldispach wiki (``wiki2``) tutorial updated due to changes to |
CM |
178 |
``pyramid_routesalchemy`` paster template. |
|
179 |
|
4eafaa
|
180 |
- Documented the ``matchdict`` and ``matched_route`` attributes of the |
CM |
181 |
request object in the Request API documentation. |
|
182 |
|
5a972b
|
183 |
Deprecations |
CM |
184 |
------------ |
|
185 |
|
|
186 |
- Obtaining the ``settings`` object via |
|
187 |
``registry.{get|query}Utility(ISettings)`` is now deprecated. Instead, |
|
188 |
obtain the ``settings`` object via the ``registry.settings`` attribute. A |
|
189 |
backwards compatibility shim was added to the registry object to register |
|
190 |
the settings object as an ISettings utility when ``setattr(registry, |
|
191 |
'settings', foo)`` is called, but it will be removed in a later release. |
|
192 |
|
|
193 |
- Obtaining the ``settings`` object via ``pyramid.settings.get_settings`` is |
|
194 |
now deprecated. Obtain it as the ``settings`` attribute of the registry |
|
195 |
now (obtain the registry via ``pyramid.threadlocal.get_registry`` or as |
|
196 |
``request.registry``). |
|
197 |
|
76d7eb
|
198 |
Behavior Differences |
CM |
199 |
-------------------- |
|
200 |
|
|
201 |
- Internal: ZCML directives no longer call get_current_registry() if there's |
|
202 |
a ``registry`` attribute on the ZCML context (kill off use of |
|
203 |
threadlocals). |
|
204 |
|
7b8d65
|
205 |
- Internal: Chameleon template renderers now accept two arguments: ``path`` |
CM |
206 |
and ``lookup``. ``Lookup`` will be an instance of a lookup class which |
|
207 |
supplies (late-bound) arguments for debug, reload, and translate. Any |
|
208 |
third-party renderers which use (the non-API) function |
|
209 |
``pyramid.renderers.template_renderer_factory`` will need to adjust their |
|
210 |
implementations to obey the new callback argument list. This change was to |
|
211 |
kill off inappropriate use of threadlocals. |
|
212 |
|
3d4e56
|
213 |
1.0a2 (2010-11-09) |
CM |
214 |
================== |
0af394
|
215 |
|
c721fd
|
216 |
Documentation |
CM |
217 |
------------- |
|
218 |
|
|
219 |
- All references to events by interface |
|
220 |
(e.g. ``pyramid.interfaces.INewRequest``) have been changed to reference |
|
221 |
their concrete classes (e.g. ``pyramid.events.NewRequest``) in |
|
222 |
documentation about making subscriptions. |
|
223 |
|
3d4e56
|
224 |
- All references to Pyramid-the-application were changed from mod-`pyramid` |
CM |
225 |
to app-`Pyramid`. A custom role setting was added to ``docs/conf.py`` to |
fd5ae9
|
226 |
allow for this. (internal) |
CM |
227 |
|
fcc3d1
|
228 |
1.0a1 (2010-11-05) |
CM |
229 |
================== |
5bbc23
|
230 |
|
fcc3d1
|
231 |
Features (delta from BFG 1.3) |
2e6905
|
232 |
------------------------------- |
CM |
233 |
|
07437c
|
234 |
- Mako templating renderer supports resource specification format for |
BB |
235 |
template lookups and within Mako templates. Absolute filenames must |
a62cc2
|
236 |
be used in Pyramid to avoid this lookup process. |
07437c
|
237 |
|
2e6905
|
238 |
- Add ``pyramid.httpexceptions`` module, which is a facade for the |
CM |
239 |
``webob.exc`` module. |
|
240 |
|
9b8d0c
|
241 |
- Direct built-in support for the Mako templating language. |
CM |
242 |
|
|
243 |
- A new configurator method exists: ``add_handler``. This method adds |
|
244 |
a Pylons-style "view handler" (such a thing used to be called a |
|
245 |
"controller" in Pylons 1.0). |
|
246 |
|
968209
|
247 |
- New argument to configurator: ``session_factory``. |
CM |
248 |
|
|
249 |
- New method on configurator: ``set_session_factory`` |
|
250 |
|
|
251 |
- Using ``request.session`` now returns a (dictionary-like) session |
|
252 |
object if a session factory has been configured. |
14dc81
|
253 |
|
CM |
254 |
- The request now has a new attribute: ``tmpl_context`` for benefit of |
|
255 |
Pylons users. |
|
256 |
|
197f0c
|
257 |
- The decorator previously known as ``pyramid.view.bfg_view`` is now |
CM |
258 |
known most formally as ``pyramid.view.view_config`` in docs and |
|
259 |
paster templates. An import of ``pyramid.view.bfg_view``, however, |
|
260 |
will continue to work "forever". |
|
261 |
|
6a3184
|
262 |
- New API methods in ``pyramid.session``: ``signed_serialize`` and |
CM |
263 |
``signed_deserialize``. |
|
264 |
|
1dad60
|
265 |
- New interface: ``pyramid.interfaces.IRendererInfo``. An object of this type |
CM |
266 |
is passed to renderer factory constructors (see "Backwards |
|
267 |
Incompatibilities"). |
|
268 |
|
a76e99
|
269 |
- New event type: ``pyramid.interfaces.IBeforeRender``. An object of this type |
CM |
270 |
is sent as an event before a renderer is invoked (but after the |
|
271 |
application-level renderer globals factory added via |
|
272 |
``pyramid.configurator.configuration.set_renderer_globals_factory``, if any, |
|
273 |
has injected its own keys). Applications may now subscribe to the |
|
274 |
``IBeforeRender`` event type in order to introspect the and modify the set of |
|
275 |
renderer globals before they are passed to a renderer. The event object |
|
276 |
iself has a dictionary-like interface that can be used for this purpose. For |
|
277 |
example:: |
|
278 |
|
|
279 |
from repoze.events import subscriber |
|
280 |
from pyramid.interfaces import IRendererGlobalsEvent |
|
281 |
|
|
282 |
@subscriber(IRendererGlobalsEvent) |
|
283 |
def add_global(event): |
|
284 |
event['mykey'] = 'foo' |
|
285 |
|
|
286 |
If a subscriber attempts to add a key that already exist in the renderer |
|
287 |
globals dictionary, a ``KeyError`` is raised. This limitation is due to the |
|
288 |
fact that subscribers cannot be ordered relative to each other. The set of |
|
289 |
keys added to the renderer globals dictionary by all subscribers and |
|
290 |
app-level globals factories must be unique. |
|
291 |
|
e65e5b
|
292 |
- New class: ``pyramid.response.Response``. This is a pure facade for |
CM |
293 |
``webob.Response`` (old code need not change to use this facade, it's |
94b889
|
294 |
existence is mostly for vanity and documentation-generation purposes). |
CM |
295 |
|
a3dc13
|
296 |
- All preexisting paster templates (except ``zodb``) now use "imperative" |
CM |
297 |
configuration (``starter``, ``routesalchemy``, ``alchemy``). |
|
298 |
|
|
299 |
- A new paster template named ``pyramid_starter_zcml`` exists, which uses |
|
300 |
declarative configuration. |
|
301 |
|
2e6905
|
302 |
Documentation (delta from BFG 1.3) |
CM |
303 |
----------------------------------- |
|
304 |
|
|
305 |
- Added a ``pyramid.httpexceptions`` API documentation chapter. |
|
306 |
|
14dc81
|
307 |
- Added a ``pyramid.session`` API documentation chapter. |
CM |
308 |
|
|
309 |
- Added a ``Session Objects`` narrative documentation chapter. |
|
310 |
|
|
311 |
- Added an API chapter for the ``pyramid.personality`` module. |
|
312 |
|
94b889
|
313 |
- Added an API chapter for the ``pyramid.response`` module. |
CM |
314 |
|
|
315 |
- All documentation which previously referred to ``webob.Response`` now uses |
|
316 |
``pyramid.response.Response`` instead. |
|
317 |
|
7a3465
|
318 |
- The documentation has been overhauled to use imperative configuration, |
CM |
319 |
moving declarative configuration (ZCML) explanations to a separate |
|
320 |
narrative chapter ``declarative.rst``. |
|
321 |
|
b3b713
|
322 |
- The ZODB Wiki tutorial was updated to take into account changes to the |
CM |
323 |
``pyramid_zodb`` paster template. |
|
324 |
|
b2adfe
|
325 |
- The SQL Wiki tutorial was updated to take into account changes to the |
CM |
326 |
``pyramid_routesalchemy`` paster template. |
6067de
|
327 |
|
fcc3d1
|
328 |
Backwards Incompatibilities (with BFG 1.3) |
CM |
329 |
------------------------------------------ |
2d7993
|
330 |
|
c81aad
|
331 |
- There is no longer an ``IDebugLogger`` registered as a named utility |
CM |
332 |
with the name ``repoze.bfg.debug``. |
|
333 |
|
|
334 |
- The logger which used to have the name of ``repoze.bfg.debug`` now |
|
335 |
has the name ``pyramid.debug``. |
|
336 |
|
588733
|
337 |
- The deprecated API ``pyramid.testing.registerViewPermission`` |
CM |
338 |
has been removed. |
|
339 |
|
51c305
|
340 |
- The deprecated API named ``pyramid.testing.registerRoutesMapper`` |
588733
|
341 |
has been removed. |
CM |
342 |
|
c81aad
|
343 |
- The deprecated API named ``pyramid.request.get_request`` was removed. |
CM |
344 |
|
|
345 |
- The deprecated API named ``pyramid.security.Unauthorized`` was |
|
346 |
removed. |
|
347 |
|
|
348 |
- The deprecated API named ``pyramid.view.view_execution_permitted`` |
|
349 |
was removed. |
|
350 |
|
|
351 |
- The deprecated API named ``pyramid.view.NotFound`` was removed. |
6a3184
|
352 |
|
CM |
353 |
- The ``bfgshell`` paster command is now named ``pshell``. |
|
354 |
|
cba2e1
|
355 |
- The Venusian "category" for all built-in Venusian decorators |
CM |
356 |
(e.g. ``subscriber`` and ``view_config``/``bfg_view``) is now |
|
357 |
``pyramid`` instead of ``bfg``. |
3d9dd0
|
358 |
|
CM |
359 |
- ``pyramid.renderers.rendered_response`` function removed; use |
|
360 |
``render_pyramid.renderers.render_to_response`` instead. |
|
361 |
|
1dad60
|
362 |
- Renderer factories now accept a *renderer info object* rather than an |
CM |
363 |
absolute resource specification or an absolute path. The object has the |
|
364 |
following attributes: ``name`` (the ``renderer=`` value), ``package`` (the |
|
365 |
'current package' when the renderer configuration statement was found), |
|
366 |
``type``: the renderer type, ``registry``: the current registry, and |
|
367 |
``settings``: the deployment settings dictionary. |
3d9dd0
|
368 |
|
CM |
369 |
Third-party ``repoze.bfg`` renderer implementations that must be ported to |
|
370 |
Pyramid will need to account for this. |
|
371 |
|
f5fa3f
|
372 |
This change was made primarily to support more flexible Mako template |
CM |
373 |
rendering. |
2876a8
|
374 |
|
CM |
375 |
- The presence of the key ``repoze.bfg.message`` in the WSGI environment when |
|
376 |
an exception occurs is now deprecated. Instead, code which relies on this |
|
377 |
environ value should use the ``exception`` attribute of the request |
|
378 |
(e.g. ``request.exception[0]``) to retrieve the message. |
8129f9
|
379 |
|
CM |
380 |
- The values ``bfg_localizer`` and ``bfg_locale_name`` kept on the request |
|
381 |
during internationalization for caching purposes were never APIs. These |
|
382 |
however have changed to ``localizer`` and ``locale_name``, respectively. |
|
383 |
|
968f46
|
384 |
- The default ``cookie_name`` value of the ``authtktauthenticationpolicy`` ZCML |
CM |
385 |
now defaults to ``auth_tkt`` (it used to default to ``repoze.bfg.auth_tkt``). |
|
386 |
|
|
387 |
- The default ``cookie_name`` value of the |
|
388 |
``pyramid.authentication.AuthTktAuthenticationPolicy`` constructor now |
|
389 |
defaults to ``auth_tkt`` (it used to default to ``repoze.bfg.auth_tkt``). |
7a3465
|
390 |
|
a3dc13
|
391 |
- The ``request_type`` argument to the ``view`` ZCML directive, the |
CM |
392 |
``pyramid.configuration.Configurator.add_view`` method, or the |
|
393 |
``pyramid.view.view_config`` decorator (nee ``bfg_view``) is no longer |
|
394 |
permitted to be one of the strings ``GET``, ``HEAD``, ``PUT``, ``POST`` or |
|
395 |
``DELETE``, and now must always be an interface. Accepting the |
|
396 |
method-strings as ``request_type`` was a backwards compatibility strategy |
|
397 |
servicing repoze.bfg 1.0 applications. Use the ``request_method`` |
|
398 |
parameter instead to specify that a view a string request-method predicate. |