mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-139434: Update selected RFC 2822 references to RFC 5322 (#139435)
Update selected RFC 2822 references to RFC 5322 RFC 2822 was obsoleted by RFC 5322 in 2008. This updates references to use the current standard in documentation, docstrings, and comments. It preserves RFC 2822 references in legacy API components to maintain their historical context. RFC 822 → RFC 2822 → RFC 5322 progression is explained where relevant. In some places specific sections of RFC are referenced where it seems helpful. Scout rule was applied in some places and RFC mentions format was normalized in doc strings and comments.
This commit is contained in:
parent
97d8dda980
commit
ce1bb85d28
15 changed files with 49 additions and 45 deletions
|
|
@ -32,7 +32,7 @@
|
|||
NLCRE_bol = re.compile(r'(\r\n|\r|\n)')
|
||||
NLCRE_eol = re.compile(r'(\r\n|\r|\n)\z')
|
||||
NLCRE_crack = re.compile(r'(\r\n|\r|\n)')
|
||||
# RFC 2822 $3.6.8 Optional fields. ftext is %d33-57 / %d59-126, Any character
|
||||
# RFC 5322 section 3.6.8 Optional fields. ftext is %d33-57 / %d59-126, Any character
|
||||
# except controls, SP, and ":".
|
||||
headerRE = re.compile(r'^(From |[\041-\071\073-\176]*:|[\t ])')
|
||||
EMPTYSTRING = ''
|
||||
|
|
@ -294,7 +294,7 @@ def _parsegen(self):
|
|||
return
|
||||
if self._cur.get_content_maintype() == 'message':
|
||||
# The message claims to be a message/* type, then what follows is
|
||||
# another RFC 2822 message.
|
||||
# another RFC 5322 message.
|
||||
for retval in self._parsegen():
|
||||
if retval is NeedMoreData:
|
||||
yield NeedMoreData
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue