Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
9f0f960d
Commit
9f0f960d
authored
Jun 12, 2008
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove traces of rfc822.
parent
a0c0a4a2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
11 deletions
+12
-11
Lib/http/server.py
Lib/http/server.py
+1
-1
Lib/smtplib.py
Lib/smtplib.py
+1
-1
Lib/test/test_pyclbr.py
Lib/test/test_pyclbr.py
+1
-0
Tools/faqwiz/faqwiz.py
Tools/faqwiz/faqwiz.py
+2
-2
Tools/scripts/mailerdaemon.py
Tools/scripts/mailerdaemon.py
+5
-5
Tools/versioncheck/pyversioncheck.py
Tools/versioncheck/pyversioncheck.py
+2
-2
No files found.
Lib/http/server.py
View file @
9f0f960d
...
...
@@ -315,7 +315,7 @@ class BaseHTTPRequestHandler(socketserver.StreamRequestHandler):
# Examine the headers and look for a Connection directive.
# MessageClass
(rfc822)
wants to see strings rather than bytes.
# MessageClass wants to see strings rather than bytes.
# But a TextIOWrapper around self.rfile would buffer too many bytes
# from the stream, bytes which we later need to read as bytes.
# So we read the correct bytes here, as bytes, then use StringIO
...
...
Lib/smtplib.py
View file @
9f0f960d
...
...
@@ -131,7 +131,7 @@ class SMTPAuthenticationError(SMTPResponseException):
def
quoteaddr
(
addr
):
"""Quote a subset of the email addresses defined by RFC 821.
Should be able to handle anything
rfc822
.parseaddr can handle.
Should be able to handle anything
email.utils
.parseaddr can handle.
"""
m
=
(
None
,
None
)
try
:
...
...
Lib/test/test_pyclbr.py
View file @
9f0f960d
...
...
@@ -140,6 +140,7 @@ class PyclbrTest(TestCase):
def
test_easy
(
self
):
self
.
checkModule
(
'pyclbr'
)
self
.
checkModule
(
'ast'
)
self
.
checkModule
(
'doctest'
,
ignore
=
(
"TestResults"
,
"_SpoofOut"
))
self
.
checkModule
(
'difflib'
,
ignore
=
(
"Match"
,))
...
...
Tools/faqwiz/faqwiz.py
View file @
9f0f960d
...
...
@@ -207,8 +207,8 @@ class FaqEntry:
self.file = file
self.sec, self.num = sec_num
if fp:
import
rfc822
self.__headers =
rfc822.Messag
e(fp)
import
email
self.__headers =
email.message_from_fil
e(fp)
self.body = fp.read().strip()
else:
self.__headers = {'
title
': "%d.%d. " % sec_num}
...
...
Tools/scripts/mailerdaemon.py
View file @
9f0f960d
"""mailerdaemon - classes to parse mailer-daemon messages"""
import
rfc822
import
calendar
import
email.message
import
re
import
os
import
sys
Unparseable
=
'mailerdaemon.Unparseable'
class
ErrorMessage
(
rfc822
.
Message
):
def
__init__
(
self
,
fp
):
rfc822
.
Message
.
__init__
(
self
,
fp
)
class
ErrorMessage
(
email
.
message
.
Message
):
def
__init__
(
self
):
email
.
message
.
Message
.
__init__
(
self
)
self
.
sub
=
''
def
is_warning
(
self
):
...
...
@@ -169,7 +169,7 @@ def parsedir(dir, modify):
for
fn
in
files
:
# Lets try to parse the file.
fp
=
open
(
fn
)
m
=
ErrorMessage
(
fp
)
m
=
email
.
message_from_file
(
fp
,
_class
=
ErrorMessage
)
sender
=
m
.
getaddr
(
'From'
)
print
(
'%s
\
t
%-40s
\
t
'
%
(
fn
,
sender
[
1
]),
end
=
' '
)
...
...
Tools/versioncheck/pyversioncheck.py
View file @
9f0f960d
"""pyversioncheck - Module to help with checking versions"""
import
rfc822
import
urllib
import
email
import
sys
# Verbose options
...
...
@@ -52,7 +52,7 @@ def _check1version(package, url, version, verbose=0):
if
verbose
>=
VERBOSE_EACHFILE
:
print
(
' Cannot open:'
,
arg
)
return
-
1
,
None
,
None
msg
=
rfc822
.
Message
(
fp
,
seekable
=
0
)
msg
=
email
.
message_from_file
(
fp
)
newversion
=
msg
.
get
(
'current-version'
)
if
not
newversion
:
if
verbose
>=
VERBOSE_EACHFILE
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment