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