Steve Piercy
2016-11-29 968bebc0d1cbb6d85eb446b41c0f4560383c3022
commit | author | age
70074c 1 unreleased
MM 2 ==========
3
1cf132 4 Backward Incompatibilities
BJR 5 --------------------------
6
a5cbfc 7  - Following the Pyramid deprecation period (1.6 -> 1.8),
Z 8    daemon support for pserve has been removed. This includes removing the
9    daemon commands (start, stop, restart, status) as well as the following
10    arguments:
11    --daemon --pid-file --log-file --monitor-restart --status --user --group
12    --stop-daemon
13
14    To run your server as a daemon you should use a process manager instead of
15    pserve.
16
dd0a15 17    See https://github.com/Pylons/pyramid/pull/2615
MM 18
4db295 19 - ``pcreate`` is now interactive by default. You will be prompted if
20c92a 20   a file already exists with different content. Previously if there were
MM 21   similar files it would silently skip them unless you specified
22   ``--interactive`` or ``--overwrite``.
23   See https://github.com/Pylons/pyramid/pull/2775
24
4db295 25 - Removed undocumented argument ``cachebust_match`` from
MM 26   ``pyramid.static.static_view``. This argument was shipped accidentally
27   in Pyramid 1.6. See https://github.com/Pylons/pyramid/pull/2681
28
8dfcfb 29 - Change static view to avoid setting the ``Content-Encoding`` response header
MM 30   to an encoding guessed using Python's ``mimetypes`` module. This was causing
31   clients to decode the content of gzipped files when downloading them. The
32   client would end up with a ``foo.txt.gz`` file on disk that was already
33   decoded, thus should really be ``foo.txt``. Also, the ``Content-Encoding``
34   should only have been used if the client itself broadcast support for the
35   encoding via ``Accept-Encoding`` request headers.
36   See https://github.com/Pylons/pyramid/pull/2810
37
7b58c0 38 - Settings are no longer accessible as attributes on the settings object
MM 39   (e.g. ``request.registry.settings.foo``). This was deprecated in Pyramid 1.2.
40   See https://github.com/Pylons/pyramid/pull/2823
41
1cf132 42 Features
BJR 43 --------
d5c361 44
c8a5e0 45 - Python 3.6 compatibility.
SP 46   https://github.com/Pylons/pyramid/issues/2835
47
44d0f6 48 - pcreate learned about --package-name to allow you to create a new project in
BJR 49   an existing folder with a different package name than the project name. See
50   https://github.com/Pylons/pyramid/pull/2783
51
693cb0 52 - The `_get_credentials` private method of `BasicAuthAuthenticationPolicy`
0295ae 53   has been extracted into standalone function ``extract_http_basic_credentials`
693cb0 54   in `pyramid.authentication` module, this function extracts HTTP Basic
0295ae 55   credentials from a ``request`` object, and returns them as a named tuple.
44e0fc 56   See https://github.com/Pylons/pyramid/pull/2662
693cb0 57
f6d001 58 - Pyramid 1.4 silently dropped a feature of the configurator that has been
MM 59   restored. It's again possible for action discriminators to conflict across
60   different action orders.
61   See https://github.com/Pylons/pyramid/pull/2757
62
10f348 63 - ``pyramid.paster.bootstrap`` and its sibling ``pyramid.scripting.prepare``
MM 64   can now be used as context managers to automatically invoke the ``closer``
65   and pop threadlocals off of the stack to prevent memory leaks.
66   See https://github.com/Pylons/pyramid/pull/2760
67
4ce8d4 68 - Added ``pyramid.config.Configurator.add_exception_view`` and the
MM 69   ``pyramid.view.exception_view_config`` decorator. It is now possible using
70   these methods or via the new ``exception_only=True`` option to ``add_view``
71   to add a view which will only be matched when handling an exception.
72   Previously any exception views were also registered for a traversal
73   context that inherited from the exception class which prevented any
74   exception-only optimizations.
75   See https://github.com/Pylons/pyramid/pull/2660
76
77 - Added the ``exception_only`` boolean to
78   ``pyramid.interfaces.IViewDeriverInfo`` which can be used by view derivers
79   to determine if they are wrapping a view which only handles exceptions.
80   This means that it is no longer necessary to perform request-time checks
81   for ``request.exception`` to determine if the view is handling an exception
82   - the pipeline can be optimized at config-time.
83   See https://github.com/Pylons/pyramid/pull/2660
84
325fc1 85 - ``pserve`` should now work with ``gevent`` and other workers that need
MM 86   to monkeypatch the process, assuming the server and / or the app do so
87   as soon as possible before importing the rest of pyramid.
88   See https://github.com/Pylons/pyramid/pull/2797
89
7b58c0 90 - Pyramid no longer copies the settings object passed to the
MM 91   ``pyramid.config.Configurator(settings=)``. The original ``dict`` is kept.
92   See https://github.com/Pylons/pyramid/pull/2823
93
94 - The csrf trusted origins setting may now be a whitespace-separated list of
95   domains. Previously only a python list was allowed. Also, it can now be set
96   using the ``PYRAMID_CSRF_TRUSTED_ORIGINS`` environment variable similar to
97   other settings. See https://github.com/Pylons/pyramid/pull/2823
98
067ce0 99 - ``pserve --reload`` now uses the
MM 100   `hupper <http://docs.pylonsproject.org/projects/hupper/en/latest/>`
101   library to monitor file changes. This comes with many improvements:
102
103   - If the `watchdog <http://pythonhosted.org/watchdog/>`_ package is
104     installed then monitoring will be done using inotify instead of
105     cpu and disk-intensive polling.
106
107   - The monitor is now a separate process that will not crash and starts up
108     before any of your code.
109
110   - The monitor will not restart the process after a crash until a file is
111     saved.
112
113   - The monitor works on windows.
114
115   - You can now trigger a reload manually from a pyramid view or any other
116     code via ``hupper.get_reloader().trigger_reload()``. Kind of neat.
117
118   - You can trigger a reload by issuing a ``SIGHUP`` to the monitor process.
119
120   See https://github.com/Pylons/pyramid/pull/2805
121
1cf132 122 Bug Fixes
BJR 123 ---------
45f882 124
674f2b 125 - Fixed bug in `proutes` such that it now shows the correct view when a class
d0b371 126   and `attr` is involved.
SP 127   See: https://github.com/Pylons/pyramid/pull/2687
128
ab0be8 129 - Fix a ``FutureWarning`` in Python 3.5 when using ``re.split`` on the
MM 130   ``format`` setting to the ``proutes`` script.
131   See https://github.com/Pylons/pyramid/pull/2714
132
c8530b 133 - Fix a ``RuntimeWarning`` emitted by WebOb when using arbitrary objects
MM 134   as the ``userid`` in the ``AuthTktAuthenticationPolicy``. This is now caught
135   by the policy and the object is serialized as a base64 string to avoid
136   the cryptic warning. Since the userid will be read back as a string on
137   subsequent requests a more useful warning is emitted encouraging you to
138   use a primitive type instead.
139   See https://github.com/Pylons/pyramid/pull/2715
140
f6d001 141 - Pyramid 1.6 introduced the ability for an action to invoke another action.
MM 142   There was a bug in the way that ``config.add_view`` would interact with
143   custom view derivers introduced in Pyramid 1.7 because the view's
144   discriminator cannot be computed until view derivers and view predicates
145   have been created in earlier orders. Invoking an action from another action
146   would trigger an unrolling of the pipeline and would compute discriminators
147   before they were ready. The new behavior respects the ``order`` of the action
148   and ensures the discriminators are not computed until dependent actions
149   from previous orders have executed.
150   See https://github.com/Pylons/pyramid/pull/2757
ed06c6 151
1cf132 152 Deprecations
BJR 153 ------------
cb98a9 154
d9c20d 155 Documentation Changes
MM 156 ---------------------
4c5e14 157 - Add pyramid_nacl_session to session factories.
SP 158   See https://github.com/Pylons/pyramid/issues/2791
159
f27435 160 - Update HACKING.txt from stale branch that was never merged to master.
SP 161   See https://github.com/Pylons/pyramid/pull/2782
162
446065 163 - Updated Windows installation instructions and related bits.
4acd85 164   See https://github.com/Pylons/pyramid/issues/2661
MM 165
166 - Fix an inconsistency in the documentation between view predicates and
167   route predicates and highlight the differences in their APIs.
168   See https://github.com/Pylons/pyramid/pull/2764
5b33ff 169
MM 170 - Clarify a possible misuse of the ``headers`` kwarg to subclasses of
171   :class:`pyramid.httpexceptions.HTTPException` in which more appropriate
172   kwargs from the parent class :class:`pyramid.response.Response` should be
173   used instead. See https://github.com/Pylons/pyramid/pull/2750