bpo-44566: resolve differences between asynccontextmanager and contextmanager (GH-27024) (#27266)

(cherry picked from commit 7f1c330da31c54e028dceaf3610877914c2a4497)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
4 files changed