Repository navigation
Conversation
This was referenced Oct 7, 2026
Owner
|
Folded into #609 (see the PR description for credit). Thanks for the report and the repro. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The change
The I/O guide sends a text string to
SpooledBytesIO, which raisesTypeError: memoryview: a bytes-like object is required, not 'str'. UseSpooledStringIOfor theio.StringIOreplacement and explain the text/binary distinction. Remove Python-2-onlycStringIOclaims and the claim that a binary standard-library spooled file cannot be opened as a ZIP.Validation: ran the original failing text write; verified the corrected text examples and rollover; opened an in-memory ZIP through both binary spooled implementations.
uv run pytest --doctest-modules boltons tests -q: 678 passed, with 12 subtests passed. Runtime code is unchanged.The backstory
I asked Codex to check existing issues and documentation against repository behavior. The text-stream example failed during that review, so this contribution corrects the guide with direct checks of the documented operations.
AI assistance