Page MenuHomePhorge

[Python 3]rfc822 module has been removed

Authored by ghane on Mar 14 2022, 12:49 PM.
Referenced Files
Tue, May 21, 8:48 AM
Unknown Object (File)
Sun, May 19, 9:52 AM
Unknown Object (File)
Sun, May 19, 1:21 AM
Unknown Object (File)
Sat, May 18, 11:25 PM
Unknown Object (File)
Sat, May 18, 7:25 PM
Unknown Object (File)
Fri, May 17, 7:52 AM
Unknown Object (File)
Fri, May 17, 7:35 AM
Unknown Object (File)
Fri, May 17, 7:28 AM



python 2.7 -3 ./ -d 9 lm

DeprecationWarning: in 3.x, rfc822 has been removed in favor of the email package

Diff Detail

rP pykolab
Lint Not Applicable
Tests Not Applicable

Event Timeline

ghane created this revision.
sicherha subscribed.

The only rfc822 function used below is rfc822.parsedate(); according to, its email counterpart is not not email.parsedate() but email.utils.parsedate().

Since the email.utils module is already available in Python 2.7, I suggest the following:

  • In line 22, change import rfc822 to import email.utils
  • In line 199, change the call to rfc822.parsedate() to email.utils.parsedate()
This revision now requires changes to proceed.Mar 15 2022, 12:10 AM

I'll just change line 22

import email.utils as rfc822

this keeps the history and intention of the code alive.

This revision is now accepted and ready to land.Mar 16 2022, 10:22 PM
This revision was automatically updated to reflect the committed changes.