public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Filipe Rosset <rosset.filipe@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/monkeytype] rawhide: Replace asyncio.iscoroutinefunction with inspect equivalent
Date: Wed, 25 Nov 2026 17:17:31 GMT	[thread overview]
Message-ID: <179562705149.1.155961536097935796.rpms-monkeytype-8f263e68e7e6@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/monkeytype
            Branch : rawhide
            Commit : 8f263e68e7e630e148450022bcd22ca2dde3b416
            Author : Filipe Rosset <rosset.filipe@gmail.com>
            Date   : 2026-11-25T12:49:24-03:00
            Stats  : +39/-0 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/monkeytype/c/8f263e68e7e630e148450022bcd22ca2dde3b416?branch=rawhide

            Log:
            Replace asyncio.iscoroutinefunction with inspect equivalent

asyncio.iscoroutinefunction() was deprecated in Python 3.12 (bpo-45353,
bpo-45354) and removed in Python 3.16. Use the equivalent
inspect.iscoroutinefunction() instead, which is already imported in this
module.

Fixes Fedora bug 2584095:
  AttributeError: module 'asyncio' has no attribute 'iscoroutinefunction'

Signed-off-by: Filipe Rosset <rosset.filipe@gmail.com>

---
diff --git a/asyncio-iscoroutinefunction-py316.patch b/asyncio-iscoroutinefunction-py316.patch
new file mode 100644
index 0000000..8b098bb
--- /dev/null
+++ b/asyncio-iscoroutinefunction-py316.patch
@@ -0,0 +1,37 @@
+From: Filipe Rosset <rosset.filipe@gmail.com>
+Subject: [PATCH] Replace asyncio.iscoroutinefunction with inspect equivalent
+
+asyncio.iscoroutinefunction() was deprecated in Python 3.12 (bpo-45353,
+bpo-45354) and removed in Python 3.16. Use the equivalent
+inspect.iscoroutinefunction() instead, which is already imported in this
+module.
+
+Fixes Fedora bug 2584095:
+  AttributeError: module 'asyncio' has no attribute 'iscoroutinefunction'
+
+---
+ monkeytype/stubs.py | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/monkeytype/stubs.py b/monkeytype/stubs.py
+--- a/monkeytype/stubs.py
++++ b/monkeytype/stubs.py
+@@ -3,7 +3,6 @@
+ #
+ # This source code is licensed under the BSD-style license found in the
+ # LICENSE file in the root directory of this source tree.
+-import asyncio
+ import collections
+ import enum
+ import inspect
+@@ -739,7 +738,7 @@ class FunctionDefinition(Definition):
+     ) -> "FunctionDefinition":
+         kind = FunctionKind.from_callable(func)
+         sig = inspect.Signature.from_callable(func)
+-        is_async = asyncio.iscoroutinefunction(func)
++        is_async = inspect.iscoroutinefunction(func)
+         return FunctionDefinition(
+             func.__module__, func.__qualname__, kind, sig, is_async
+         )
+--
+2.43.0

diff --git a/monkeytype.spec b/monkeytype.spec
index 414bbf9..0f9827a 100644
--- a/monkeytype.spec
+++ b/monkeytype.spec
@@ -18,6 +18,8 @@ URL:            https://github.com/instagram/%{srcname}
 Source:         %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz
 # pytest 9 compatibility
 Patch:          https://github.com/Instagram/MonkeyType/pull/385.patch
+# asyncio.iscoroutinefunction removed in Python 3.16
+Patch:          asyncio-iscoroutinefunction-py316.patch
 
 BuildArch:      noarch
 

                 reply	other threads:[~2026-11-25 17:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179562705149.1.155961536097935796.rpms-monkeytype-8f263e68e7e6@fedoraproject.org \
    --to=rosset.filipe@gmail.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox