Michael Merickel
2018-10-17 e14661417e7ceb50d5cf83bbd6abd6b133e473ba
commit | author | age
7b024b 1 1.10a1 (2018-10-15)
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
7b024b 41   ``pyramid.csrf.CookieCSRFStoragePolicy`` to support the ``SameSite`` option
MM 42   on cookies and set the default to ``'Lax'``.
0ad05a 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
4a5504 79 - Pyramid's test suite is no longer distributed with the universal wheel.
MM 80   See https://github.com/Pylons/pyramid/pull/3387
81
82 - All Python code is now formatted automatically using ``black``.
83   See https://github.com/Pylons/pyramid/pull/3388
84
1cf132 85 Bug Fixes
BJR 86 ---------
45f882 87
7b6eb3 88 - Set appropriate ``code`` and ``title`` attributes on the ``HTTPClientError``
MM 89   and ``HTTPServerError`` exception classes. This prevents inadvertently
90   returning a 520 error code.
829cc3 91   See https://github.com/Pylons/pyramid/pull/3280
CE 92
f7a313 93 - Replace ``webob.acceptparse.MIMEAccept`` from WebOb with
BJR 94   ``webob.acceptparse.create_accept_header`` in the HTTP exception handling
95   code. The old ``MIMEAccept`` has been deprecated. The new methods follow the
96   RFC's more closely. See https://github.com/Pylons/pyramid/pull/3251
97
9d6851 98 - Catch extra errors like ``AttributeError`` when unpickling "trusted"
MM 99   session cookies with bad pickle data in them. This would occur when sharing
100   a secret between projects that shouldn't actually share session cookies,
101   like when reusing secrets between projects in development.
102   See https://github.com/Pylons/pyramid/pull/3325
103
1cf132 104 Deprecations
BJR 105 ------------
cb98a9 106
c31883 107 - The ``pyramid.intefaces.ISession`` interface will move to require
38bbea 108   JSON-serializable objects in Pyramid 2.0. See
c31883 109   "Upcoming Changes to ISession in Pyramid 2.0" in the "Sessions" chapter
MM 110   of the documentation for more information about this change.
111   See https://github.com/Pylons/pyramid/pull/3353
112
ba5ca6 113 - The ``pyramid.session.signed_serialize`` and
MM 114   ``pyramid.session.signed_deserialize`` functions will be removed in Pyramid
115   2.0, along with the removal of
116   ``pyramid.session.UnencryptedCookieSessionFactoryConfig`` which was
117   deprecated in Pyramid 1.5. Please switch to using the
118   ``SignedCookieSessionFactory``, copying the code, or another session
119   implementation if you're still using these features.
120   See https://github.com/Pylons/pyramid/pull/3353
121
4a9f4f 122 - Media ranges are deprecated in the ``accept`` argument of
MM 123   ``pyramid.config.Configurator.add_route``. Use a list of explicit
124   media types to ``add_route`` to support multiple types.
125
126 - Media ranges are deprecated in the ``accept`` argument of
127   ``pyramid.config.Configurator.add_view``.  There is no replacement for
128   ranges to ``add_view``, but after much discussion the workflow is
129   fundamentally ambiguous in the face of various client-supplied values for
130   the ``Accept`` header.
131   See https://github.com/Pylons/pyramid/pull/3326
132
884eb5 133 Backward Incompatibilities
MM 134 --------------------------
3213e2 135
d5a662 136 - On Python 3.4+ the ``repoze.lru`` dependency is dropped. If you were using
MM 137   this package directly in your apps you should make sure that you are
138   depending on it directly within your project.
139   See https://github.com/Pylons/pyramid/pull/3140
140
7b6eb3 141 - Remove the ``permission`` argument from
MM 142   ``pyramid.config.Configurator.add_route``. This was an argument left over
143   from a feature removed in Pyramid 1.5 and has had no effect since then.
144   See https://github.com/Pylons/pyramid/pull/3299
145
57ee91 146 - Modify the builtin session implementations to set ``SameSite='Lax'`` on
MM 147   cookies. This affects ``pyramid.session.BaseCookieSessionFactory``,
148   ``pyramid.session.SignedCookieSessionFactory``, and
149   ``pyramid.session.UnencryptedCookieSessionFactoryConfig``.
150   See https://github.com/Pylons/pyramid/pull/3300
151
990fb0 152 - Variables defined in the ``[pshell]`` section of the settings will no
MM 153   longer override those set by the ``setup`` function.
154   See https://github.com/Pylons/pyramid/pull/3318
155
93406d 156 - ``pyramid.config.Configurator.add_notfound_view`` uses default redirect
DK 157   class exception ``pyramid.httpexceptions.HTTPTemporaryRedirect`` instead
158   of previous ``pyramid.httpexceptions.HTTPFound``.
159   See https://github.com/Pylons/pyramid/pull/3328
160
1f307d 161 - Removed ``pyramid.config.Configurator.set_request_property`` which had been
781371 162   deprecated since Pyramid 1.5. Instead use
MM 163   ``pyramid.config.Configurator.add_request_method`` with ``reify=True`` or
164   ``property=True``.
1f307d 165   See https://github.com/Pylons/pyramid/pull/3368
MM 166
781371 167 - Removed the ``principal`` keyword argument from
MM 168   ``pyramid.security.remember`` which had been deprecated since Pyramid 1.6
169   and replaced by the ``userid`` argument.
170   See https://github.com/Pylons/pyramid/pull/3369
171
4a5504 172 - Removed the ``pyramid.tests`` subpackage that used to contain the Pyramid
MM 173   test suite. These changes also changed the format of the repository to move
174   the code into a ``src`` folder.
175   See https://github.com/Pylons/pyramid/pull/3387
176
785088 177 Documentation Changes
MM 178 ---------------------
179
c8abfb 180 - Ad support for Read The Docs Ethical Ads.
7b024b 181   See https://github.com/Pylons/pyramid/pull/3360 and
c8abfb 182   https://docs.readthedocs.io/en/latest/advertising/ethical-advertising.html
SP 183
0ed6b9 184 - Add support for alembic to the pyramid-cookiecutter-alchemy cookiecutter
MM 185   and update the wiki2 tutorial to explain how it works.
186   See https://github.com/Pylons/pyramid/pull/3307 and
187   https://github.com/Pylons/pyramid-cookiecutter-alchemy/pull/7
188
763b7a 189 - Bump Sphinx to >= 1.7.4 in setup.py to support ``emphasize-lines`` in PDFs
SP 190   and to pave the way for xelatex support.  See
191   https://github.com/Pylons/pyramid/pull/3271,
192   https://github.com/Pylons/pyramid/issues/667, and
193   https://github.com/Pylons/pyramid/issues/2572
d4c95c 194
MM 195 - Added extra tests to the quick tutorial.
196   See https://github.com/Pylons/pyramid/pull/3375