From 3d09ad6542f98dfd1f97123ed9e4e2a457966465 Mon Sep 17 00:00:00 2001 From: Carlton Gibson Date: Thu, 15 Dec 2022 12:15:43 +0100 Subject: [PATCH] Added release note for coroutine detection shims. --- CHANGELOG.txt | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 0a4f1c85..22fa0a54 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,21 @@ -UNRELEASED ----------- +3.6.0 (UNRELEASED) +------------------ + +* Two new functions are added to the ``asgiref.sync`` module: ``iscoroutinefunction()`` + and ``markcoroutinefunction()``. + + Python 3.12 deprecates ``asyncio.iscoroutinefunction()`` as an alias for + ``inspect.iscoroutinefunction()``, whilst also removing the ``_is_coroutine`` marker. + The latter is replaced with the ``inspect.markcoroutinefunction`` decorator. + + The new ``asgiref.sync`` functions are compatibility shims for these + functions that can be used until Python 3.12 is the minimum supported + version. + + **Note** that these functions are considered **beta**, and as such, whilst + not likely, are subject to change in a point release, until the final release + of Python 3.12. They are included in ``asgiref`` now so that they can be + adopted by Django 4.2, in preparation for support of Python 3.12. * The ``loop`` argument to ``asgiref.timeout.timeout`` is deprecated. As per other ``asyncio`` based APIs, the running event loop is used by default. Note that