Skip to content

gh-148770: Document quoting requirement for IMAP mailbox names with spaces#148785

Open
CodeLine9 wants to merge 2 commits into
python:mainfrom
CodeLine9:clawoss/docs/148770-imaplib-select-quoting
Open

gh-148770: Document quoting requirement for IMAP mailbox names with spaces#148785
CodeLine9 wants to merge 2 commits into
python:mainfrom
CodeLine9:clawoss/docs/148770-imaplib-select-quoting

Conversation

@CodeLine9
Copy link
Copy Markdown

@CodeLine9 CodeLine9 commented Apr 19, 2026

The IMAP4.select() docs don't mention that mailbox names containing spaces must be quoted by the caller. Since _command() sends arguments as-is (no auto-quoting), a call like M.select('my important mail') sends the space-delimited name to the server, causing errors.

Added a note to the select() method documentation showing the correct usage: M.select('"my important mail"').

Fixes #148770.


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

…with spaces

Add a note to IMAP4.select() documenting that mailbox names containing
spaces must be quoted by the caller, e.g. M.select('"my important mail"').
@CodeLine9 CodeLine9 requested a review from a team as a code owner April 19, 2026 23:24
@python-cla-bot
Copy link
Copy Markdown

python-cla-bot Bot commented Apr 19, 2026

All commit authors signed the Contributor License Agreement.

CLA signed

@read-the-docs-community
Copy link
Copy Markdown

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

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

IMAPlib Lib/imaplib.py folders with spaces in their names

1 participant