This addresses a failure in the `py38-dev` tests
caused by markupsafe recently dropping Python 3.8 support.
Changed in this commit:
* Drop Python 3.8 support
* Update CI and tox testing
* Update docs references to Python 3.8
* Remove a Windows / Python 3.8 admonition in the docs
* Address type annotations
* Incorporate style fixes
Still to do:
* `src/flask/sessions.py` contains these comments:
> TODO generic when Python > 3.8
This TODO should now be unblocked.
Firstly `run_sync` was a misleading name as it didn't run anything,
instead I think `async_to_sync` is much clearer as it converts a
coroutine function to a function. (Name stolen from asgiref).
Secondly trying to run the ensure_sync during registration made the
code more complex and brittle, e.g. the _flask_async_wrapper
usage. This was done to pay any setup costs during registration rather
than runtime, however this only saved a iscoroutne check. It allows
the weirdness of the Blueprint and Scaffold ensure_sync methods to be
removed.
Switching to runtime ensure_sync usage provides a method for
extensions to also support async, as now documented.