GeezerVison is showing github.com — gh-111356: Add missing documented objects to io.__all__ by ntessore · Pull Request #111370 · python/cpython
Conversation
ntessore
commented
Oct 26, 2023
•
edited by bedevere-app
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
This change updates io.__all__ with three missing public and documented entries: text_encoding(), DEFAULT_BUFFER_SIZE, and IncrementalNewlineDecoder.
As suggested by @AlexWaygood, I have also updated the tests to check __all__ using test.support.check__all__(). As a matter of fact, there already was test__all__() in MiscIOTest, which ostensibly checked that all exported symbols existed. It seems like the test was also designed to check some properties of the exported objects; however, these existing checks failed for me.
I have removed the existing checks and replaced them with the suggest check__all__(). I am using a few new attributes to tailor the test to CMiscIOTest and PyMiscIOTest, respectively.
Since I don't understand why existing tests would fail, some extra attention might be warranted here. There is also another detail of possible interest: IncrementalNewlineDecoder was not added to io.__all__, but was added to all_members in the test setup. This could indicate an intentional omission (albeit 15 years ago).
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Would you add NEWS entry?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
LGTM. Would you add NEWS entry?
Apologies, I thought that would not be necessary. Done now.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks @ntessore for the PR, and @methane for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
methane
pushed a commit
that referenced
this pull request
Nov 10, 2023
Add DEFAULT_BUFFER_SIZE, text_encoding, and IncrementalNewlineDecoder.
(cherry picked from commit baeb771)
Co-authored-by: Nicolas Tessore <[email protected]>
methane
pushed a commit
that referenced
this pull request
Nov 10, 2023
Add DEFAULT_BUFFER_SIZE, text_encoding, and IncrementalNewlineDecoder.
(cherry picked from commit baeb771)
Co-authored-by: Nicolas Tessore <[email protected]>
aisk
pushed a commit
to aisk/cpython
that referenced
this pull request
Feb 11, 2024
…thon#111370)
Add DEFAULT_BUFFER_SIZE, text_encoding, and IncrementalNewlineDecoder.
Glyphack
pushed a commit
to Glyphack/cpython
that referenced
this pull request
Sep 2, 2024
…thon#111370)
Add DEFAULT_BUFFER_SIZE, text_encoding, and IncrementalNewlineDecoder.
Reviewers
methane
methane approved these changes
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
type-bug
An unexpected behavior, bug, or error
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|