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 — Document IMAP4.append() message type and optional arguments · Issue #149962 · python/cpython

Document IMAP4.append() message type and optional arguments #149962

New issue
Copy link
New issue
Copy link
Open
#149964
Open
Document IMAP4.append() message type and optional arguments#149962
#149964
Copy link
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dirtopic-email

Description

@savagemechanic
savagemechanic
opened on May 17, 2026
Issue body actions

The IMAP4.append() documentation currently says only:

Append message to named mailbox.

It now documents the flags argument, but the remaining argument behavior is still easier to discover from Lib/imaplib.py than from the library docs.

In the implementation:

  • mailbox is treated as optional in practice: a false value is replaced with 'INBOX'.
  • flags and date_time may be None, in which case they are omitted from the command.
  • message is not optional. It is passed to MapCRLF.sub(CRLF, message), where MapCRLF is a bytes regular expression, so message must be a bytes-like object. Passing a str raises TypeError before the command is sent.

The method docstring already hints at this by saying "All args except 'message' can be None", but that detail is not in Doc/library/imaplib.rst.

This is related to the broader documentation issue in #68215, but this issue is intentionally narrower: clarify the public documentation for IMAP4.append() only.

Suggested documentation scope:

  • State that message must be a bytes-like object.
  • State which arguments may be None.
  • Clarify that mailbox=None (or another false value) uses INBOX.
  • Clarify that date_time=None omits the internal date argument.

This should stay separate from the existing CR/LF-normalization behavior tracked in #49680.

Linked PRs

  • gh-149962: Clarify IMAP4.append() argument handling #149964

Activity

  1. gvanrossum commented on May 17, 2026

    @gvanrossum
    gvanrossum
    on May 17, 2026
    Member
    More actions

    AFAIK it is okay to submit doc PRs without an Issue now.

  2. savagemechanic commented on May 17, 2026

    @savagemechanic
    savagemechanic
    on May 17, 2026
    ContributorAuthor
    More actions

    AFAIK it is okay to submit doc PRs without an Issue now.

    Understood 👊 Thanks Guido

  3. aisk
    added
    docsDocumentation in the Doc dirDocumentation in the Doc dir
    topic-email
    on May 18, 2026
  4. github-project-automation
    added this to docs issueson May 18, 2026
  5. github-project-automation
    moved this to Todo in docs issueson May 18, 2026
  6. picnixz commented on May 19, 2026

    @picnixz
    picnixz
    on May 19, 2026
    Member
    More actions

    While it is ok not to create issues most of the time, it is also good for tracking discussions if any (like, if the docs are changed or reorganized, having an issue is good; if it is only for improving, amending slightly, or fixing inconsistencies or incompleteness, no issue is needed).

    (In this case, there was no need for an issue but since one was created, we can keep it)

  7. savagemechanic commented on May 20, 2026

    @savagemechanic
    savagemechanic
    on May 20, 2026
    ContributorAuthor
    More actions

    Thank you for taking your time to break that down for me :-)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dirDocumentation in the Doc dirtopic-email

    Projects

    • docs issues
      Status
      Todo
      Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402520 — 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.