pallets / flask

The Python micro framework for building web applications.
https://flask.palletsprojects.com
BSD 3-Clause "New" or "Revised" License
68.2k stars 16.25k forks source link

PROVIDE_AUTOMATIC_OPTIONS causes KeyError if not set #5642

Closed develerltd closed 2 weeks ago

develerltd commented 2 weeks ago

https://github.com/pallets/flask/blob/bc098406af9537aacc436cb2ea777fbc9ff4c5aa/src/flask/sansio/app.py#L641C12-L641C86

Simply changing this to : self.config.get("PROVIDE_AUTOMATIC_OPTIONS", False) should resolve the problem.

This change now released is causing upstream trouble in other packages such as Quart: https://github.com/pallets/quart/issues/371

davidism commented 2 weeks ago

Duplicate of pallets/quart#371

develerltd commented 2 weeks ago

This is not a duplicate as this is a separate project.

Anything that doesn't pin to flask 3.0.* will be broken by this change.

The fix is simple, as far as I am aware

davidism commented 2 weeks ago

Quart 0.19.9 is now available on PyPI.