Skip to content

gh-78319: add UTF8 marker per RFC #9436

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

gordonmessmer
Copy link
Contributor

@gordonmessmer gordonmessmer commented Sep 20, 2018

This change implements RFC 6855 UTF8 APPEND per guidance from Sam Varshavchik:
https://bugs.python.org/issue34138

https://bugs.python.org/issue34138

@gordonmessmer gordonmessmer requested a review from a team as a code owner September 20, 2018 03:30
@the-knights-who-say-ni

This comment was marked as resolved.

@gordonmessmer

This comment was marked as resolved.

@bedevere-bot

This comment was marked as resolved.

@arhadthedev arhadthedev changed the title bpo-34138: add UTF8 marker per RFC gh-78319: add UTF8 marker per RFC Feb 9, 2023
@arhadthedev arhadthedev added stdlib Python modules in the Lib dir topic-email labels Feb 9, 2023
@arhadthedev
Copy link
Member

@gordonmessmer tests are failing (see Details links under Some checks were not successful section). Would you mind to continue working on the PR, please?

@bedevere-bot
Copy link

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@gordonmessmer gordonmessmer force-pushed the master branch 3 times, most recently from 36fd655 to 41c490e Compare February 14, 2023 05:13
@gordonmessmer
Copy link
Contributor Author

I'll look at it again, yes. I'm getting odd results from updated tests, so some additional work is still needed...

@gordonmessmer gordonmessmer force-pushed the master branch 2 times, most recently from c116b76 to 633ad44 Compare February 14, 2023 06:23
@gordonmessmer
Copy link
Contributor Author

Tests look like they're passing, but trying this on a live IMAP server fails, because the server actually receives:

LLFC3 APPEND INBOX UTF8 (~{63}\r\n

... when Sam suggested that it should receive:

LLFC3 APPEND INBOX NIL NIL UTF8 (~{63}\r\n

But that's probably a larger bug in the imaplib module, and not directly related to this change.

@arhadthedev
Copy link
Member

@warsaw, @maxking (as active e-mail experts)

@gordonmessmer
Copy link
Contributor Author

I've asked Sam to chime in. The RFC calls those arguments optional. Based on its behavior, it seems that Courier expects them to be specified as NIL when they are not provided, rather than left out entirely.

@gordonmessmer
Copy link
Contributor Author

gordonmessmer commented Feb 14, 2023

I added a commit for consideration. Transforming None to "NIL" is RFC-compliant (which is consistent with the intent of this PR). Tests pass, and this works with Courier IMAP.

@arhadthedev arhadthedev requested review from warsaw and removed request for a team February 14, 2023 08:10
@arhadthedev arhadthedev requested a review from maxking February 14, 2023 08:10
@gordonmessmer gordonmessmer force-pushed the master branch 2 times, most recently from 7af0319 to 6726e07 Compare February 15, 2023 03:46
@gordonmessmer
Copy link
Contributor Author

The NIL requirement may be a bug in Courier (ironically also caused by UTF8 support), so the "imaplib: transform None into "NIL"" patch might not be needed.

Everything else looks good, I think.

@gordonmessmer
Copy link
Contributor Author

Sam released a new version of Courier, and I've verified that the None->NIL transformation is no longer necessary, so I've backed it out.

@gordonmessmer
Copy link
Contributor Author

Please let me know if there's anything I can do to help move this forward.

@svarshavchik svarshavchik mannequin mentioned this pull request Apr 10, 2022
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Dec 15, 2024
@gordonmessmer
Copy link
Contributor Author

Please let me know if there's anything I can do to help move this forward.

@github-actions github-actions bot removed the stale Stale PR or inactive for long period of time. label Feb 27, 2025
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Apr 13, 2025
@python-cla-bot
Copy link

python-cla-bot bot commented Apr 18, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review stale Stale PR or inactive for long period of time. stdlib Python modules in the Lib dir topic-email
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants