Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit80bdb48

Browse files
committed
Revert r52798, r52803, r52824, r54342, as they don't fix
security issues.
1 parentc350602 commit80bdb48

File tree

5 files changed

+8
-31
lines changed

5 files changed

+8
-31
lines changed

‎Lib/email/Charset.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Copyright (C) 2001-2007 Python Software Foundation
2-
# Author:email-sig@python.org
1+
# Copyright (C) 2001-2006 Python Software Foundation
2+
# Author:che@debian.org (Ben Gertzfield), barry@python.org (Barry Warsaw)
33

44
fromtypesimportUnicodeType
55
fromemail.Encodersimportencode_7or8bit
@@ -99,7 +99,7 @@ def _isunicode(s):
9999
# of stability and useability.
100100

101101
CODEC_MAP= {
102-
'gb2312':'eucgb2312_cn',
102+
'gb2132':'eucgb2312_cn',
103103
'big5':'big5_tw',
104104
'utf-8':'utf-8',
105105
# Hack: We don't want *any* conversion for stuff marked us-ascii, as all

‎Lib/email/__init__.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Copyright (C) 2001-2007 Python Software Foundation
2-
# Author:email-sig@python.org
1+
# Copyright (C) 2001-2006 Python Software Foundation
2+
# Author:barry@python.org (Barry Warsaw)
33

44
"""A package for parsing, handling, and generating email messages."""
55

6-
__version__='2.5.9'
6+
__version__='2.5.8'
77

88
__all__= [
99
'base64MIME',

‎Lib/fileinput.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,7 @@ def readline(self):
301301
self._file=open(self._backupfilename,"r")
302302
try:
303303
perm=os.fstat(self._file.fileno()).st_mode
304-
except (AttributeError,OSError):
305-
# AttributeError occurs in Jython, where there's no
306-
# os.fstat.
304+
exceptOSError:
307305
self._output=open(self._filename,"w")
308306
else:
309307
fd=os.open(self._filename,

‎Lib/test/test_sha.py‎

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,9 @@
1111

1212
classSHATestCase(unittest.TestCase):
1313
defcheck(self,data,digest):
14-
# Check digest matches the expected value
15-
obj=sha.new(data)
16-
computed=obj.hexdigest()
14+
computed=sha.new(data).hexdigest()
1715
self.assert_(computed==digest)
1816

19-
# Verify that the value doesn't change between two consecutive
20-
# digest operations.
21-
computed_again=obj.hexdigest()
22-
self.assert_(computed==computed_again)
23-
24-
# Check hexdigest() output matches digest()'s output
25-
digest=obj.digest()
26-
hexd=""
27-
forcindigest:
28-
hexd+='%02x'%ord(c)
29-
self.assert_(computed==hexd)
30-
3117
deftest_case_1(self):
3218
self.check("abc",
3319
"a9993e364706816aba3e25717850c26c9cd0d89d")
@@ -40,9 +26,6 @@ def test_case_3(self):
4026
self.check("a"*1000000,
4127
"34aa973cd4c4daa4f61eeb2bdbad27316534016f")
4228

43-
deftest_case_4(self):
44-
self.check(chr(0xAA)*80,
45-
'4ca0ef38f1794b28a8f8ee110ee79d48ce13be25')
4629

4730
deftest_main():
4831
test_support.run_unittest(SHATestCase)

‎Lib/uu.py‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ def decode(in_file, out_file=None, mode=None, quiet=0):
115115
#
116116
# Open the output file
117117
#
118-
opened=False
119118
ifout_file=='-':
120119
out_file=sys.stdout
121120
elifisinstance(out_file,StringType):
@@ -125,7 +124,6 @@ def decode(in_file, out_file=None, mode=None, quiet=0):
125124
exceptAttributeError:
126125
pass
127126
out_file=fp
128-
opened=True
129127
#
130128
# Main decoding loop
131129
#
@@ -143,8 +141,6 @@ def decode(in_file, out_file=None, mode=None, quiet=0):
143141
s=in_file.readline()
144142
ifnots:
145143
raiseError,'Truncated input file'
146-
ifopened:
147-
out_file.close()
148144

149145
deftest():
150146
"""uuencode/uudecode main program"""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp