summaryrefslogtreecommitdiff
path: root/dev-python/python-fire/files/python-fire-asyncio.patch
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-08-14 03:04:40 -0500
committerroot <root@alpha.trunkmasters.com>2026-08-14 03:04:40 -0500
commit44ac9950da93ffaa670439fbc31f0a3f95378bb3 (patch)
tree88c80e746a3195bb4d1869bcb64467fdabcc54c8 /dev-python/python-fire/files/python-fire-asyncio.patch
parent00a5031b2e58fb36fc981fe226565880b4798a8b (diff)
downloadsrcux-44ac9950da93ffaa670439fbc31f0a3f95378bb3.tar.gz
srcux-44ac9950da93ffaa670439fbc31f0a3f95378bb3.tar.xz
srcux-44ac9950da93ffaa670439fbc31f0a3f95378bb3.zip
Adding metadata
Diffstat (limited to 'dev-python/python-fire/files/python-fire-asyncio.patch')
-rw-r--r--dev-python/python-fire/files/python-fire-asyncio.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/dev-python/python-fire/files/python-fire-asyncio.patch b/dev-python/python-fire/files/python-fire-asyncio.patch
new file mode 100644
index 000000000000..6c53b95dac17
--- /dev/null
+++ b/dev-python/python-fire/files/python-fire-asyncio.patch
@@ -0,0 +1,22 @@
+From: https://github.com/google/python-fire/commit/716bbc23d7eca949fdb682172283c8d18f742cb6
+From: David Bieber <david810@gmail.com>
+Subject: [PATCH] Add Python 3.13 and 3.14 checking in build workflow (#623)
+* Add Python 3.13 and 3.14 checking in build workflow
+
+--- a/fire/core.py 2024-09-22 18:14:50.000000000 +0200
++++ b/fire/core.py 2026-08-13 23:36:49.448259702 +0200
+@@ -678,8 +678,12 @@
+
+ # Call the function.
+ if inspectutils.IsCoroutineFunction(fn):
+- loop = asyncio.get_event_loop()
+- component = loop.run_until_complete(fn(*varargs, **kwargs))
++ try:
++ loop = asyncio.get_running_loop()
++ except RuntimeError:
++ component = asyncio.run(fn(*varargs, **kwargs))
++ else:
++ component = loop.run_until_complete(fn(*varargs, **kwargs))
+ else:
+ component = fn(*varargs, **kwargs)
+