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