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