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