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-131885: Document `/` for `codecs` functions by donbarbos · Pull Request #131992 · python/cpython

Conversation

@donbarbos

@donbarbos donbarbos commented Apr 1, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

1. I found that CodecInfo class signature contains an undocumented (non-public) _is_text_encoding argument:

cpython/Lib/codecs.py

Lines 94 to 96 in c2ac662

def __new__(cls, encode, decode, streamreader=None, streamwriter=None,
incrementalencoder=None, incrementaldecoder=None, name=None,
*, _is_text_encoding=None):

Signature, inspect.signature(codecs.CodecInfo):

<Signature (encode, decode, streamreader=None, streamwriter=None, incrementalencoder=None, incrementaldecoder=None, name=None, *, _is_text_encoding=None)>

I don't think this should be documented, but I thought I'd point it out just in case.


2. I'm not a fan of using / and I also want to point out that it doesn't seem natural for codecs functions to use positional-only arguments, since they are only used in the functions that I updated. I would suggest getting rid of / in the code instead of documenting it.


📚 Documentation preview 📚: https://cpython-previews--131992.org.readthedocs.build/

  • Issue: Update function signatures to use * and / as needed #131885

Sorry, something went wrong.

Uh oh!

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

All reactions
@donbarbos
Document / for codecs functions
7a5979f
@bedevere-app bedevere-app Bot added awaiting review docs Documentation in the Doc dir skip news labels Apr 1, 2025
@github-project-automation github-project-automation Bot added this to Docs PRs Apr 1, 2025
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs Apr 1, 2025
@donbarbos donbarbos changed the title Document / for codecs functions gh-131885: Document / for codecs functions Apr 1, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Apr 1, 2025
Update function signatures to use * and / as needed #131885
Open
4 of 5 tasks
vstinner
vstinner approved these changes Apr 2, 2025
View reviewed changes

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

Sorry, something went wrong.

Uh oh!

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

donbarbos reacted with heart emoji
All reactions
  • ❤️ 1 reaction
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Apr 2, 2025
@python-cla-bot

python-cla-bot Bot commented Apr 6, 2025

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner
vstinner merged commit bd47ec9 into python:main Apr 14, 2025
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Apr 14, 2025
@bedevere-app bedevere-app Bot removed the awaiting merge label Apr 14, 2025
@vstinner

vstinner commented Apr 14, 2025

Copy link
Copy Markdown
Member

Merged, thank you.

donbarbos reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vstinner vstinner vstinner approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

docs Documentation in the Doc dir skip news

Projects

Docs PRs
Status: Done

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

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