falconry / falcon

The no-magic web data plane API and microservices framework for Python developers, with a focus on reliability, correctness, and performance at scale.
https://falcon.readthedocs.io/en/stable/
Apache License 2.0
9.53k stars 945 forks source link

Remove support for `is_async` without a deprecation window #2343

Closed vytas7 closed 1 month ago

vytas7 commented 1 month ago

Normally, we always give an adequate deprecation window when removing features, even if it is a major release.

However, the is_async parameter (used for hooks and media validation) represents an edge case where I very much doubt that anyone from the community has ever needed this flag.

What is more, very easy workarounds exist: wrapping the method in question inside an async def, or even easier, simply using inspect.markcoroutinefunction() (on CPython 3.12+) to mark the method as such. In addition, Cython 3.0 (on CPython 3.10+) no longer needs this flag, as it is able to convey the information to the interpreter via setting the appropriate code flags.