From e6636be53a387967bdd2c55d64649e619c1edf54 Mon Sep 17 00:00:00 2001 From: Daniel Shaar Date: Wed, 11 Dec 2024 21:28:51 +0000 Subject: [PATCH] Deprecate spawning generator functions. --- modal/functions.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modal/functions.py b/modal/functions.py index 0aa63b1a2e..0b58ae8655 100644 --- a/modal/functions.py +++ b/modal/functions.py @@ -1275,6 +1275,10 @@ async def _call_generator(self, args, kwargs): @synchronizer.no_io_translation async def _call_generator_nowait(self, args, kwargs): + deprecation_warning( + (2024, 12, 11), + "Calling spawn on a generator function is deprecated and will soon be removed.", + ) return await _Invocation.create( self, args,