FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-111356: Add missing documented objects to io.__all__ by ntessore · Pull Request #111370 · python/cpython · GitHub

/ cpython Public

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

Merged
methane merged 2 commits into
python:mainfrom
ntessore:gh-111356
Nov 10, 2023
Merged

gh-111356: Add missing documented objects to io.__all__#111370
methane merged 2 commits into
python:mainfrom
ntessore:gh-111356

Conversation

ntessore commented Oct 26, 2023
edited by bedevere-app Bot
Loading

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM. Would you add NEWS entry?

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

Copy link
Copy Markdown
Contributor Author

LGTM. Would you add NEWS entry?

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

methane merged commit baeb771 into python:main Nov 10, 2023

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 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 Bot removed the needs backport to 3.12 only security fixes label Nov 10, 2023

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

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL