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