Michael Merickel
2016-08-17 73dd3943e34bcf1549d46e225b86ddbc6370bbe4
commit | author | age
73dd39 1 .. _changes_1.6.3:
MM 2
3 1.6.3 (2016-08-16)
4 ==================
df79b2 5
MM 6 Bug Fixes
7 ---------
8
9 - Revert changes from #2706 released in Pyramid 1.6.2. JSON renderers will
10   continue to return unicode data instead of UTF-8 encoded bytes. This means
11   that WebOb responses are still expected to handle unicode data even though
12   JSON does not have a charset.
13   See https://github.com/Pylons/pyramid/issues/2744
14
ade954 15 .. _changes_1.6.2:
MM 16
17 1.6.2 (2016-08-16)
18 ==================
fea559 19
6cad66 20 Bug Fixes
BJR 21 ---------
22
0466db 23 - Fixed bug in `proutes` such that it now shows the correct view when a class
fea559 24   and `attr` is involved.
SP 25   See: https://github.com/Pylons/pyramid/pull/2687
26
6cad66 27 - The JSON renderers now encode their result as UTF-8. The renderer helper
BJR 28   will now warn the user and encode the result as UTF-8 if a renderer returns a
29   text type and the response does not have a valid character set. See
30   https://github.com/Pylons/pyramid/pull/2706
fea559 31
50d88b 32 .. _changes_1.6.1:
MM 33
34 1.6.1 (2016-02-02)
35 ==================
33f873 36
a223c0 37 Deprecations
BJR 38 ------------
39
40 - Missed the deprecation of one more daemon/process management feature that
41   allowed logging to a file. This deprecates ``--log-file`` which is generally
d2a1b3 42   only used with pserve running in daemon mode. See
BJR 43   https://github.com/Pylons/pyramid/pull/2330
a223c0 44
BJR 45 Bug Fixes
46 ---------
47
33f873 48 - Fix an issue with differing CSRF token data types on Python runtimes
MM 49   supporting ``hmac.compare_digest``.
50   See https://github.com/Pylons/pyramid/pull/2299
51
f051b0 52 1.6 (2016-01-03)
MM 53 ================
65c06d 54
MM 55 Deprecations
56 ------------
57
58 - Continue removal of ``pserve`` daemon/process management features
59   by deprecating ``--user`` and ``--group`` options.
60   See https://github.com/Pylons/pyramid/pull/2190
61
226f53 62 1.6b3 (2015-12-17)
45a126 63 ==================
MM 64
65 Backward Incompatibilities
66 --------------------------
67
68 - Remove the ``cachebust`` option from ``config.add_static_view``. See
69   ``config.add_cache_buster`` for the new way to attach cache busters to
70   static assets.
71   See https://github.com/Pylons/pyramid/pull/2186
72
73 - Modify the ``pyramid.interfaces.ICacheBuster`` API to be a simple callable
74   instead of an object with ``match`` and ``pregenerate`` methods. Cache
75   busters are now focused solely on generation. Matching has been dropped.
76
77   Note this affects usage of ``pyramid.static.QueryStringCacheBuster`` and
78   ``pyramid.static.ManifestCacheBuster``.
79
80   See https://github.com/Pylons/pyramid/pull/2186
81
82 Features
83 --------
84
85 - Add a new ``config.add_cache_buster`` API for attaching cache busters to
86   static assets. See https://github.com/Pylons/pyramid/pull/2186
87
78ea38 88 Bug Fixes
MM 89 ---------
90
91 - Ensure that ``IAssetDescriptor.abspath`` always returns an absolute path.
92   There were cases depending on the process CWD that a relative path would
93   be returned. See https://github.com/Pylons/pyramid/issues/2188
94
40f858 95 1.6b2 (2015-10-15)
MM 96 ==================
97
98 Features
99 --------
100
101 - Allow asset specifications to be supplied to
102   ``pyramid.static.ManifestCacheBuster`` instead of requiring a
103   filesystem path.
104
52e500 105 1.6b1 (2015-10-15)
MM 106 ==================
df8412 107
ed91c2 108 Backward Incompatibilities
MM 109 --------------------------
110
111 - IPython and BPython support have been removed from pshell in the core.
112   To continue using them on Pyramid 1.6+ you must install the binding
113   packages explicitly::
114
115     $ pip install pyramid_ipython
116
117     or
118
119     $ pip install pyramid_bpython
120
0a51f4 121 - Remove default cache busters introduced in 1.6a1 including
MM 122   ``PathSegmentCacheBuster``, ``PathSegmentMd5CacheBuster``, and
123   ``QueryStringMd5CacheBuster``.
124   See https://github.com/Pylons/pyramid/pull/2116
125
ed91c2 126 Features
MM 127 --------
128
129 - Additional shells for ``pshell`` can now be registered as entrypoints. See
130   https://github.com/Pylons/pyramid/pull/1891 and
131   https://github.com/Pylons/pyramid/pull/2012
132
133 - The variables injected into ``pshell`` are now displayed with their
134   docstrings instead of the default ``str(obj)`` when possible.
135   See https://github.com/Pylons/pyramid/pull/1929
136
0a51f4 137 - Add new ``pyramid.static.ManifestCacheBuster`` for use with external
MM 138   asset pipelines as well as examples of common usages in the narrative.
139   See https://github.com/Pylons/pyramid/pull/2116
140
96c22e 141 - Fix ``pserve --reload`` to not crash on syntax errors!!!
MM 142   See https://github.com/Pylons/pyramid/pull/2125
143
cf98a0 144 - Fix an issue when user passes unparsed strings to ``pyramid.session.CookieSession``
MM 145   and ``pyramid.authentication.AuthTktCookieHelper`` for time related parameters
146   ``timeout``, ``reissue_time``, ``max_age`` that expect an integer value.
147   See https://github.com/Pylons/pyramid/pull/2050
148
ed91c2 149 Bug Fixes
MM 150 ---------
151
df8412 152 - ``pyramid.httpexceptions.HTTPException`` now defaults to
MM 153   ``520 Unknown Error`` instead of ``None None`` to conform with changes in
154   WebOb 1.5.
155   See https://github.com/Pylons/pyramid/pull/1865
156
ed91c2 157 - ``pshell`` will now preserve the capitalization of variables in the
MM 158   ``[pshell]`` section of the INI file. This makes exposing classes to the
159   shell a little more straightfoward.
160   See https://github.com/Pylons/pyramid/pull/1883
a53c55 161
db8d4f 162 - Fixed usage of ``pserve --monitor-restart --daemon`` which would fail in
MM 163   horrible ways. See https://github.com/Pylons/pyramid/pull/2118
164
1af11d 165 - Explicitly prevent ``pserve --reload --daemon`` from being used. It's never
MM 166   been supported but would work and fail in weird ways.
167   See https://github.com/Pylons/pyramid/pull/2119
168
638187 169 - Fix an issue on Windows when running ``pserve --reload`` in which the
MM 170   process failed to fork because it could not find the pserve script to
171   run. See https://github.com/Pylons/pyramid/pull/2138
172
157b58 173 Deprecations
MM 174 ------------
175
176 - Deprecate ``pserve --monitor-restart`` in favor of user's using a real
177   process manager such as Systemd or Upstart as well as Python-based
178   solutions like Circus and Supervisor.
179   See https://github.com/Pylons/pyramid/pull/2120
180
41636b 181 1.6a2 (2015-06-30)
MM 182 ==================
183
184 Bug Fixes
185 ---------
0d8159 186
ebf0da 187 - Ensure that ``pyramid.httpexceptions.exception_response`` returns the
41636b 188   appropriate "concrete" class for ``400`` and ``500`` status codes.
MM 189   See https://github.com/Pylons/pyramid/issues/1832
ebf0da 190
85be09 191 - Fix an infinite recursion bug introduced in 1.6a1 when
CM 192   ``pyramid.view.render_view_to_response`` was called directly or indirectly.
41636b 193   See https://github.com/Pylons/pyramid/issues/1643
85be09 194
0d8159 195 - Further fix the JSONP renderer by prefixing the returned content with
MM 196   a comment. This should mitigate attacks from Flash (See CVE-2014-4671).
197   See https://github.com/Pylons/pyramid/pull/1649
198
199 - Allow periods and brackets (``[]``) in the JSONP callback. The original
200   fix was overly-restrictive and broke Angular.
201   See https://github.com/Pylons/pyramid/pull/1649
202
85be09 203 1.6a1 (2015-04-15)
CM 204 ==================
c61755 205
9177d0 206 Features
CR 207 --------
208
0f5f18 209 - pcreate will now ask for confirmation if invoked with
IS 210   an argument for a project name that already exists or
211   is importable in the current environment.
212   See https://github.com/Pylons/pyramid/issues/1357 and
213   https://github.com/Pylons/pyramid/pull/1837
214
200c9e 215 - Make it possible to subclass ``pyramid.request.Request`` and also use
CM 216   ``pyramid.request.Request.add_request.method``.  See
217   https://github.com/Pylons/pyramid/issues/1529
218
d35a91 219 - The ``pyramid.config.Configurator`` has grown the ability to allow
MM 220   actions to call other actions during a commit-cycle. This enables much more
221   logic to be placed into actions, such as the ability to invoke other actions
568a02 222   or group them for improved conflict detection. We have also exposed and
MM 223   documented the config phases that Pyramid uses in order to further assist
224   in building conforming addons.
d35a91 225   See https://github.com/Pylons/pyramid/pull/1513
MM 226
46bc7f 227 - Add ``pyramid.request.apply_request_extensions`` function which can be
MM 228   used in testing to apply any request extensions configured via
229   ``config.add_request_method``. Previously it was only possible to test
230   the extensions by going through Pyramid's router.
231   See https://github.com/Pylons/pyramid/pull/1581
232
c9cb19 233 - pcreate when run without a scaffold argument will now print information on
BJR 234   the missing flag, as well as a list of available scaffolds.
235   See https://github.com/Pylons/pyramid/pull/1566 and
236   https://github.com/Pylons/pyramid/issues/1297
237
bc8e4d 238 - Added support / testing for 'pypy3' under Tox and Travis.
782eb4 239   See https://github.com/Pylons/pyramid/pull/1469
bc8e4d 240
149d36 241 - Automate code coverage metrics across py2 and py3 instead of just py2.
MM 242   See https://github.com/Pylons/pyramid/pull/1471
243
9177d0 244 - Cache busting for static resources has been added and is available via a new
15b979 245   argument to ``pyramid.config.Configurator.add_static_view``: ``cachebust``.
5fdf9a 246   Core APIs are shipped for both cache busting via query strings and
MM 247   path segments and may be extended to fit into custom asset pipelines.
248   See https://github.com/Pylons/pyramid/pull/1380 and
249   https://github.com/Pylons/pyramid/pull/1583
9177d0 250
ae6c88 251 - Add ``pyramid.config.Configurator.root_package`` attribute and init
MM 252   parameter to assist with includeable packages that wish to resolve
253   resources relative to the package in which the ``Configurator`` was created.
73b162 254   This is especially useful for addons that need to load asset specs from
c617b7 255   settings, in which case it is may be natural for a developer to define
MM 256   imports or assets relative to the top-level package.
ae6c88 257   See https://github.com/Pylons/pyramid/pull/1337
MM 258
ba5444 259 - Added line numbers to the log formatters in the scaffolds to assist with
MM 260   debugging. See https://github.com/Pylons/pyramid/pull/1326
261
7dd390 262 - Add new HTTP exception objects for status codes
MM 263   ``428 Precondition Required``, ``429 Too Many Requests`` and
264   ``431 Request Header Fields Too Large`` in ``pyramid.httpexceptions``.
265   See https://github.com/Pylons/pyramid/pull/1372/files
266
f3a567 267 - The ``pshell`` script will now load a ``PYTHONSTARTUP`` file if one is
MM 268   defined in the environment prior to launching the interpreter.
823ac4 269   See https://github.com/Pylons/pyramid/pull/1448
0c5e5a 270
7b1d42 271 - Make it simple to define notfound and forbidden views that wish to use
MM 272   the default exception-response view but with altered predicates and other
273   configuration options. The ``view`` argument is now optional in
274   ``config.add_notfound_view`` and ``config.add_forbidden_view``..
275   See https://github.com/Pylons/pyramid/issues/494
276
c617b7 277 - Greatly improve the readability of the ``pcreate`` shell script output.
MM 278   See https://github.com/Pylons/pyramid/pull/1453
279
716a20 280 - Improve robustness to timing attacks in the ``AuthTktCookieHelper`` and
MM 281   the ``SignedCookieSessionFactory`` classes by using the stdlib's
282   ``hmac.compare_digest`` if it is available (such as Python 2.7.7+ and 3.3+).
283   See https://github.com/Pylons/pyramid/pull/1457
889bdc 284
407b33 285 - Assets can now be overidden by an absolute path on the filesystem when using
8d5352 286   the ``config.override_asset`` API. This makes it possible to fully support
MM 287   serving up static content from a mutable directory while still being able
288   to use the ``request.static_url`` API and ``config.add_static_view``.
289   Previously it was not possible to use ``config.add_static_view`` with an
290   absolute path **and** generate urls to the content. This change replaces
291   the call, ``config.add_static_view('/abs/path', 'static')``, with
292   ``config.add_static_view('myapp:static', 'static')`` and
293   ``config.override_asset(to_override='myapp:static/',
294   override_with='/abs/path/')``. The ``myapp:static`` asset spec is completely
295   made up and does not need to exist - it is used for generating urls
296   via ``request.static_url('myapp:static/foo.png')``.
650d3d 297   See https://github.com/Pylons/pyramid/issues/1252
407b33 298
a62462 299 - Added ``pyramid.config.Configurator.set_response_factory`` and the
JA 300   ``response_factory`` keyword argument to the ``Configurator`` for defining
301   a factory that will return a custom ``Response`` class.
302   See https://github.com/Pylons/pyramid/pull/1499
303
2d659e 304 - Allow an iterator to be returned from a renderer. Previously it was only
MM 305   possible to return bytes or unicode.
306   See https://github.com/Pylons/pyramid/pull/1417
307
8dd970 308 - ``pserve`` can now take a ``-b`` or ``--browser`` option to open the server
MA 309   URL in a web browser. See https://github.com/Pylons/pyramid/pull/1533
310
3f8ac5 311 - Overall improvments for the ``proutes`` command. Added ``--format`` and
149ea9 312   ``--glob`` arguments to the command, introduced the ``method``
JA 313   column for displaying available request methods, and improved the ``view``
314   output by showing the module instead of just ``__repr__``.
315   See https://github.com/Pylons/pyramid/pull/1488
316
86f4d5 317 - Support keyword-only arguments and function annotations in views in
MM 318   Python 3. See https://github.com/Pylons/pyramid/pull/1556
319
d23e69 320 - ``request.response`` will no longer be mutated when using the
042068 321   ``pyramid.renderers.render_to_response()`` API.  It is now necessary to
MM 322   pass in a ``response=`` argument to ``render_to_response`` if you wish to
323   supply the renderer with a custom response object for it to use. If you
324   do not pass one then a response object will be created using the
325   application's ``IResponseFactory``. Almost all renderers
d23e69 326   mutate the ``request.response`` response object (for example, the JSON
MM 327   renderer sets ``request.response.content_type`` to ``application/json``).
328   However, when invoking ``render_to_response`` it is not expected that the
329   response object being returned would be the same one used later in the
330   request. The response object returned from ``render_to_response`` is now
331   explicitly different from ``request.response``. This does not change the
042068 332   API of a renderer. See https://github.com/Pylons/pyramid/pull/1563
d23e69 333
a7d77f 334 - The ``append_slash`` argument of ```Configurator().add_notfound_view()`` will
CM 335   now accept anything that implements the ``IResponse`` interface and will use
336   that as the response class instead of the default ``HTTPFound``.  See
337   https://github.com/Pylons/pyramid/pull/1610
513cc3 338
c61755 339 Bug Fixes
8e90d6 340 ---------
a0e97b 341
7c3745 342 - The JSONP renderer created JavaScript code in such a way that a callback
MM 343   variable could be used to arbitrarily inject javascript into the response
344   object. https://github.com/Pylons/pyramid/pull/1627
345
c45d6a 346 - Work around an issue where ``pserve --reload`` would leave terminal echo
DG 347   disabled if it reloaded during a pdb session.
1bcc34 348   See https://github.com/Pylons/pyramid/pull/1577,
DG 349   https://github.com/Pylons/pyramid/pull/1592
a0e97b 350
8e90d6 351 - ``pyramid.wsgi.wsgiapp`` and ``pyramid.wsgi.wsgiapp2`` now raise
BJR 352   ``ValueError`` when accidentally passed ``None``.
ab2a77 353   See https://github.com/Pylons/pyramid/pull/1320
c61755 354
0cb759 355 - Fix an issue whereby predicates would be resolved as maybe_dotted in the
CM 356   introspectable but not when passed for registration. This would mean that
ab2a77 357   ``add_route_predicate`` for example can not take a string and turn it into
MM 358   the actual callable function.
359   See https://github.com/Pylons/pyramid/pull/1306
09beb2 360
d24055 361 - Fix ``pyramid.testing.setUp`` to return a ``Configurator`` with a proper
MM 362   package. Previously it was not possible to do package-relative includes
363   using the returned ``Configurator`` during testing. There is now a
364   ``package`` argument that can override this behavior as well.
ab2a77 365   See https://github.com/Pylons/pyramid/pull/1322
d24055 366
dc9c38 367 - Fix an issue where a ``pyramid.response.FileResponse`` may apply a charset
MM 368   where it does not belong. See https://github.com/Pylons/pyramid/pull/1251
369
326021 370 - Work around a bug introduced in Python 2.7.7 on Windows where
CM 371   ``mimetypes.guess_type`` returns Unicode rather than str for the content
372   type, unlike any previous version of Python.  See
373   https://github.com/Pylons/pyramid/issues/1360 for more information.
374
18566a 375 - ``pcreate`` now normalizes the package name by converting hyphens to
MM 376   underscores. See https://github.com/Pylons/pyramid/pull/1376
377
909486 378 - Fix an issue with the final response/finished callback being unable to
MM 379   add another callback to the list. See
380   https://github.com/Pylons/pyramid/pull/1373
381
46a268 382 - Fix a failing unittest caused by differing mimetypes across various OSs.
MM 383   See https://github.com/Pylons/pyramid/issues/1405
384
e7745a 385 - Fix route generation for static view asset specifications having no path.
RL 386   See https://github.com/Pylons/pyramid/pull/1377
387
1ef35b 388 - Allow the ``pyramid.renderers.JSONP`` renderer to work even if there is no
MM 389   valid request object. In this case it will not wrap the object in a
750b78 390   callback and thus behave just like the ``pyramid.renderers.JSON`` renderer.
1ef35b 391   See https://github.com/Pylons/pyramid/pull/1561
MM 392
e30c3b 393 - Prevent "parameters to load are deprecated" ``DeprecationWarning``
327985 394   from setuptools>=11.3. See https://github.com/Pylons/pyramid/pull/1541
e30c3b 395
06bb4a 396 - Avoiding sharing the ``IRenderer`` objects across threads when attached to
MM 397   a view using the `renderer=` argument. These renderers were instantiated
398   at time of first render and shared between requests, causing potentially
399   subtle effects like `pyramid.reload_templates = true` failing to work
400   in `pyramid_mako`. See https://github.com/Pylons/pyramid/pull/1575
401   and https://github.com/Pylons/pyramid/issues/1268
402
b4e990 403 - Avoiding timing attacks against CSRF tokens.
MM 404   See https://github.com/Pylons/pyramid/pull/1574
405
f4800e 406 - ``request.finished_callbacks`` and ``request.response_callbacks`` now
MM 407   default to an iterable instead of ``None``. It may be checked for a length
408   of 0. This was the behavior in 1.5.
409
3ffd40 410 Deprecations
MM 411 ------------
412
4270a1 413 - The ``pserve`` command's daemonization features have been deprecated. This
MM 414   includes the ``[start,stop,restart,status]`` subcommands as well as the
415   ``--daemon``, ``--stop-server``, ``--pid-file``, and ``--status`` flags.
416
417   Please use a real process manager in the future instead of relying on the
418   ``pserve`` to daemonize itself. Many options exist including your Operating
e1b93e 419   System's services such as Systemd or Upstart, as well as Python-based
MN 420   solutions like Circus and Supervisor.
4270a1 421
MM 422   See https://github.com/Pylons/pyramid/pull/1641
423
3ffd40 424 - Renamed the ``principal`` argument to ``pyramid.security.remember()`` to
MM 425   ``userid`` in order to clarify its intended purpose.
426   See https://github.com/Pylons/pyramid/pull/1399
427
7a6bf6 428 Docs
CM 429 ----
430
63366c 431 - Moved the documentation for ``accept`` on ``Configurator.add_view`` to no
c015da 432   longer be part of the predicate list. See
63366c 433   https://github.com/Pylons/pyramid/issues/1391 for a bug report stating
BJR 434   ``not_`` was failing on ``accept``. Discussion with @mcdonc led to the
435   conclusion that it should not be documented as a predicate.
f17663 436   See https://github.com/Pylons/pyramid/pull/1487 for this PR
63366c 437
7a6bf6 438 - Removed logging configuration from Quick Tutorial ini files except for
CM 439   scaffolding- and logging-related chapters to avoid needing to explain it too
440   early.
a0e97b 441
dd4f73 442 - Clarify a previously-implied detail of the ``ISession.invalidate`` API
MM 443   documentation.
444
3ffd40 445 - Improve and clarify the documentation on what Pyramid defines as a
MM 446   ``principal`` and a ``userid`` in its security APIs.
447   See https://github.com/Pylons/pyramid/pull/1399
448
7b0b1c 449 - Add documentation of command line programs (``p*`` scripts). See
SP 450   https://github.com/Pylons/pyramid/pull/2191
451
742397 452 Scaffolds
CM 453 ---------
454
455 - Update scaffold generating machinery to return the version of pyramid and
456   pyramid docs for use in scaffolds. Updated starter, alchemy and zodb
457   templates to have links to correctly versioned documentation and reflect
458   which pyramid was used to generate the scaffold.
459
93bc46 460 - Removed non-ascii copyright symbol from templates, as this was
FT 461   causing the scaffolds to fail for project generation.
462
109b2a 463 - You can now run the scaffolding func tests via ``tox py2-scaffolds`` and
CM 464   ``tox py3-scaffolds``.
db0185 465