public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/monkeytype] rawhide: Replace asyncio.iscoroutinefunction with inspect equivalent
@ 2026-11-25 17:17 Filipe Rosset
0 siblings, 0 replies; only message in thread
From: Filipe Rosset @ 2026-11-25 17:17 UTC (permalink / raw)
To: git-commits
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-25 17:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-25 17:17 [rpms/monkeytype] rawhide: Replace asyncio.iscoroutinefunction with inspect equivalent Filipe Rosset
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox