This is a feature release, which includes new features, removes previously deprecated code, and adds new deprecations. The 2.2.x branch is now the supported fix branch, the 2.1.x branch will become a tag marking the end of support for that branch. We encourage everyone to upgrade, and to use a tool such as pip-tools to pin all dependencies and control upgrades. Test with warnings treated as errors to be able to adapt to deprecation warnings early.
Changes: https://itsdangerous.palletsprojects.com/en/2.2.x/changes/#version-2-2-0
Milestone: https://github.com/pallets/itsdangerous/milestone/8?closed=1
- Drop support for Python 3.7.
- Use modern packaging metadata with
pyproject.toml
instead ofsetup.cfg
. - Use
flit_core
instead ofsetuptools
as build backend. - Deprecate the
__version__
attribute. Use feature detection, orimportlib.metadata.version("itsdangerous")
, instead. Serializer
and the return type ofdumps
is generic for type checking. By default it isSerializer[str]
anddumps
returns astr
. If a differentserializer
argument is given, it will try to infer the return type of itsdumps
method.- The default
hashlib.sha1
may not be available in FIPS builds. Don't access it at import time so the developer has time to change the default.