Skip to content

gh-124293: Fix tar stream seekability checks - #159854

Open
limadog9 wants to merge 1 commit into
python:mainfrom
limadog9:gh-124293-tar-stream-seekable
Open

limadog9 wants to merge 1 commit into
python:mainfrom
limadog9:gh-124293-tar-stream-seekable

Conversation

@limadog9

@limadog9 limadog9 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Implement seekable() on the tar stream adapter so extractfile() results support seekability checks and forward seeks without raising AttributeError.

Update the attribute checks and add a forward-seek regression inherited by the compressed stream test classes. Stream reads still reject attempts to access data that has already been passed.

Fixes #124293.

Validation:

  • The new forward-seek regression raises AttributeError before the fix.
  • Full tarfile suite on a CPython debug build: 795 tests, 113 skipped.
  • Ruff, NEWS lint, and patchcheck.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'_Stream' object has no attribute 'seekable'

1 participant