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