Need help testing testsuite - untwisted

Hi All,

I’ve been working on converting the Testsuite from twisted to asyncio using Claude and Codex as an unofficial side project. I’m not sure how many folks out there use the Testsuite actively, but I could use some help testing the final output. If you have some time and are up for it, please give it a go. Any feedback is much appreciated!

thanks!

Looking very briefly at this commit, just for example, one or two things stand out to me.

  • Several asyncio.ensure_future() calls that don’t save their result anywhere — the docs say:

Important

Save a reference to the result of this function, to avoid a task disappearing mid-execution.

See also the create_task() function which is the preferred way for creating new tasks or use asyncio.TaskGroup which keeps reference to the task internally.

  • Saw this function
    async def _connect_async(self):
        try:
            connection = await websockets.connect(self.url,
                                                  subprotocols=['ari'])
        except Exception as exc:
            LOGGER.debug("Connection failed (%s); attempting again in 1 second",
                         exc)
            reactor.callLater(1, self.reconnect)
            return
        proto = self.buildProtocol()
        proto._attach(connection)

I just thought it would be slightly cleaner as

    async def _connect_async(self):
        try:
            connection = await websockets.connect(self.url,
                                                  subprotocols=['ari'])
        except Exception as exc:
            LOGGER.debug("Connection failed (%s); attempting again in 1 second",
                         exc)
            reactor.callLater(1, self.reconnect)
        else:
            proto = self.buildProtocol()
            proto._attach(connection)
  • Explicitly specifying object as a superclass — unnecessary (but harmless) in Python 3.

Anyway, just some random thoughts.