Skip to content

Stop passing "rb" as the queue size in the test_close_reader test - #295

Open
ptweezy wants to merge 1 commit into
pycompression:developfrom
ptweezy:test-close-reader
Open

ptweezy wants to merge 1 commit into
pycompression:developfrom
ptweezy:test-close-reader

Conversation

@ptweezy

@ptweezy ptweezy commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

test_close_reader calls _ThreadedGzipReader(tmp, "rb"), but the second parameter is queue_size, so the reader creates queue.Queue("rb"). If the reader thread reaches put() before close() stops it, the thread fails with TypeError. pytest then shows a PytestUnhandledThreadExceptionWarning, but the test passes. This has happened in CI, for example in this macOS job and in this develop push.

This PR removes the argument.

This PR changes only tests, so it has no CHANGELOG entry.

Checklist

  • Pull request details were added to CHANGELOG.rst
  • Documentation was updated (if needed)

The second parameter of _ThreadedGzipReader is queue_size, so the test
created queue.Queue("rb"). If the reader thread got to put() before
close(), it failed with TypeError.

This branch has not been deployed

No deployments
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.

1 participant