Skip to content

Forward Arrow file flush and closed state to the stream - #2134

Open
betacatsling wants to merge 1 commit into
fsspec:masterfrom
betacatsling:fix/arrow-file-lifecycle
Open

Forward Arrow file flush and closed state to the stream#2134
betacatsling wants to merge 1 commit into
fsspec:masterfrom
betacatsling:fix/arrow-file-lifecycle

Conversation

@betacatsling

Copy link
Copy Markdown

ArrowFile delegates writes and close to its Arrow stream but inherits IOBase's no-op flush and independent closed flag. Buffered writes remain buffered after flush(), and closed files report closed=False.

Delegate flush alongside the other stream methods, and report the stream's closed state. The regression uses a real buffered PyArrow output stream and covers context-managed readers/writers and external stream closure.

On the unchanged base: 4 failed, 43 passed in the Arrow suite. With the fix, Arrow and core tests give 103 passed, 6 skipped on Linux/Python 3.12/PyArrow 25.0.1. Ruff lint/format and git diff --check passed. No remote Arrow filesystem was used.

AI assistance was used for implementation and local verification.

Fixes #2133.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ArrowFile flush does not flush buffered output and closed state remains false

1 participant