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