Michael Merickel
2018-10-04 c314e31223307d7fd739e0bc41519ae6d1d323d3
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
b7350e 115
884eb5 116 Backward Incompatibilities
MM 117 --------------------------
3213e2 118
d5a662 119 - On Python 3.4+ the ``repoze.lru`` dependency is dropped. If you were using
MM 120   this package directly in your apps you should make sure that you are
121   depending on it directly within your project.
122   See https://github.com/Pylons/pyramid/pull/3140
123
7b6eb3 124 - Remove the ``permission`` argument from
MM 125   ``pyramid.config.Configurator.add_route``. This was an argument left over
126   from a feature removed in Pyramid 1.5 and has had no effect since then.
127   See https://github.com/Pylons/pyramid/pull/3299
128
57ee91 129 - Modify the builtin session implementations to set ``SameSite='Lax'`` on
MM 130   cookies. This affects ``pyramid.session.BaseCookieSessionFactory``,
131   ``pyramid.session.SignedCookieSessionFactory``, and
132   ``pyramid.session.UnencryptedCookieSessionFactoryConfig``.
133   See https://github.com/Pylons/pyramid/pull/3300
134
990fb0 135 - Variables defined in the ``[pshell]`` section of the settings will no
MM 136   longer override those set by the ``setup`` function.
137   See https://github.com/Pylons/pyramid/pull/3318
138
93406d 139 - ``pyramid.config.Configurator.add_notfound_view`` uses default redirect
DK 140   class exception ``pyramid.httpexceptions.HTTPTemporaryRedirect`` instead
141   of previous ``pyramid.httpexceptions.HTTPFound``.
142   See https://github.com/Pylons/pyramid/pull/3328
143
1f307d 144 - Removed ``pyramid.config.Configurator.set_request_property`` which had been
781371 145   deprecated since Pyramid 1.5. Instead use
MM 146   ``pyramid.config.Configurator.add_request_method`` with ``reify=True`` or
147   ``property=True``.
1f307d 148   See https://github.com/Pylons/pyramid/pull/3368
MM 149
781371 150 - Removed the ``principal`` keyword argument from
MM 151   ``pyramid.security.remember`` which had been deprecated since Pyramid 1.6
152   and replaced by the ``userid`` argument.
153   See https://github.com/Pylons/pyramid/pull/3369
ed6ddc 154
785088 155 Documentation Changes
MM 156 ---------------------
157
c8abfb 158 - Ad support for Read The Docs Ethical Ads.
SP 159   https://github.com/Pylons/pyramid/pull/3360
160   https://docs.readthedocs.io/en/latest/advertising/ethical-advertising.html
161
0ed6b9 162 - Add support for alembic to the pyramid-cookiecutter-alchemy cookiecutter
MM 163   and update the wiki2 tutorial to explain how it works.
164   See https://github.com/Pylons/pyramid/pull/3307 and
165   https://github.com/Pylons/pyramid-cookiecutter-alchemy/pull/7
166
763b7a 167 - Bump Sphinx to >= 1.7.4 in setup.py to support ``emphasize-lines`` in PDFs
SP 168   and to pave the way for xelatex support.  See
169   https://github.com/Pylons/pyramid/pull/3271,
170   https://github.com/Pylons/pyramid/issues/667, and
171   https://github.com/Pylons/pyramid/issues/2572