python / python/cpython

imaplib fails to connect to IMAP4REV2 server

Open
#122,953 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

topic-email type-feature
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

imaplib fails to connect to IMAP4REV2 server

by changing here

https://github.com/python/cpython/blob/1795d6cebaee07f30804d490fa90e3e516dfed79/Lib/imaplib.py#L44

to the following

AllowedVersions = ('IMAP4REV2','IMAP4REV1', 'IMAP4') # Most recent first

the test cases are able to run against an imap server advertising rev2

remark:
using this together with unittest

Linked PRs
  • gh-150282

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at Lib/imaplib.py line 44 and review the AllowedVersions setting. Run the existing test cases against an IMAP server advertising IMAP4REV2; done means imaplib connects successfully and those tests pass, while noting that linked PR gh-150282 indicates work is already underway.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.