Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

gh-111356: Add missing documented objects to io.__all__#111370

Merged
methane merged 2 commits into
python:mainpython/cpython:mainfrom
ntessore:gh-111356Copy head branch name to clipboard
Nov 10, 2023
Merged

gh-111356: Add missing documented objects to io.__all__#111370
methane merged 2 commits into
python:mainpython/cpython:mainfrom
ntessore:gh-111356Copy head branch name to clipboard

Conversation

@ntessore

@ntessore ntessore commented Oct 26, 2023

Copy link
Copy Markdown
Contributor

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).

@methane methane left a comment

Copy link
Copy Markdown
Member

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?

@methane methane added type-bug An unexpected behavior, bug, or error needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Oct 30, 2023
@ntessore

Copy link
Copy Markdown
Contributor Author

LGTM. Would you add NEWS entry?

Apologies, I thought that would not be necessary. Done now.

@methane methane merged commit baeb771 into python:main Nov 10, 2023
@miss-islington-app

Copy link
Copy Markdown

Thanks @ntessore for the PR, and @methane for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 10, 2023
…thonGH-111370)

Add DEFAULT_BUFFER_SIZE, text_encoding, and IncrementalNewlineDecoder.
(cherry picked from commit baeb771)

Co-authored-by: Nicolas Tessore <n.tessore@ucl.ac.uk>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 10, 2023
…thonGH-111370)

Add DEFAULT_BUFFER_SIZE, text_encoding, and IncrementalNewlineDecoder.
(cherry picked from commit baeb771)

Co-authored-by: Nicolas Tessore <n.tessore@ucl.ac.uk>
@bedevere-app

bedevere-app Bot commented Nov 10, 2023

Copy link
Copy Markdown

GH-111935 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.12 only security fixes label Nov 10, 2023
@bedevere-app

bedevere-app Bot commented Nov 10, 2023

Copy link
Copy Markdown

GH-111936 is a backport of this pull request to the 3.11 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.11 only security fixes label Nov 10, 2023
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 <n.tessore@ucl.ac.uk>
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 <n.tessore@ucl.ac.uk>
@ntessore ntessore deleted the gh-111356 branch November 10, 2023 10:26
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.