diff --git a/modal/functions.py b/modal/functions.py index 0aa63b1a2..0b58ae865 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,