Steve Piercy
2017-05-23 30ec0ef47c0a4fbf76d33c997fe5c6502935e2df
commit | author | age
e62978 1 .. _changes_1.8.4:
SP 2
3 1.8.4 (unreleased)
4 ==================
5
6 Bug Fixes
7 ---------
8
9 Documentation Changes
10 ---------------------
11
12 - Updated pyramid-cookiecutter-starter prompts and description to include Mako. See https://github.com/Pylons/pyramid/pull/2982
13
30ec0e 14 - Added integrity attributes for JavaScripts in cookiecutters, scaffolds, and
SP 15   resulting source files in tutorials.
16   See https://github.com/Pylons/pyramid/issues/2548
17
e62978 18
eb636e 19 .. _changes_1.8.3:
SP 20
a575d3 21 1.8.3 (2017-03-12)
eb636e 22 ==================
SP 23
4d4c36 24 Bug Fixes
MM 25 ---------
26
27 - Fix a reference cycle causing memory leaks in which the registry
28   would keep a ``Configurator`` instance alive even after the configurator
29   was discarded. Another fix was also added for the ``global_registries``
30   object in which the registry was stored in a closure preventing it from
31   being deallocated. See https://github.com/Pylons/pyramid/pull/2973
32
6eceb0 33 - Fix a bug directly invoking ``pyramid.scripts.pserve.main`` with the
MM 34   ``--reload`` option in which ``sys.argv`` is always used in the subprocess
35   instead of the supplied ``argv``.
36   See https://github.com/Pylons/pyramid/pull/2974
37
eb636e 38 Documentation Changes
SP 39 ---------------------
40
41 - Updated pyramid-cookiecutter-starter prompts and reformat presentation of all
42   cookiecutter prompts. See https://github.com/Pylons/pyramid/pull/2966
43
be41b0 44 .. _changes_1.8.2:
MM 45
46 1.8.2 (2017-02-20)
47 ==================
064438 48
946dc2 49 - ``HTTPException``'s accepts a detail kwarg that may be used to pass
MM 50   additional details to the exception. You may now pass objects so long as
51   they have a valid ``__str__`` method.
52   See https://github.com/Pylons/pyramid/pull/2951
53
54 - Fix ``Configurator(settings=settings)`` to copy the passed in settings
55   dictionary instead of using it verbatim. This fixes a regression from 1.7
56   introduced via https://github.com/Pylons/pyramid/pull/2823.
57   See https://github.com/Pylons/pyramid/pull/2960
58
59 .. _changes_1.8.1:
064438 60
d2a84a 61 1.8.1 (2017-01-24)
MM 62 ==================
760f34 63
MM 64 - Restore the ``pyramid.registry.Registry`` signature that forwards extra
65   ``*args, **kwargs`` to ``zope.interface.registry.Components`` allowing
66   implementations to specify a custom registry with ``bases``.
67   See https://github.com/Pylons/pyramid/pull/2918
68
723633 69 1.8 (2017-01-21)
MM 70 ================
71
72 - No major changes from 1.8b1.
73
bf700d 74 1.8b1 (2017-01-17)
MM 75 ==================
bdb8e0 76
814cb5 77 Features
MM 78 --------
79
80 - Added an ``override`` option to ``config.add_translation_dirs`` to allow
7ef69e 81   later calls to place translation directories at a higher priority than
814cb5 82   earlier calls. See https://github.com/Pylons/pyramid/pull/2902
MM 83
bdb8e0 84 Documentation Changes
MM 85 ---------------------
86
87 - Improve registry documentation to discuss uses as a component registry
88   and as a dictionary. See https://github.com/Pylons/pyramid/pull/2893
89
8eac26 90 - Quick Tour, Quick Tutorial, and most other remaining documentation updated to
SP 91   use cookiecutters instead of pcreate and scaffolds.
92   See https://github.com/Pylons/pyramid/pull/2888 and
93   https://github.com/Pylons/pyramid/pull/2889
e82f3d 94
MM 95 - Fix unittests in wiki2 to work without different dependencies between
96   py2 and py3. See https://github.com/Pylons/pyramid/pull/2899
97
98 - Update Windows documentation to track newer Python 3 improvements to the
99   installer. See https://github.com/Pylons/pyramid/pull/2900
100
776666 101 - Updated the ``mod_wsgi`` tutorial to use cookiecutters and Apache 2.4+.
MM 102   See https://github.com/Pylons/pyramid/pull/2901
103
fc163d 104 1.8a1 (2016-12-25)
MM 105 ==================
70074c 106
1cf132 107 Backward Incompatibilities
BJR 108 --------------------------
109
75a92c 110 - Support for the ``IContextURL`` interface that was deprecated in Pyramid 1.3
MM 111   has been removed.  See https://github.com/Pylons/pyramid/pull/2822
1a7242 112
75a92c 113 - Following the Pyramid deprecation period (1.6 -> 1.8),
MM 114   daemon support for pserve has been removed. This includes removing the
115   daemon commands (start, stop, restart, status) as well as the following
116   arguments: ``--daemon``, ``--pid-file``, ``--log-file``,
117   ``--monitor-restart``, ``--status``, ``--user``, ``--group``,
118   ``--stop-daemon``
a5cbfc 119
75a92c 120   To run your server as a daemon you should use a process manager instead of
MM 121   pserve.
a5cbfc 122
75a92c 123   See https://github.com/Pylons/pyramid/pull/2615
dd0a15 124
75a92c 125 - ``pcreate`` is now interactive by default. You will be prompted if a file
MM 126   already exists with different content. Previously if there were similar
127   files it would silently skip them unless you specified ``--interactive``
128   or ``--overwrite``.
20c92a 129   See https://github.com/Pylons/pyramid/pull/2775
MM 130
4db295 131 - Removed undocumented argument ``cachebust_match`` from
MM 132   ``pyramid.static.static_view``. This argument was shipped accidentally
133   in Pyramid 1.6. See https://github.com/Pylons/pyramid/pull/2681
134
8dfcfb 135 - Change static view to avoid setting the ``Content-Encoding`` response header
MM 136   to an encoding guessed using Python's ``mimetypes`` module. This was causing
137   clients to decode the content of gzipped files when downloading them. The
138   client would end up with a ``foo.txt.gz`` file on disk that was already
139   decoded, thus should really be ``foo.txt``. Also, the ``Content-Encoding``
140   should only have been used if the client itself broadcast support for the
141   encoding via ``Accept-Encoding`` request headers.
142   See https://github.com/Pylons/pyramid/pull/2810
143
7b58c0 144 - Settings are no longer accessible as attributes on the settings object
MM 145   (e.g. ``request.registry.settings.foo``). This was deprecated in Pyramid 1.2.
146   See https://github.com/Pylons/pyramid/pull/2823
147
1cf132 148 Features
BJR 149 --------
d5c361 150
c8a5e0 151 - Python 3.6 compatibility.
SP 152   https://github.com/Pylons/pyramid/issues/2835
153
c22270 154 - ``pcreate`` learned about ``--package-name`` to allow you to create a new
MM 155   project in an existing folder with a different package name than the project
156   name. See https://github.com/Pylons/pyramid/pull/2783
44d0f6 157
75a92c 158 - The ``_get_credentials`` private method of ``BasicAuthAuthenticationPolicy``
MM 159   has been extracted into standalone function ``extract_http_basic_credentials``
160   in ``pyramid.authentication`` module, this function extracts HTTP Basic
0295ae 161   credentials from a ``request`` object, and returns them as a named tuple.
44e0fc 162   See https://github.com/Pylons/pyramid/pull/2662
693cb0 163
f6d001 164 - Pyramid 1.4 silently dropped a feature of the configurator that has been
MM 165   restored. It's again possible for action discriminators to conflict across
166   different action orders.
167   See https://github.com/Pylons/pyramid/pull/2757
168
10f348 169 - ``pyramid.paster.bootstrap`` and its sibling ``pyramid.scripting.prepare``
MM 170   can now be used as context managers to automatically invoke the ``closer``
171   and pop threadlocals off of the stack to prevent memory leaks.
172   See https://github.com/Pylons/pyramid/pull/2760
173
4ce8d4 174 - Added ``pyramid.config.Configurator.add_exception_view`` and the
MM 175   ``pyramid.view.exception_view_config`` decorator. It is now possible using
176   these methods or via the new ``exception_only=True`` option to ``add_view``
177   to add a view which will only be matched when handling an exception.
178   Previously any exception views were also registered for a traversal
179   context that inherited from the exception class which prevented any
180   exception-only optimizations.
181   See https://github.com/Pylons/pyramid/pull/2660
182
183 - Added the ``exception_only`` boolean to
184   ``pyramid.interfaces.IViewDeriverInfo`` which can be used by view derivers
185   to determine if they are wrapping a view which only handles exceptions.
186   This means that it is no longer necessary to perform request-time checks
187   for ``request.exception`` to determine if the view is handling an exception
188   - the pipeline can be optimized at config-time.
189   See https://github.com/Pylons/pyramid/pull/2660
190
325fc1 191 - ``pserve`` should now work with ``gevent`` and other workers that need
MM 192   to monkeypatch the process, assuming the server and / or the app do so
193   as soon as possible before importing the rest of pyramid.
194   See https://github.com/Pylons/pyramid/pull/2797
195
7b58c0 196 - Pyramid no longer copies the settings object passed to the
MM 197   ``pyramid.config.Configurator(settings=)``. The original ``dict`` is kept.
198   See https://github.com/Pylons/pyramid/pull/2823
199
200 - The csrf trusted origins setting may now be a whitespace-separated list of
201   domains. Previously only a python list was allowed. Also, it can now be set
202   using the ``PYRAMID_CSRF_TRUSTED_ORIGINS`` environment variable similar to
203   other settings. See https://github.com/Pylons/pyramid/pull/2823
204
067ce0 205 - ``pserve --reload`` now uses the
f52e13 206   `hupper <http://docs.pylonsproject.org/projects/hupper/en/latest/>`_
067ce0 207   library to monitor file changes. This comes with many improvements:
MM 208
209   - If the `watchdog <http://pythonhosted.org/watchdog/>`_ package is
210     installed then monitoring will be done using inotify instead of
211     cpu and disk-intensive polling.
212
213   - The monitor is now a separate process that will not crash and starts up
214     before any of your code.
215
216   - The monitor will not restart the process after a crash until a file is
217     saved.
218
219   - The monitor works on windows.
220
221   - You can now trigger a reload manually from a pyramid view or any other
222     code via ``hupper.get_reloader().trigger_reload()``. Kind of neat.
223
224   - You can trigger a reload by issuing a ``SIGHUP`` to the monitor process.
225
226   See https://github.com/Pylons/pyramid/pull/2805
227
abfb2f 228 - A new ``[pserve]`` section is supported in your config files with a
MM 229   ``watch_files`` key that can configure ``pserve --reload`` to monitor custom
230   file paths. See https://github.com/Pylons/pyramid/pull/2827
231
2d45de 232 - Allow streaming responses to be made from subclasses of
MM 233   ``pyramid.httpexceptions.HTTPException``. Previously the response would
234   be unrolled while testing for a body, making it impossible to stream
235   a response.
236   See https://github.com/Pylons/pyramid/pull/2863
237
50e8f0 238 - Update starter, alchemy and zodb scaffolds to support IPv6 by using the
MM 239   new ``listen`` directives in waitress.
240   See https://github.com/Pylons/pyramid/pull/2853
241
4c8eb2 242 - All p* scripts now use argparse instead of optparse. This improves their
MM 243   ``--help`` output as well as enabling nicer documentation of their options.
244   See https://github.com/Pylons/pyramid/pull/2864
245
5f4649 246 - Any deferred configuration action registered via ``config.action`` may now
MM 247   depend on threadlocal state, such as asset overrides, being active when
248   the action is executed.
249   See https://github.com/Pylons/pyramid/pull/2873
250
251 - Asset specifications for directories passed to
252   ``config.add_translation_dirs`` now support overriding the entire asset
253   specification, including the folder name. Previously only the package name
254   was supported and the folder would always need to have the same name.
255   See https://github.com/Pylons/pyramid/pull/2873
256
257 - ``config.begin()`` will propagate the current threadlocal request through
258   as long as the registry is the same. For example:
259
260   .. code-block:: python
261
262      request = Request.blank(...)
263      config.begin(request)  # pushes a request
264      config.begin()         # propagates the previous request through unchanged
265      assert get_current_request() is request
266
267   See https://github.com/Pylons/pyramid/pull/2873
268
3fc0a9 269 - Added a new ``callback`` option to ``config.set_default_csrf_options`` which
MM 270   can be used to determine per-request whether CSRF checking should be enabled
271   to allow for a mix authentication methods. Only cookie-based methods
272   generally require CSRF checking.
273   See https://github.com/Pylons/pyramid/pull/2778
274
1cf132 275 Bug Fixes
BJR 276 ---------
45f882 277
75a92c 278 - Fixed bug in ``proutes`` such that it now shows the correct view when a
MM 279   class and ``attr`` is involved.
d0b371 280   See: https://github.com/Pylons/pyramid/pull/2687
SP 281
ab0be8 282 - Fix a ``FutureWarning`` in Python 3.5 when using ``re.split`` on the
MM 283   ``format`` setting to the ``proutes`` script.
284   See https://github.com/Pylons/pyramid/pull/2714
285
c8530b 286 - Fix a ``RuntimeWarning`` emitted by WebOb when using arbitrary objects
MM 287   as the ``userid`` in the ``AuthTktAuthenticationPolicy``. This is now caught
288   by the policy and the object is serialized as a base64 string to avoid
289   the cryptic warning. Since the userid will be read back as a string on
290   subsequent requests a more useful warning is emitted encouraging you to
291   use a primitive type instead.
292   See https://github.com/Pylons/pyramid/pull/2715
293
f6d001 294 - Pyramid 1.6 introduced the ability for an action to invoke another action.
MM 295   There was a bug in the way that ``config.add_view`` would interact with
296   custom view derivers introduced in Pyramid 1.7 because the view's
297   discriminator cannot be computed until view derivers and view predicates
298   have been created in earlier orders. Invoking an action from another action
299   would trigger an unrolling of the pipeline and would compute discriminators
300   before they were ready. The new behavior respects the ``order`` of the action
301   and ensures the discriminators are not computed until dependent actions
302   from previous orders have executed.
303   See https://github.com/Pylons/pyramid/pull/2757
ed06c6 304
bff312 305 - Fix bug in i18n where the default domain would always use the Germanic plural
6421f4 306   style, even if a different plural function is defined in the relevant
MM 307   messages file. See https://github.com/Pylons/pyramid/pull/2859
bff312 308
5f4649 309 - The ``config.override_asset`` method now occurs during
MM 310   ``pyramid.config.PHASE1_CONFIG`` such that it is ordered to execute before
311   any calls to ``config.add_translation_dirs``.
312   See https://github.com/Pylons/pyramid/pull/2873
313
1cf132 314 Deprecations
BJR 315 ------------
cb98a9 316
d2f0fe 317 - The ``pcreate`` script and related scaffolds have been deprecated in favor
MM 318   of the popular
319   `cookiecutter <https://cookiecutter.readthedocs.io/en/latest/>`_ project.
320
321   All of Pyramid's official scaffolds as well as the tutorials have been
322   ported to cookiecutters:
323
324   - `pyramid-cookiecutter-starter
325     <https://github.com/Pylons/pyramid-cookiecutter-starter>`_
326
327   - `pyramid-cookiecutter-alchemy
328     <https://github.com/Pylons/pyramid-cookiecutter-alchemy>`_
329
330   - `pyramid-cookiecutter-zodb
331     <https://github.com/Pylons/pyramid-cookiecutter-zodb>`_
332
333   See https://github.com/Pylons/pyramid/pull/2780
334
d9c20d 335 Documentation Changes
MM 336 ---------------------
75a92c 337
85b301 338 - Update Typographical Conventions.
5f5e75 339   https://github.com/Pylons/pyramid/pull/2838
SP 340
75a92c 341 - Add `pyramid_nacl_session
MM 342   <http://docs.pylonsproject.org/projects/pyramid-nacl-session/en/latest/>`_
343   to session factories. See https://github.com/Pylons/pyramid/issues/2791
4c5e14 344
75a92c 345 - Update ``HACKING.txt`` from stale branch that was never merged to master.
f27435 346   See https://github.com/Pylons/pyramid/pull/2782
SP 347
446065 348 - Updated Windows installation instructions and related bits.
4acd85 349   See https://github.com/Pylons/pyramid/issues/2661
MM 350
351 - Fix an inconsistency in the documentation between view predicates and
352   route predicates and highlight the differences in their APIs.
353   See https://github.com/Pylons/pyramid/pull/2764
5b33ff 354
MM 355 - Clarify a possible misuse of the ``headers`` kwarg to subclasses of
ed16e1 356   ``pyramid.httpexceptions.HTTPException`` in which more appropriate
MM 357   kwargs from the parent class ``pyramid.response.Response`` should be
5b33ff 358   used instead. See https://github.com/Pylons/pyramid/pull/2750
6e037c 359
MM 360 - The SQLAlchemy + URL Dispatch + Jinja2 (``wiki2``) and
361   ZODB + Traversal + Chameleon (``wiki``) tutorials have been updated to
362   utilize the new cookiecutters and drop support for the ``pcreate``
363   scaffolds.
364
365   See https://github.com/Pylons/pyramid/pull/2881 and
366   https://github.com/Pylons/pyramid/pull/2883.
5428bc 367
0d5820 368 - Improve output of p* script descriptions for help.
fc163d 369   See https://github.com/Pylons/pyramid/pull/2886
fca6c1 370
e82f3d 371 - Quick Tour updated to use cookiecutters instead of pcreate and scaffolds.
MM 372   See https://github.com/Pylons/pyramid/pull/2888