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.tomlinstead ofsetup.cfg. - Use
flit_coreinstead ofsetuptoolsas build backend. - Deprecate the
__version__attribute. Use feature detection, orimportlib.metadata.version("itsdangerous"), instead. Serializerand the return type ofdumpsis generic for type checking. By default it isSerializer[str]anddumpsreturns astr. If a differentserializerargument is given, it will try to infer the return type of itsdumpsmethod.- The default
hashlib.sha1may not be available in FIPS builds. Don't access it at import time so the developer has time to change the default.