github pallets/werkzeug 3.1.0

latest release: 3.0.x
13 hours ago

This is the Werkzeug 3.1.0 feature release. A feature release may include new features, remove previously deprecated code, add new deprecations, or introduce potentially breaking changes. 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.

PyPI: https://pypi.org/project/Werkzeug/3.1.0/
Changes: https://werkzeug.palletsprojects.com/en/stable/changes/#version-3-1-0
Milestone: https://github.com/pallets/werkzeug/milestone/34?closed=1

  • Drop support for Python 3.8. #2966
  • Remove previously deprecated code. #2967
  • Request.max_form_memory_size defaults to 500kB instead of unlimited. Non-file form fields over this size will cause a RequestEntityTooLarge error. #2964
  • OrderedMultiDict and ImmutableOrderedMultiDict are deprecated. Use MultiDict and ImmutableMultiDict instead. #2968
  • Behavior of properties on request.cache_control and response.cache_control has been significantly adjusted.
    • Dict values are always str | None. Setting properties will convert the value to a string. Setting a property to False is equivalent to setting it to None. Getting typed properties will return None if conversion raises ValueError, rather than the string. #2980
    • max_age is None if present without a value, rather than -1. #2980
    • no_cache is a boolean for requests, it is True instead of "*" when present. It remains a string for responses. #2980
    • max_stale is True if present without a value, rather than "*". #2980
    • no_transform is a boolean. Previously it was mistakenly always None. #2881
    • min_fresh is None if present without a value, rather than "*". #2881
    • private is True if present without a value, rather than "*". #2980
    • Added the must_understand property. #2881
    • Added the stale_while_revalidate, and stale_if_error properties. #2948
    • Type annotations more accurately reflect the values. #2881
  • Support Cookie CHIPS (Partitioned Cookies). #2797
  • Add 421 MisdirectedRequest HTTP exception. #2850
  • Increase default work factor for PBKDF2 to 1,000,000 iterations. #2969
  • Inline annotations for datastructures, removing stub files. #2970
  • MultiDict.getlist catches TypeError in addition to ValueError when doing type conversion. #2976
  • Implement | and |= operators for MultiDict, Headers, and CallbackDict, and disallow |= on immutable types. #2977

Don't miss a new werkzeug release

NewReleases is sending notifications on new releases.