[3.9] bpo-44815: Always show deprecation in asyncio.gather/sleep() by Dreamsorcerer · Pull Request #27569 · python/cpython
I think this has introduced an unavoidable deprecation warning in BaseEventLoop.create_server(..., start_serving=True), which is the default value of start_serving:
https://github.com/python/cpython/blob/v3.9.7/Lib/asyncio/base_events.py#L1514-L1518
if start_serving: server._start_serving() # Skip one loop iteration so that all 'loop.add_reader' # go through. await tasks.sleep(0, loop=self)
It also appears to affect Server.start_serving, which does the same thing, and from a brief glance, self._loop here is not going to be None.
https://github.com/python/cpython/blob/v3.9.7/Lib/asyncio/base_events.py#L349-L353
async def start_serving(self): self._start_serving() # Skip one loop iteration so that all 'loop.add_reader' # go through. await tasks.sleep(0, loop=self._loop)
Edit: Late update, this new failure was also reported as https://bugs.python.org/issue45097 and fixed in 3.9.8.