Add support for Python 3.12.
Added HTTP 418 error code via pyramid.httpexceptions.HTTPImATeapot. See #3667
Coverage reports in tests based on Python 3.12 instead of Python 3.8.
All scripts now pass a new option
__script__
when loading the WSGI app. For example,pserve
sets__script__ == 'pserve'
. This works forpserve
,pshell
,prequest
,proutes
,ptweens
,pviews
, as well as when usingpyramid.paster.bootstrap
directly.When using
plaster-pastedeploy
to load an INI file, this option will manifest as a new value passed into theglobal_conf
arg of your application factory, where you can use it as part of initializing your app.See #3735
Replace usage of
md5
in the Pyramid view system withsha256
. This is not a security-related feature and is considered an implementation detail that should not impact users.See #3745
Replace usage of
pkg_resources
inpyramid.path.DottedNameResolver
. See #3748Replace usage of
pkg_resources
inpdistreport
andpshell
CLI commands. See #3749
Fix issues where permissions may be checked on exception views. This is not supposed to happen in normal circumstances.
This also prevents issues where a
request.url
fails to be decoded when logging info whenpyramid.debug_authorization
is enabled.Applications raising
pyramid.exceptions.BadCSRFToken
andpyramid.exceptions.BadCSRFOrigin
were returning invalid HTTP status lines with values like400 Bad CSRF Origin
instead of400 Bad Request
.See #3742
- Drop support for Python 3.6 and 3.7.
- Drop support for l*gettext() methods in the i18n module. These have been deprecated in Python's gettext module since 3.8, and removed in Python 3.11.
- Deprecated the ability to use a non-existent package with
pyramid.config.Configurator.add_static_view
andpyramid.static.static_view
. This can be fixed by choosing a path located within a real package as theroot_dir
for your static files. This is almost always either a misconfig or an attempt to define an alias location for use withpyramid.config.Configurator.override_asset
. See #3752
- Sync the SQLAlchemy Wiki tutorial with changes to the
pyramid-cookiecutter-starter
. Includes updates to usepyproject.toml
to replace separate config files forpytest
,coverage
, andsetuptools
. Also upgrades patterns to support SQLAlchemy 2.0. See #3747 - Sync the ZODB Wiki tutorial with changes to the
pyramid-cookiecutter-starter
. Includes updates to usepyproject.toml
to replace separate config files forpytest
,coverage
, andsetuptools
. See #3751