GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-111356: Add missing documented objects to io.__all__ by ntessore · Pull Request #111370 · python/cpython

Conversation

@ntessore

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

Uh oh!

There was an error while loading. Please reload this page.

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

  • Issue: text_encoding() is missing from io.__all__ #111356

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot mentioned this pull request Oct 26, 2023
text_encoding() is missing from io.__all__ #111356
Closed
@bedevere-app bedevere-app Bot added the awaiting review label Oct 26, 2023
@ntessore
export all documented objects in io.__all__
d0b002f
methane
methane approved these changes Oct 30, 2023
View reviewed changes

@methane methane left a comment

Copy link
Copy Markdown
Member

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.

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Oct 30, 2023
@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
@blurb-it
📜🤖 Added by blurb_it.
ab2ef7d
@ntessore

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@methane
methane merged commit baeb771 into python:main Nov 10, 2023
@bedevere-app bedevere-app Bot removed the awaiting merge label Nov 10, 2023
@miss-islington-app

miss-islington-app Bot commented 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.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 10, 2023
@ntessore @miss-islington
pythongh-111356: io: Add missing documented objects to io.__all__ (py…
1a19825
…thonGH-111370)

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

Co-authored-by: Nicolas Tessore <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 10, 2023
@ntessore @miss-islington
pythongh-111356: io: Add missing documented objects to io.__all__ (py…
27e953f
…thonGH-111370)

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

Co-authored-by: Nicolas Tessore <[email protected]>
@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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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
@miss-islington @ntessore
gh-111356: io: Add missing documented objects to io.__all__ (GH-111370)
0e45786
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
@miss-islington @ntessore
gh-111356: io: Add missing documented objects to io.__all__ (GH-111370)
95141aa
Add DEFAULT_BUFFER_SIZE, text_encoding, and IncrementalNewlineDecoder.
(cherry picked from commit baeb771)

Co-authored-by: Nicolas Tessore <[email protected]>
@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
@ntessore @aisk
pythongh-111356: io: Add missing documented objects to io.__all__ (py…
ac51ff2
…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
@ntessore @Glyphack
pythongh-111356: io: Add missing documented objects to io.__all__ (py…
e734d54
…thon#111370)

Add DEFAULT_BUFFER_SIZE, text_encoding, and IncrementalNewlineDecoder.
@encukou encukou mentioned this pull request Nov 11, 2024
[3.11] gh-87846: test_io: Ignore OpenWrapper in test___all__ #126478
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@methane 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

Projects

None yet

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.

2 participants

@ntessore @methane
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.