Flask's recent 3.1.0 release, launched on November 13, 2024, introduces several important changes and enhancements that reflect its ongoing evolution:
-
Dropped Support for Python 3.8: The new version no longer supports Python 3.8, aligning with the trend of moving towards more modern versions of Python to leverage improved features and security updates.
-
Updated Dependency Versions: Flask 3.1.0 updates its minimum dependencies to the latest feature releases, requiring Werkzeug version 3.1, ItsDangerous version 2.2, and Blinker version 1.9.
-
New Configuration Options: The release adds several configuration options, including:
-
A parameter for
Flask.open_resource
,open_instance_resource
, andBlueprint.open_resource
to specify the encoding when opening files in text mode (defaulting to UTF-8). -
Customization of
Request.max_content_length
per request instead of globally throughMAX_CONTENT_LENGTH
, along with new configurations likeMAX_FORM_MEMORY_SIZE
andMAX_FORM_PARTS
-
-
Enhanced Security Features: Support for the
Partitioned
cookie attribute (CHIPS) has been added through theSESSION_COOKIE_PARTITIONED
configuration. Additionally, documentation regarding resource limits has been improved for better security practices. -
Improved Debugging Context Preservation: The implementation of context preservation during debugging has been enhanced, providing a more robust debugging experience.
-
Key Rotation Support: The configuration now includes
SECRET_KEY_FALLBACKS
, allowing for key rotation by maintaining a list of old secret keys that can still be used for unsigning.
These updates demonstrate Flask's commitment to modernization and security while enhancing usability for developers. The focus on improved configuration options and dependency management reflects the framework's adaptability to the evolving landscape of web development.
Citations:
- https://flask-es.readthedocs.io/changes/
- https://flask.palletsprojects.com/en/stable/changes/
- https://flask-sqlalchemy.readthedocs.io/en/stable/changes/
- https://flask.palletsprojects.com/en/stable/api/
- https://github.com/pallets-eco/flask-security-3.0/blob/develop/CHANGES
- https://www.reddit.com/r/Python/comments/17bnmxp/we_have_to_talk_about_flask/
- https://flask.palletsprojects.com
0 Comments