Michael Merickel
2018-10-26 9c086aac7c53399506eb68f29b296ebbfb8e29d4
commit | author | age
d3fe14 1 unreleased
MM 2 ==========
3
4 Bug Fixes
5 ---------
6
7 - Fix the ``pyramid.testing.DummyRequest`` to support the new
8   ``request.accept`` API so that ``acceptable_offers`` is available even
9   when code sets the value to a string.
10   See https://github.com/Pylons/pyramid/pull/3396
11
7b024b 12 1.10a1 (2018-10-15)
MM 13 ===================
d826df 14
884eb5 15 Features
MM 16 --------
847fb7 17
77e2f1 18 - Add a ``_depth`` and ``_category`` arguments to all of the venusian
MM 19   decorators. The ``_category`` argument can be used to affect which actions
20   are registered when performing a ``config.scan(..., category=...)`` with a
21   specific category. The ``_depth`` argument should be used when wrapping
22   the decorator in your own. This change affects ``pyramid.view.view_config``,
23   ``pyramid.view.exception_view_config``,
24   ``pyramid.view.forbidden_view_config``, ``pyramid.view.notfound_view_config``,
25   ``pyramid.events.subscriber`` and ``pyramid.response.response_adapter``
26   decorators. See https://github.com/Pylons/pyramid/pull/3105 and
27   https://github.com/Pylons/pyramid/pull/3122
a0aaf0 28
9c725a 29 - Fix the ``pyramid.request.Request`` class name after using
MM 30   ``set_property`` or ``config.add_request_method`` such that the
31   ``str(request.__class__)`` would appear as ``pyramid.request.Request``
32   instead of ``pyramid.util.Request``.
33   See https://github.com/Pylons/pyramid/pull/3129
34
57ee91 35 - In ``cherrypy_server_runner``, prefer imports from the ``cheroot`` package
MM 36   over the legacy imports from `cherrypy.wsgiserver`.
ea79cb 37   See https://github.com/Pylons/pyramid/pull/3235
HR 38
f6aee3 39 - Add a context manager ``route_prefix_context`` to the
HS 40   ``pyramid.config.Configurator`` to allow for convenient setting of the
41   route_prefix for ``include`` and ``add_route`` calls inside the context.
42   See https://github.com/Pylons/pyramid/pull/3279
57ee91 43
f99798 44 - Modify the builtin session implementations to support ``SameSite`` options
MM 45   on cookies and set the default to ``'Lax'``. This affects
57ee91 46   ``pyramid.session.BaseCookieSessionFactory``,
MM 47   ``pyramid.session.SignedCookieSessionFactory``, and
48   ``pyramid.session.UnencryptedCookieSessionFactoryConfig``.
49   See https://github.com/Pylons/pyramid/pull/3300
f6aee3 50
87771a 51 - Modify ``pyramid.authentication.AuthTktAuthenticationPolicy`` and
7b024b 52   ``pyramid.csrf.CookieCSRFStoragePolicy`` to support the ``SameSite`` option
MM 53   on cookies and set the default to ``'Lax'``.
0ad05a 54   See https://github.com/Pylons/pyramid/pull/3319
87771a 55
e6c7ea 56 - Added new ``pyramid.httpexceptions.HTTPPermanentRedirect``
MM 57   exception/response object for a HTTP 308 redirect.
58   See https://github.com/Pylons/pyramid/pull/3302
59
990fb0 60 - Within ``pshell``, allow the user-defined ``setup`` function to be a
MM 61   generator, in which case it may wrap the command's lifecycle.
62   See https://github.com/Pylons/pyramid/pull/3318
63
64 - Within ``pshell``, variables defined by the ``[pshell]`` settings are
65   available within the user-defined ``setup`` function.
66   See https://github.com/Pylons/pyramid/pull/3318
7b6eb3 67
482075 68 - Add support for Python 3.7. Add testing on Python 3.8 with allowed failures.
SP 69   See https://github.com/Pylons/pyramid/pull/3333
70
ed6ddc 71 - Added the ``pyramid.config.Configurator.add_accept_view_order`` directive,
MM 72   allowing users to specify media type preferences in ambiguous situations
73   such as when several views match. A default ordering is defined for media
74   types that prefers human-readable html/text responses over JSON.
75   See https://github.com/Pylons/pyramid/pull/3326
76
2497d0 77 - Support a list of media types in the ``accept`` predicate used in
MM 78   ``pyramid.config.Configurator.add_route``.
79   See https://github.com/Pylons/pyramid/pull/3326
80
c31883 81 - Added ``pyramid.session.JSONSerializer``. See "Upcoming Changes to ISession
MM 82   in Pyramid 2.0" in the "Sessions" chapter of the documentation for more
83   information about this feature.
84   See https://github.com/Pylons/pyramid/pull/3353
85
80d701 86 - Add a ``registry`` argument to ``pyramid.renderers.get_renderer``
CD 87   to allow users to avoid threadlocals during renderer lookup.
88   See https://github.com/Pylons/pyramid/pull/3358
89
4a5504 90 - Pyramid's test suite is no longer distributed with the universal wheel.
MM 91   See https://github.com/Pylons/pyramid/pull/3387
92
93 - All Python code is now formatted automatically using ``black``.
94   See https://github.com/Pylons/pyramid/pull/3388
95
1cf132 96 Bug Fixes
BJR 97 ---------
45f882 98
7b6eb3 99 - Set appropriate ``code`` and ``title`` attributes on the ``HTTPClientError``
MM 100   and ``HTTPServerError`` exception classes. This prevents inadvertently
101   returning a 520 error code.
829cc3 102   See https://github.com/Pylons/pyramid/pull/3280
CE 103
f7a313 104 - Replace ``webob.acceptparse.MIMEAccept`` from WebOb with
BJR 105   ``webob.acceptparse.create_accept_header`` in the HTTP exception handling
106   code. The old ``MIMEAccept`` has been deprecated. The new methods follow the
107   RFC's more closely. See https://github.com/Pylons/pyramid/pull/3251
108
9d6851 109 - Catch extra errors like ``AttributeError`` when unpickling "trusted"
MM 110   session cookies with bad pickle data in them. This would occur when sharing
111   a secret between projects that shouldn't actually share session cookies,
112   like when reusing secrets between projects in development.
113   See https://github.com/Pylons/pyramid/pull/3325
114
1cf132 115 Deprecations
BJR 116 ------------
cb98a9 117
c31883 118 - The ``pyramid.intefaces.ISession`` interface will move to require
38bbea 119   JSON-serializable objects in Pyramid 2.0. See
c31883 120   "Upcoming Changes to ISession in Pyramid 2.0" in the "Sessions" chapter
MM 121   of the documentation for more information about this change.
122   See https://github.com/Pylons/pyramid/pull/3353
123
ba5ca6 124 - The ``pyramid.session.signed_serialize`` and
MM 125   ``pyramid.session.signed_deserialize`` functions will be removed in Pyramid
126   2.0, along with the removal of
127   ``pyramid.session.UnencryptedCookieSessionFactoryConfig`` which was
128   deprecated in Pyramid 1.5. Please switch to using the
129   ``SignedCookieSessionFactory``, copying the code, or another session
130   implementation if you're still using these features.
131   See https://github.com/Pylons/pyramid/pull/3353
132
4a9f4f 133 - Media ranges are deprecated in the ``accept`` argument of
MM 134   ``pyramid.config.Configurator.add_route``. Use a list of explicit
135   media types to ``add_route`` to support multiple types.
136
137 - Media ranges are deprecated in the ``accept`` argument of
138   ``pyramid.config.Configurator.add_view``.  There is no replacement for
139   ranges to ``add_view``, but after much discussion the workflow is
140   fundamentally ambiguous in the face of various client-supplied values for
141   the ``Accept`` header.
142   See https://github.com/Pylons/pyramid/pull/3326
143
884eb5 144 Backward Incompatibilities
MM 145 --------------------------
3213e2 146
d5a662 147 - On Python 3.4+ the ``repoze.lru`` dependency is dropped. If you were using
MM 148   this package directly in your apps you should make sure that you are
149   depending on it directly within your project.
150   See https://github.com/Pylons/pyramid/pull/3140
151
7b6eb3 152 - Remove the ``permission`` argument from
MM 153   ``pyramid.config.Configurator.add_route``. This was an argument left over
154   from a feature removed in Pyramid 1.5 and has had no effect since then.
155   See https://github.com/Pylons/pyramid/pull/3299
156
57ee91 157 - Modify the builtin session implementations to set ``SameSite='Lax'`` on
MM 158   cookies. This affects ``pyramid.session.BaseCookieSessionFactory``,
159   ``pyramid.session.SignedCookieSessionFactory``, and
160   ``pyramid.session.UnencryptedCookieSessionFactoryConfig``.
161   See https://github.com/Pylons/pyramid/pull/3300
162
990fb0 163 - Variables defined in the ``[pshell]`` section of the settings will no
MM 164   longer override those set by the ``setup`` function.
165   See https://github.com/Pylons/pyramid/pull/3318
166
93406d 167 - ``pyramid.config.Configurator.add_notfound_view`` uses default redirect
DK 168   class exception ``pyramid.httpexceptions.HTTPTemporaryRedirect`` instead
169   of previous ``pyramid.httpexceptions.HTTPFound``.
170   See https://github.com/Pylons/pyramid/pull/3328
171
1f307d 172 - Removed ``pyramid.config.Configurator.set_request_property`` which had been
781371 173   deprecated since Pyramid 1.5. Instead use
MM 174   ``pyramid.config.Configurator.add_request_method`` with ``reify=True`` or
175   ``property=True``.
1f307d 176   See https://github.com/Pylons/pyramid/pull/3368
MM 177
781371 178 - Removed the ``principal`` keyword argument from
MM 179   ``pyramid.security.remember`` which had been deprecated since Pyramid 1.6
180   and replaced by the ``userid`` argument.
181   See https://github.com/Pylons/pyramid/pull/3369
182
4a5504 183 - Removed the ``pyramid.tests`` subpackage that used to contain the Pyramid
MM 184   test suite. These changes also changed the format of the repository to move
185   the code into a ``src`` folder.
186   See https://github.com/Pylons/pyramid/pull/3387
187
785088 188 Documentation Changes
MM 189 ---------------------
190
c8abfb 191 - Ad support for Read The Docs Ethical Ads.
7b024b 192   See https://github.com/Pylons/pyramid/pull/3360 and
c8abfb 193   https://docs.readthedocs.io/en/latest/advertising/ethical-advertising.html
SP 194
0ed6b9 195 - Add support for alembic to the pyramid-cookiecutter-alchemy cookiecutter
MM 196   and update the wiki2 tutorial to explain how it works.
197   See https://github.com/Pylons/pyramid/pull/3307 and
198   https://github.com/Pylons/pyramid-cookiecutter-alchemy/pull/7
199
763b7a 200 - Bump Sphinx to >= 1.7.4 in setup.py to support ``emphasize-lines`` in PDFs
SP 201   and to pave the way for xelatex support.  See
202   https://github.com/Pylons/pyramid/pull/3271,
203   https://github.com/Pylons/pyramid/issues/667, and
204   https://github.com/Pylons/pyramid/issues/2572
d4c95c 205
MM 206 - Added extra tests to the quick tutorial.
207   See https://github.com/Pylons/pyramid/pull/3375