commit | author | age
|
cf973d
|
1 |
1.3b1 (2012-02-26) |
CM |
2 |
================== |
b0ebdf
|
3 |
|
CM |
4 |
Bug Fixes |
|
5 |
--------- |
|
6 |
|
|
7 |
- ``pyramid.config.Configurator.with_package`` didn't work if the |
|
8 |
Configurator was an old-style ``pyramid.configuration.Configurator`` |
|
9 |
instance. |
|
10 |
|
1b7342
|
11 |
- Pyramid authorization policies did not show up in the introspector. |
CM |
12 |
|
01eac9
|
13 |
Deprecations |
CM |
14 |
------------ |
|
15 |
|
|
16 |
- All references to the ``tmpl_context`` request variable were removed from |
|
17 |
the docs. Its existence in Pyramid is confusing for people who were never |
|
18 |
Pylons users. It was added as a porting convenience for Pylons users in |
|
19 |
Pyramid 1.0, but it never caught on because the Pyramid rendering system is |
|
20 |
a lot different than Pylons' was, and alternate ways exist to do what it |
|
21 |
was designed to offer in Pylons. It will continue to exist "forever" but |
|
22 |
it will not be recommended or mentioned in the docs. |
|
23 |
|
662d6e
|
24 |
1.3a9 (2012-02-22) |
CM |
25 |
================== |
844ed9
|
26 |
|
CM |
27 |
Features |
|
28 |
-------- |
|
29 |
|
|
30 |
- Add an ``introspection`` boolean to the Configurator constructor. If this |
|
31 |
is ``True``, actions registered using the Configurator will be registered |
|
32 |
with the introspector. If it is ``False``, they won't. The default is |
|
33 |
``True``. Setting it to ``False`` during action processing will prevent |
|
34 |
introspection for any following registration statements, and setting it to |
|
35 |
``True`` will start them up again. This addition is to service a |
|
36 |
requirement that the debug toolbar's own views and methods not show up in |
|
37 |
the introspector. |
|
38 |
|
0db4a1
|
39 |
- New API: ``pyramid.config.Configurator.add_notfound_view``. This is a |
CM |
40 |
wrapper for ``pyramid.Config.configurator.add_view`` which provides easy |
a7fe30
|
41 |
append_slash support and does the right thing about permissions. It should |
CM |
42 |
be preferred over calling ``add_view`` directly with |
|
43 |
``context=HTTPNotFound`` as was previously recommended. |
0db4a1
|
44 |
|
CM |
45 |
- New API: ``pyramid.view.notfound_view_config``. This is a decorator |
|
46 |
constructor like ``pyramid.view.view_config`` that calls |
|
47 |
``pyramid.config.Configurator.add_notfound_view`` when scanned. It should |
|
48 |
be preferred over using ``pyramid.view.view_config`` with |
|
49 |
``context=HTTPNotFound`` as was previously recommended. |
a7fe30
|
50 |
|
CM |
51 |
- New API: ``pyramid.config.Configurator.add_forbidden_view``. This is a |
|
52 |
wrapper for ``pyramid.Config.configurator.add_view`` which does the right |
|
53 |
thing about permissions. It should be preferred over calling ``add_view`` |
|
54 |
directly with ``context=HTTPForbidden`` as was previously recommended. |
|
55 |
|
|
56 |
- New API: ``pyramid.view.forbidden_view_config``. This is a decorator |
|
57 |
constructor like ``pyramid.view.view_config`` that calls |
|
58 |
``pyramid.config.Configurator.add_forbidden_view`` when scanned. It should |
|
59 |
be preferred over using ``pyramid.view.view_config`` with |
|
60 |
``context=HTTPForbidden`` as was previously recommended. |
0db4a1
|
61 |
|
6b3cca
|
62 |
- New APIs: ``pyramid.response.FileResponse`` and |
CM |
63 |
``pyramid.response.FileIter``, for usage in views that must serve files |
|
64 |
"manually". |
|
65 |
|
844ed9
|
66 |
Backwards Incompatibilities |
CM |
67 |
--------------------------- |
|
68 |
|
|
69 |
- Remove ``pyramid.config.Configurator.with_context`` class method. It was |
|
70 |
never an API, it is only used by ``pyramid_zcml`` and its functionality has |
|
71 |
been moved to that package's latest release. This means that you'll need |
40301d
|
72 |
to use the 0.9.2 or later release of ``pyramid_zcml`` with this release of |
5ca6a9
|
73 |
Pyramid. |
844ed9
|
74 |
|
CM |
75 |
- The ``introspector`` argument to the ``pyramid.config.Configurator`` |
|
76 |
constructor API has been removed. It has been replaced by the boolean |
|
77 |
``introspection`` flag. |
|
78 |
|
|
79 |
- The ``pyramid.registry.noop_introspector`` API object has been removed. |
|
80 |
|
0db4a1
|
81 |
- The older deprecated ``set_notfound_view`` Configurator method is now an |
a7fe30
|
82 |
alias for the new ``add_notfound_view`` Configurator method. Likewise, the |
CM |
83 |
older deprecated ``set_forbidden_view`` is now an alias for the new |
|
84 |
``add_forbidden_view``. This has the following impact: the ``context`` sent |
|
85 |
to views with a ``(context, request)`` call signature registered via the |
|
86 |
``set_notfound_view`` or ``set_forbidden_view`` will now be an exception |
|
87 |
object instead of the actual resource context found. Use |
0db4a1
|
88 |
``request.context`` to get the actual resource context. It's also |
CM |
89 |
recommended to disuse ``set_notfound_view`` in favor of |
a7fe30
|
90 |
``add_notfound_view``, and disuse ``set_forbidden_view`` in favor of |
CM |
91 |
``add_forbidden_view`` despite the aliasing. |
0db4a1
|
92 |
|
CM |
93 |
Deprecations |
|
94 |
------------ |
|
95 |
|
|
96 |
- The API documentation for ``pyramid.view.append_slash_notfound_view`` and |
|
97 |
``pyramid.view.AppendSlashNotFoundViewFactory`` was removed. These names |
|
98 |
still exist and are still importable, but they are no longer APIs. Use |
|
99 |
``pyramid.config.Configurator.add_notfound_view(append_slash=True)`` or |
|
100 |
``pyramid.view.notfound_view_config(append_slash=True)`` to get the same |
|
101 |
behavior. |
|
102 |
|
a7fe30
|
103 |
- The ``set_forbidden_view`` and ``set_notfound_view`` methods of the |
CM |
104 |
Configurator were removed from the documentation. They have been |
|
105 |
deprecated since Pyramid 1.1. |
0db4a1
|
106 |
|
22bae9
|
107 |
Bug Fixes |
CM |
108 |
--------- |
|
109 |
|
|
110 |
- The static file response object used by ``config.add_static_view`` opened |
|
111 |
the static file twice, when it only needed to open it once. |
|
112 |
|
0db4a1
|
113 |
- The AppendSlashNotFoundViewFactory used request.path to match routes. This |
CM |
114 |
was wrong because request.path contains the script name, and this would |
|
115 |
cause it to fail in circumstances where the script name was not empty. It |
|
116 |
should have used request.path_info, and now does. |
|
117 |
|
|
118 |
Documentation |
|
119 |
------------- |
|
120 |
|
a7fe30
|
121 |
- Updated the "Creating a Not Found View" section of the "Hooks" chapter, |
0db4a1
|
122 |
replacing explanations of registering a view using ``add_view`` or |
CM |
123 |
``view_config`` with ones using ``add_notfound_view`` or |
|
124 |
``notfound_view_config``. |
a7fe30
|
125 |
|
CM |
126 |
- Updated the "Creating a Not Forbidden View" section of the "Hooks" chapter, |
|
127 |
replacing explanations of registering a view using ``add_view`` or |
|
128 |
``view_config`` with ones using ``add_forbidden_view`` or |
|
129 |
``forbidden_view_config``. |
0db4a1
|
130 |
|
CM |
131 |
- Updated the "Redirecting to Slash-Appended Routes" section of the "URL |
|
132 |
Dispatch" chapter, replacing explanations of registering a view using |
|
133 |
``add_view`` or ``view_config`` with ones using ``add_notfound_view`` or |
|
134 |
``notfound_view_config`` |
|
135 |
|
a7fe30
|
136 |
- Updated all tutorials to use ``pyramid.view.forbidden_view_config`` rather |
CM |
137 |
than ``pyramid.view.view_config`` with an HTTPForbidden context. |
|
138 |
|
51919e
|
139 |
1.3a8 (2012-02-19) |
CM |
140 |
================== |
e4b8fa
|
141 |
|
CM |
142 |
Features |
|
143 |
-------- |
|
144 |
|
|
145 |
- The ``scan`` method of a ``Configurator`` can be passed an ``ignore`` |
|
146 |
argument, which can be a string, a callable, or a list consisting of |
|
147 |
strings and/or callables. This feature allows submodules, subpackages, and |
|
148 |
global objects from being scanned. See |
|
149 |
http://readthedocs.org/docs/venusian/en/latest/#ignore-scan-argument for |
|
150 |
more information about how to use the ``ignore`` argument to ``scan``. |
|
151 |
|
af24f7
|
152 |
- Better error messages when a view callable returns a value that cannot be |
CM |
153 |
converted to a response (for example, when a view callable returns a |
|
154 |
dictionary without a renderer defined, or doesn't return any value at all). |
|
155 |
The error message now contains information about the view callable itself |
|
156 |
as well as the result of calling it. |
|
157 |
|
5ad401
|
158 |
- Better error message when a .pyc-only module is ``config.include`` -ed. |
CM |
159 |
This is not permitted due to error reporting requirements, and a better |
|
160 |
error message is shown when it is attempted. Previously it would fail with |
|
161 |
something like "AttributeError: 'NoneType' object has no attribute |
|
162 |
'rfind'". |
|
163 |
|
c51896
|
164 |
- Add ``pyramid.config.Configurator.add_traverser`` API method. See the |
748aad
|
165 |
Hooks narrative documentation section entitled "Changing the Traverser" for |
CM |
166 |
more information. This is not a new feature, it just provides an API for |
|
167 |
adding a traverser without needing to use the ZCA API. |
c51896
|
168 |
|
CM |
169 |
- Add ``pyramid.config.Configurator.add_resource_url_adapter`` API method. |
|
170 |
See the Hooks narrative documentation section entitled "Changing How |
|
171 |
pyramid.request.Request.resource_url Generates a URL" for more information. |
|
172 |
This is not a new feature, it just provides an API for adding a resource |
|
173 |
url adapter without needing to use the ZCA API. |
748aad
|
174 |
|
b2ea4c
|
175 |
- The system value ``req`` is now supplied to renderers as an alias for |
4786ca
|
176 |
``request``. This means that you can now, for example, in a template, do |
b2ea4c
|
177 |
``req.route_url(...)`` instead of ``request.route_url(...)``. This is |
CM |
178 |
purely a change to reduce the amount of typing required to use request |
|
179 |
methods and attributes from within templates. The value ``request`` is |
|
180 |
still available too, this is just an alternative. |
4786ca
|
181 |
|
c51896
|
182 |
- A new interface was added: ``pyramid.interfaces.IResourceURL``. An adapter |
CM |
183 |
implementing its interface can be used to override resource URL generation |
|
184 |
when ``request.resource_url`` is called. This interface replaces the |
|
185 |
now-deprecated ``pyramid.interfaces.IContextURL`` interface. |
|
186 |
|
|
187 |
- The dictionary passed to a resource's ``__resource_url__`` method (see |
|
188 |
"Overriding Resource URL Generation" in the "Resources" chapter) now |
|
189 |
contains an ``app_url`` key, representing the application URL generated |
|
190 |
during ``request.resource_url``. It represents a potentially customized |
|
191 |
URL prefix, containing potentially custom scheme, host and port information |
|
192 |
passed by the user to ``request.resource_url``. It should be used instead |
|
193 |
of ``request.application_url`` where necessary. |
|
194 |
|
|
195 |
- The ``request.resource_url`` API now accepts these arguments: ``app_url``, |
|
196 |
``scheme``, ``host``, and ``port``. The app_url argument can be used to |
|
197 |
replace the URL prefix wholesale during url generation. The ``scheme``, |
|
198 |
``host``, and ``port`` arguments can be used to replace the respective |
|
199 |
default values of ``request.application_url`` partially. |
|
200 |
|
|
201 |
- A new API named ``request.resource_path`` now exists. It works like |
|
202 |
``request.resource_url`` but produces a relative URL rather than an |
|
203 |
absolute one. |
|
204 |
|
|
205 |
- The ``request.route_url`` API now accepts these arguments: ``_app_url``, |
|
206 |
``_scheme``, ``_host``, and ``_port``. The ``_app_url`` argument can be |
|
207 |
used to replace the URL prefix wholesale during url generation. The |
|
208 |
``_scheme``, ``_host``, and ``_port`` arguments can be used to replace the |
|
209 |
respective default values of ``request.application_url`` partially. |
|
210 |
|
|
211 |
Backwards Incompatibilities |
|
212 |
--------------------------- |
|
213 |
|
|
214 |
- The ``pyramid.interfaces.IContextURL`` interface has been deprecated. |
|
215 |
People have been instructed to use this to register a resource url adapter |
|
216 |
in the "Hooks" chapter to use to influence ``request.resource_url`` URL |
|
217 |
generation for resources found via custom traversers since Pyramid 1.0. |
|
218 |
|
|
219 |
The interface still exists and registering such an adapter still works, but |
|
220 |
this interface will be removed from the software after a few major Pyramid |
|
221 |
releases. You should replace it with an equivalent |
|
222 |
``pyramid.interfaces.IResourceURL`` adapter, registered using the new |
|
223 |
``pyramid.config.Configurator.add_resource_url_adapter`` API. A |
|
224 |
deprecation warning is now emitted when a |
|
225 |
``pyramid.interfaces.IContextURL`` adapter is found when |
|
226 |
``request.resource_url`` is called. |
|
227 |
|
c6a299
|
228 |
Documentation |
CM |
229 |
------------- |
|
230 |
|
|
231 |
- Don't create a ``session`` instance in SQLA Wiki tutorial, use raw |
|
232 |
``DBSession`` instead (this is more common in real SQLA apps). |
|
233 |
|
d21ba4
|
234 |
Scaffolding |
CM |
235 |
----------- |
|
236 |
|
|
237 |
- Put ``pyramid.includes`` targets within ini files in scaffolds on separate |
|
238 |
lines in order to be able to tell people to comment out only the |
|
239 |
``pyramid_debugtoolbar`` line when they want to disable the toolbar. |
|
240 |
|
e4b8fa
|
241 |
Dependencies |
CM |
242 |
------------ |
|
243 |
|
|
244 |
- Depend on ``venusian`` >= 1.0a3 to provide scan ``ignore`` support. |
|
245 |
|
d679fa
|
246 |
Internal |
CM |
247 |
-------- |
|
248 |
|
|
249 |
- Create a "MakoRendererFactoryHelper" that provides customizable settings |
|
250 |
key prefixes. Allows settings prefixes other than "mako." to be used to |
|
251 |
create different factories that don't use the global mako settings. This |
|
252 |
will be useful for the debug toolbar, which can currently be sabotaged by |
|
253 |
someone using custom mako configuration settings. |
|
254 |
|
e3f9d0
|
255 |
1.3a7 (2012-02-07) |
CM |
256 |
================== |
ea68d2
|
257 |
|
f8bfc6
|
258 |
Features |
CM |
259 |
-------- |
|
260 |
|
|
261 |
- More informative error message when a ``config.include`` cannot find an |
|
262 |
``includeme``. See https://github.com/Pylons/pyramid/pull/392. |
|
263 |
|
22e0aa
|
264 |
- Internal: catch unhashable discriminators early (raise an error instead of |
CM |
265 |
allowing them to find their way into resolveConflicts). |
|
266 |
|
835d48
|
267 |
- The `match_param` view predicate now accepts a string or a tuple. |
MM |
268 |
This replaces the broken behavior of accepting a dict. See |
|
269 |
https://github.com/Pylons/pyramid/issues/425 for more information. |
|
270 |
|
ea68d2
|
271 |
Bug Fixes |
CM |
272 |
--------- |
|
273 |
|
|
274 |
- The process will now restart when ``pserve`` is used with the ``--reload`` |
a3a711
|
275 |
flag when the ``development.ini`` file (or any other .ini file in use) is |
ea68d2
|
276 |
changed. See https://github.com/Pylons/pyramid/issues/377 and |
CM |
277 |
https://github.com/Pylons/pyramid/pull/411 |
|
278 |
|
8a3621
|
279 |
- The ``prequest`` script would fail when used against URLs which did not |
CM |
280 |
return HTML or text. See https://github.com/Pylons/pyramid/issues/381 |
|
281 |
|
835d48
|
282 |
Backwards Incompatibilities |
MM |
283 |
--------------------------- |
|
284 |
|
|
285 |
- The `match_param` view predicate no longer accepts a dict. This will |
|
286 |
have no negative affect because the implementation was broken for |
|
287 |
dict-based arguments. |
|
288 |
|
7cf063
|
289 |
Documentation |
CM |
290 |
------------- |
|
291 |
|
|
292 |
- Add a traversal hello world example to the narrative docs. |
|
293 |
|
a41c8c
|
294 |
1.3a6 (2012-01-20) |
CM |
295 |
================== |
6c2e8f
|
296 |
|
MM |
297 |
Features |
|
298 |
-------- |
|
299 |
|
|
300 |
- New API: ``pyramid.config.Configurator.set_request_property``. Add lazy |
|
301 |
property descriptors to a request without changing the request factory. |
|
302 |
This method provides conflict detection and is the suggested way to add |
|
303 |
properties to a request. |
|
304 |
|
830864
|
305 |
- Responses generated by Pyramid's ``static_view`` now use |
CM |
306 |
a ``wsgi.file_wrapper`` (see |
|
307 |
http://www.python.org/dev/peps/pep-0333/#optional-platform-specific-file-handling) |
|
308 |
when one is provided by the web server. |
|
309 |
|
87233a
|
310 |
Bug Fixes |
CM |
311 |
--------- |
|
312 |
|
|
313 |
- Views registered with an ``accept`` could not be overridden correctly with |
|
314 |
a different view that had the same predicate arguments. See |
|
315 |
https://github.com/Pylons/pyramid/pull/404 for more information. |
|
316 |
|
134388
|
317 |
- When using a dotted name for a ``view`` argument to |
CM |
318 |
``Configurator.add_view`` that pointed to a class with a ``view_defaults`` |
|
319 |
decorator, the view defaults would not be applied. See |
|
320 |
https://github.com/Pylons/pyramid/issues/396 . |
|
321 |
|
05f462
|
322 |
- Static URL paths were URL-quoted twice. See |
CM |
323 |
https://github.com/Pylons/pyramid/issues/407 . |
|
324 |
|
cf3a11
|
325 |
1.3a5 (2012-01-09) |
CM |
326 |
================== |
4c29ef
|
327 |
|
CM |
328 |
Bug Fixes |
|
329 |
--------- |
|
330 |
|
|
331 |
- The ``pyramid.view.view_defaults`` decorator did not work properly when |
|
332 |
more than one view relied on the defaults being different for configuration |
|
333 |
conflict resolution. See https://github.com/Pylons/pyramid/issues/394. |
|
334 |
|
a5d994
|
335 |
Backwards Incompatibilities |
CM |
336 |
--------------------------- |
|
337 |
|
|
338 |
- The ``path_info`` route and view predicates now match against |
|
339 |
``request.upath_info`` (Unicode) rather than ``request.path_info`` |
|
340 |
(indeterminate value based on Python 3 vs. Python 2). This has to be done |
|
341 |
to normalize matching on Python 2 and Python 3. |
|
342 |
|
683941
|
343 |
1.3a4 (2012-01-05) |
CM |
344 |
================== |
b73edc
|
345 |
|
MM |
346 |
Features |
|
347 |
-------- |
|
348 |
|
|
349 |
- New API: ``pyramid.request.Request.set_property``. Add lazy property |
|
350 |
descriptors to a request without changing the request factory. New |
|
351 |
properties may be reified, effectively caching the value for the lifetime |
6c2e8f
|
352 |
of the instance. Common use-cases for this would be to get a database |
b73edc
|
353 |
connection for the request or identify the current user. |
MM |
354 |
|
030d10
|
355 |
- Use the ``waitress`` WSGI server instead of ``wsgiref`` in scaffolding. |
CM |
356 |
|
52a948
|
357 |
Bug Fixes |
CM |
358 |
--------- |
|
359 |
|
|
360 |
- The documentation of ``pyramid.events.subscriber`` indicated that using it |
|
361 |
as a decorator with no arguments like this:: |
|
362 |
|
|
363 |
@subscriber() |
|
364 |
def somefunc(event): |
|
365 |
pass |
|
366 |
|
|
367 |
Would register ``somefunc`` to receive all events sent via the registry, |
|
368 |
but this was untrue. Instead, it would receive no events at all. This has |
|
369 |
now been fixed and the code matches the documentation. See also |
|
370 |
https://github.com/Pylons/pyramid/issues/386 |
|
371 |
|
ad9807
|
372 |
- Literal portions of route patterns were not URL-quoted when ``route_url`` |
c52c92
|
373 |
or ``route_path`` was used to generate a URL or path. |
ad9807
|
374 |
|
CM |
375 |
- The result of ``route_path`` or ``route_url`` might have been ``unicode`` |
|
376 |
or ``str`` depending on the input. It is now guaranteed to always be |
|
377 |
``str``. |
|
378 |
|
|
379 |
- URL matching when the pattern contained non-ASCII characters in literal |
|
380 |
parts was indeterminate. Now the pattern supplied to ``add_route`` is |
|
381 |
assumed to be either: a ``unicode`` value, or a ``str`` value that contains |
|
382 |
only ASCII characters. If you now want to match the path info from a URL |
|
383 |
that contains high order characters, you can pass the Unicode |
|
384 |
representation of the decoded path portion in the pattern. |
|
385 |
|
|
386 |
- When using a ``traverse=`` route predicate, traversal would fail with a |
|
387 |
URLDecodeError if there were any high-order characters in the traversal |
|
388 |
pattern or in the matched dynamic segments. |
|
389 |
|
92dcb5
|
390 |
- Using a dynamic segment named ``traverse`` in a route pattern like this:: |
CM |
391 |
|
|
392 |
config.add_route('trav_route', 'traversal/{traverse:.*}') |
|
393 |
|
|
394 |
Would cause a ``UnicodeDecodeError`` when the route was matched and the |
c52c92
|
395 |
matched portion of the URL contained any high-order characters. See |
92dcb5
|
396 |
https://github.com/Pylons/pyramid/issues/385 . |
CM |
397 |
|
c52c92
|
398 |
- When using a ``*traverse`` stararg in a route pattern, a URL that matched |
CM |
399 |
that possessed a ``@@`` in its name (signifying a view name) would be |
|
400 |
inappropriately quoted by the traversal machinery during traversal, |
|
401 |
resulting in the view not being found properly. See |
|
402 |
https://github.com/Pylons/pyramid/issues/382 and |
|
403 |
https://github.com/Pylons/pyramid/issues/375 . |
|
404 |
|
ad9807
|
405 |
Backwards Incompatibilities |
CM |
406 |
--------------------------- |
|
407 |
|
|
408 |
- String values passed to ``route_url`` or ``route_path`` that are meant to |
|
409 |
replace "remainder" matches will now be URL-quoted except for embedded |
|
410 |
slashes. For example:: |
|
411 |
|
|
412 |
config.add_route('remain', '/foo*remainder') |
|
413 |
request.route_path('remain', remainder='abc / def') |
|
414 |
# -> '/foo/abc%20/%20def' |
|
415 |
|
|
416 |
Previously string values passed as remainder replacements were tacked on |
|
417 |
untouched, without any URL-quoting. But this doesn't really work logically |
|
418 |
if the value passed is Unicode (raw unicode cannot be placed in a URL or in |
|
419 |
a path) and it is inconsistent with the rest of the URL generation |
|
420 |
machinery if the value is a string (it won't be quoted unless by the |
|
421 |
caller). |
|
422 |
|
|
423 |
Some folks will have been relying on the older behavior to tack on query |
|
424 |
string elements and anchor portions of the URL; sorry, you'll need to |
|
425 |
change your code to use the ``_query`` and/or ``_anchor`` arguments to |
|
426 |
``route_path`` or ``route_url`` to do this now. |
|
427 |
|
|
428 |
- If you pass a bytestring that contains non-ASCII characters to |
|
429 |
``add_route`` as a pattern, it will now fail at startup time. Use Unicode |
|
430 |
instead. |
|
431 |
|
d394da
|
432 |
1.3a3 (2011-12-21) |
CM |
433 |
================== |
c8061e
|
434 |
|
CM |
435 |
Features |
|
436 |
-------- |
|
437 |
|
|
438 |
- Added a ``prequest`` script (along the lines of ``paster request``). It is |
|
439 |
documented in the "Command-Line Pyramid" chapter in the section entitled |
|
440 |
"Invoking a Request". |
|
441 |
|
ba2a3f
|
442 |
- Add undocumented ``__discriminator__`` API to derived view callables. |
CM |
443 |
e.g. ``adapters.lookup(...).__discriminator__(context, request)``. It will |
|
444 |
be used by superdynamic systems that require the discriminator to be used |
|
445 |
for introspection after manual view lookup. |
|
446 |
|
d58614
|
447 |
Bug Fixes |
CM |
448 |
--------- |
|
449 |
|
|
450 |
- Normalized exit values and ``-h`` output for all ``p*`` scripts |
|
451 |
(``pviews``, ``proutes``, etc). |
|
452 |
|
61838b
|
453 |
Documentation |
CM |
454 |
------------- |
|
455 |
|
|
456 |
- Added a section named "Making Your Script into a Console Script" in the |
|
457 |
"Command-Line Pyramid" chapter. |
|
458 |
|
9003a8
|
459 |
- Removed the "Running Pyramid on Google App Engine" tutorial from the main |
CM |
460 |
docs. It survives on in the Cookbook |
|
461 |
(http://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/gae.html). |
|
462 |
Rationale: it provides the correct info for the Python 2.5 version of GAE |
|
463 |
only, and this version of Pyramid does not support Python 2.5. |
|
464 |
|
9dce50
|
465 |
1.3a2 (2011-12-14) |
CM |
466 |
================== |
4375cf
|
467 |
|
CM |
468 |
Features |
|
469 |
-------- |
|
470 |
|
|
471 |
- New API: ``pyramid.view.view_defaults``. If you use a class as a view, you |
|
472 |
can use the new ``view_defaults`` class decorator on the class to provide |
|
473 |
defaults to the view configuration information used by every |
|
474 |
``@view_config`` decorator that decorates a method of that class. It also |
|
475 |
works against view configurations involving a class made imperatively. |
|
476 |
|
78d1e4
|
477 |
- Added a backwards compatibility knob to ``pcreate`` to emulate ``paster |
CM |
478 |
create`` handling for the ``--list-templates`` option. |
|
479 |
|
bfd4b3
|
480 |
- Changed scaffolding machinery around a bit to make it easier for people who |
CM |
481 |
want to have extension scaffolds that can work across Pyramid 1.0.X, 1.1.X, |
|
482 |
1.2.X and 1.3.X. See the new "Creating Pyramid Scaffolds" chapter in the |
|
483 |
narrative documentation for more info. |
|
484 |
|
4375cf
|
485 |
Documentation |
CM |
486 |
------------- |
|
487 |
|
|
488 |
- Added documentation to "View Configuration" narrative documentation chapter |
|
489 |
about ``view_defaults`` class decorator. |
|
490 |
|
|
491 |
- Added API docs for ``view_defaults`` class decorator. |
|
492 |
|
bfd4b3
|
493 |
- Added an API docs chapter for ``pyramid.scaffolds``. |
CM |
494 |
|
|
495 |
- Added a narrative docs chapter named "Creating Pyramid Scaffolds". |
|
496 |
|
|
497 |
Backwards Incompatibilities |
|
498 |
--------------------------- |
|
499 |
|
|
500 |
- The ``template_renderer`` method of ``pyramid.scaffolds.PyramidScaffold`` |
|
501 |
was renamed to ``render_template``. If you were overriding it, you're a |
|
502 |
bad person, because it wasn't an API before now. But we're nice so we're |
|
503 |
letting you know. |
|
504 |
|
5f1cf3
|
505 |
1.3a1 (2011-12-09) |
CM |
506 |
================== |
0dde01
|
507 |
|
9b9004
|
508 |
Features |
CM |
509 |
-------- |
|
510 |
|
a1bf6a
|
511 |
- Python 3.2 compatibility. |
e04cbb
|
512 |
|
5cf9fc
|
513 |
- New ``pyramid.compat`` module and API documentation which provides Python |
CM |
514 |
2/3 straddling support for Pyramid add-ons and development environments. |
|
515 |
|
63fced
|
516 |
- A ``mako.directories`` setting is no longer required to use Mako templates |
CM |
517 |
Rationale: Mako template renderers can be specified using an absolute asset |
|
518 |
spec. An entire application can be written with such asset specs, |
|
519 |
requiring no ordered lookup path. |
|
520 |
|
8a5db4
|
521 |
- ``bpython`` interpreter compatibility in ``pshell``. See the "Command-Line |
CM |
522 |
Pyramid" narrative docs chapter for more information. |
|
523 |
|
596495
|
524 |
- Added ``get_appsettings`` API function to the ``pyramid.paster`` module. |
CM |
525 |
This function returns the settings defined within an ``[app:...]`` section |
|
526 |
in a PasteDeploy ini file. |
|
527 |
|
|
528 |
- Added ``setup_logging`` API function to the ``pyramid.paster`` module. |
|
529 |
This function sets up Python logging according to the logging configuration |
|
530 |
in a PasteDeploy ini file. |
38e4c7
|
531 |
|
35ad08
|
532 |
- Configuration conflict reporting is reported in a more understandable way |
CM |
533 |
("Line 11 in file..." vs. a repr of a tuple of similar info). |
|
534 |
|
d83b39
|
535 |
- A configuration introspection system was added; see the narrative |
9d97b6
|
536 |
documentation chapter entitled "Pyramid Configuration Introspection" for |
7d109d
|
537 |
more information. New APIs: ``pyramid.registry.Introspectable``, |
57a0d7
|
538 |
``pyramid.config.Configurator.introspector``, |
CM |
539 |
``pyramid.config.Configurator.introspectable``, |
7d109d
|
540 |
``pyramid.registry.Registry.introspector``. |
CM |
541 |
|
|
542 |
- Allow extra keyword arguments to be passed to the |
|
543 |
``pyramid.config.Configurator.action`` method. |
57a0d7
|
544 |
|
56df90
|
545 |
- New APIs: ``pyramid.path.AssetResolver`` and |
CM |
546 |
``pyramid.path.DottedNameResolver``. The former can be used to resolve |
|
547 |
asset specifications, the latter can be used to resolve dotted names to |
|
548 |
modules or packages. |
|
549 |
|
b54b2c
|
550 |
Bug Fixes |
CM |
551 |
--------- |
|
552 |
|
a4b82c
|
553 |
- Make test suite pass on 32-bit systems; closes #286. closes #306. |
b54b2c
|
554 |
See also https://github.com/Pylons/pyramid/issues/286 |
CM |
555 |
|
206a7f
|
556 |
- The ``pryamid.view.view_config`` decorator did not accept a ``match_params`` |
CM |
557 |
predicate argument. See https://github.com/Pylons/pyramid/pull/308 |
|
558 |
|
876fb6
|
559 |
- The AuthTktCookieHelper could potentially generate Unicode headers |
CM |
560 |
inappropriately when the ``tokens`` argument to remember was used. See |
|
561 |
https://github.com/Pylons/pyramid/pull/314. |
|
562 |
|
6e4c2d
|
563 |
- The AuthTktAuthenticationPolicy did not use a timing-attack-aware string |
CM |
564 |
comparator. See https://github.com/Pylons/pyramid/pull/320 for more info. |
|
565 |
|
9e7c11
|
566 |
- The DummySession in ``pyramid.testing`` now generates a new CSRF token if |
CM |
567 |
one doesn't yet exist. |
|
568 |
|
1c39ae
|
569 |
- ``request.static_url`` now generates URL-quoted URLs when fed a ``path`` |
a5512e
|
570 |
argument which contains characters that are unsuitable for URLs. See |
CM |
571 |
https://github.com/Pylons/pyramid/issues/349 for more info. |
1c39ae
|
572 |
|
ea814b
|
573 |
- Prevent a scaffold rendering from being named ``site`` (conflicts with |
CM |
574 |
Python internal site.py). |
|
575 |
|
c753fc
|
576 |
- Support for using instances as targets of the ``pyramid.wsgi.wsgiapp`` and |
CM |
577 |
``pryramid.wsgi.wsgiapp2`` functions. |
|
578 |
See https://github.com/Pylons/pyramid/pull/370 for more info. |
|
579 |
|
e04cbb
|
580 |
Backwards Incompatibilities |
CM |
581 |
--------------------------- |
|
582 |
|
|
583 |
- Pyramid no longer runs on Python 2.5 (which includes the most recent |
9ffa36
|
584 |
release of Jython and the Python 2.5 version of GAE as of this writing). |
9b9004
|
585 |
|
75f05a
|
586 |
- The ``paster`` command is no longer the documented way to create projects, |
CM |
587 |
start the server, or run debugging commands. To create projects from |
|
588 |
scaffolds, ``paster create`` is replaced by the ``pcreate`` console script. |
|
589 |
To serve up a project, ``paster serve`` is replaced by the ``pserve`` |
|
590 |
console script. New console scripts named ``pshell``, ``pviews``, |
|
591 |
``proutes``, and ``ptweens`` do what their ``paster <commandname>`` |
|
592 |
equivalents used to do. Rationale: the Paste and PasteScript packages do |
|
593 |
not run under Python 3. |
|
594 |
|
|
595 |
- The default WSGI server run as the result of ``pserve`` from newly rendered |
|
596 |
scaffolding is now the ``wsgiref`` WSGI server instead of the |
|
597 |
``paste.httpserver`` server. Rationale: Rationale: the Paste and |
|
598 |
PasteScript packages do not run under Python 3. |
|
599 |
|
4c6fa2
|
600 |
- The ``pshell`` command (see "paster pshell") no longer accepts a |
8a5db4
|
601 |
``--disable-ipython`` command-line argument. Instead, it accepts a ``-p`` |
CM |
602 |
or ``--python-shell`` argument, which can be any of the values ``python``, |
|
603 |
``ipython`` or ``bpython``. |
|
604 |
|
e307fc
|
605 |
- Removed the ``pyramid.renderers.renderer_from_name`` function. It has been |
CM |
606 |
deprecated since Pyramid 1.0, and was never an API. |
|
607 |
|
b74abe
|
608 |
- To use ZCML with versions of Pyramid >= 1.3, you will need ``pyramid_zcml`` |
CM |
609 |
version >= 0.8 and ``zope.configuration`` version >= 3.8.0. The |
|
610 |
``pyramid_zcml`` package version 0.8 is backwards compatible all the way to |
|
611 |
Pyramid 1.0, so you won't be warned if you have older versions installed |
|
612 |
and upgrade Pyramid "in-place"; it may simply break instead. |
|
613 |
|
0dde01
|
614 |
Dependencies |
CM |
615 |
------------ |
|
616 |
|
8fe021
|
617 |
- Pyramid no longer depends on the ``zope.component`` package, except as a |
0dde01
|
618 |
testing dependency. |
CM |
619 |
|
e04cbb
|
620 |
- Pyramid now depends on a zope.interface>=3.8.0, WebOb>=1.2dev, |
CM |
621 |
repoze.lru>=0.4, zope.deprecation>=3.5.0, translationstring>=0.4 (for |
|
622 |
Python 3 compatibility purposes). It also, as a testing dependency, |
|
623 |
depends on WebTest>=1.3.1 for the same reason. |
1939d0
|
624 |
|
75f05a
|
625 |
- Pyramid no longer depends on the Paste or PasteScript packages. |
CM |
626 |
|
5edd54
|
627 |
Documentation |
CM |
628 |
------------- |
|
629 |
|
|
630 |
- The SQLAlchemy Wiki tutorial has been updated. It now uses |
|
631 |
``@view_config`` decorators and an explicit database population script. |
75f05a
|
632 |
|
14e5fa
|
633 |
- Minor updates to the ZODB Wiki tutorial. |
CM |
634 |
|
9d97b6
|
635 |
- A narrative documentation chapter named "Extending Pyramid Configuration" |
CM |
636 |
was added; it describes how to add a new directive, and how use the |
|
637 |
``pyramid.config.Configurator.action`` method within custom directives. It |
|
638 |
also describes how to add introspectable objects. |
|
639 |
|
8fe021
|
640 |
- A narrative documentation chapter named "Pyramid Configuration |
CM |
641 |
Introspection" was added. It describes how to query the introspection |
|
642 |
system. |
|
643 |
|
818f8c
|
644 |
Scaffolds |
CM |
645 |
--------- |
|
646 |
|
|
647 |
- Rendered scaffolds have now been changed to be more relocatable (fewer |
|
648 |
mentions of the package name within files in the package). |
|
649 |
|
8a5db4
|
650 |
- The ``routesalchemy`` scaffold has been renamed ``alchemy``, replacing the |
CM |
651 |
older (traversal-based) ``alchemy`` scaffold (which has been retired). |
818f8c
|
652 |
|
8fe021
|
653 |
- The ``starter`` scaffold now uses URL dispatch by default. |
CM |
654 |
|