Below is a regression in a small report export function. After the change the code still runs, but the behavior became unstable: some data may disappear, and a rerun after interruption sometimes does not proceed as expected.
after version.after block.python demo.py
export_lines() run on the same object.CPython 3.12python demo.py scriptasyncio, cancellation via task.cancel() and waiting for CancelledErrorBatchExporter.export_lines(lines) contract: accepts list[str], writes one line at a time to the target_path file, returns the number of lines writtenUse line comments to explain the problem, its impact, the fix and how to test it.