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