In the session export module, after a recent PR the behavior became unstable. A review of the changes is needed to find defects in the export finalization logic.
SessionExporter.export() accepts an iterable set of strings rows and a path target.target file must contain all passed rows in the original order.export(), the method must correctly release the temporary resource and propagate asyncio.CancelledError onward.python -m unittest
export(), only the target file exists with the full export contents.export() is cancelled, there is no open temporary file and no temporary file left on disk.asyncio.CancelledError.CPython 3.12python -m unittestasyncio, no third-party runnerstempfile, pathlib, os.replace, unlink operations are availableUse line comments to explain the problem, its impact, the fix and how to test it.