[Python-checkins] r54954 - in python/branches/release25-maint/Lib: CGIHTTPServer.py distutils/unixccompiler.py ftplib.py lib-tk/tkSimpleDialog.py subprocess.py test/test_codecs.py test/test_curses.py test/test_descr.py test/test_import.py test/test_mailbox.py test/test_old_mailbox.py test/test_re.py test/test_sax.py test/test_set.py test/test_syntax.py
neal.norwitz
python-checkins at python.org
Wed Apr 25 08:42:55 CEST 2007
Author: neal.norwitz
Date: Wed Apr 25 08:42:41 2007
New Revision: 54954
Modified:
python/branches/release25-maint/Lib/CGIHTTPServer.py
python/branches/release25-maint/Lib/distutils/unixccompiler.py
python/branches/release25-maint/Lib/ftplib.py
python/branches/release25-maint/Lib/lib-tk/tkSimpleDialog.py
python/branches/release25-maint/Lib/subprocess.py
python/branches/release25-maint/Lib/test/test_codecs.py
python/branches/release25-maint/Lib/test/test_curses.py
python/branches/release25-maint/Lib/test/test_descr.py
python/branches/release25-maint/Lib/test/test_import.py
python/branches/release25-maint/Lib/test/test_mailbox.py
python/branches/release25-maint/Lib/test/test_old_mailbox.py
python/branches/release25-maint/Lib/test/test_re.py
python/branches/release25-maint/Lib/test/test_sax.py
python/branches/release25-maint/Lib/test/test_set.py
python/branches/release25-maint/Lib/test/test_syntax.py
Log:
Whitespace normalization
Modified: python/branches/release25-maint/Lib/CGIHTTPServer.py
==============================================================================
--- python/branches/release25-maint/Lib/CGIHTTPServer.py (original)
+++ python/branches/release25-maint/Lib/CGIHTTPServer.py Wed Apr 25 08:42:41 2007
@@ -107,7 +107,7 @@
"""Execute a CGI script."""
path = self.path
dir, rest = self.cgi_info
-
+
i = path.find('/', len(dir) + 1)
while i >= 0:
nextdir = path[:i]
Modified: python/branches/release25-maint/Lib/distutils/unixccompiler.py
==============================================================================
--- python/branches/release25-maint/Lib/distutils/unixccompiler.py (original)
+++ python/branches/release25-maint/Lib/distutils/unixccompiler.py Wed Apr 25 08:42:41 2007
@@ -82,7 +82,7 @@
except ValueError:
pass
- # Check if the SDK that is used during compilation actually exists,
+ # Check if the SDK that is used during compilation actually exists,
# the universal build requires the usage of a universal SDK and not all
# users have that installed by default.
sysroot = None
Modified: python/branches/release25-maint/Lib/ftplib.py
==============================================================================
--- python/branches/release25-maint/Lib/ftplib.py (original)
+++ python/branches/release25-maint/Lib/ftplib.py Wed Apr 25 08:42:41 2007
@@ -332,7 +332,7 @@
# 1xx or error messages for LIST), so we just discard
# this response.
if resp[0] == '2':
- resp = self.getresp()
+ resp = self.getresp()
if resp[0] != '1':
raise error_reply, resp
else:
@@ -342,7 +342,7 @@
resp = self.sendcmd(cmd)
# See above.
if resp[0] == '2':
- resp = self.getresp()
+ resp = self.getresp()
if resp[0] != '1':
raise error_reply, resp
conn, sockaddr = sock.accept()
Modified: python/branches/release25-maint/Lib/lib-tk/tkSimpleDialog.py
==============================================================================
--- python/branches/release25-maint/Lib/lib-tk/tkSimpleDialog.py (original)
+++ python/branches/release25-maint/Lib/lib-tk/tkSimpleDialog.py Wed Apr 25 08:42:41 2007
@@ -50,9 +50,9 @@
# If the master is not viewable, don't
# make the child transient, or else it
# would be opened withdrawn
- if parent.winfo_viewable():
+ if parent.winfo_viewable():
self.transient(parent)
-
+
if title:
self.title(title)
Modified: python/branches/release25-maint/Lib/subprocess.py
==============================================================================
--- python/branches/release25-maint/Lib/subprocess.py (original)
+++ python/branches/release25-maint/Lib/subprocess.py Wed Apr 25 08:42:41 2007
@@ -596,7 +596,7 @@
# either have to redirect all three or none. If the subprocess
# user has only redirected one or two handles, we are
# automatically creating PIPEs for the rest. We should close
- # these after the process is started. See bug #1124861.
+ # these after the process is started. See bug #1124861.
if mswindows:
if stdin is None and p2cwrite is not None:
os.close(p2cwrite)
@@ -1142,7 +1142,7 @@
# we can write up to PIPE_BUF bytes without risk
# blocking. POSIX defines PIPE_BUF >= 512
bytes_written = os.write(self.stdin.fileno(), buffer(input, input_offset, 512))
- input_offset += bytes_written
+ input_offset += bytes_written
if input_offset >= len(input):
self.stdin.close()
write_set.remove(self.stdin)
Modified: python/branches/release25-maint/Lib/test/test_codecs.py
==============================================================================
--- python/branches/release25-maint/Lib/test/test_codecs.py (original)
+++ python/branches/release25-maint/Lib/test/test_codecs.py Wed Apr 25 08:42:41 2007
@@ -921,7 +921,7 @@
self.assertEquals(f.readlines(), [u'\ud55c\n', u'\uae00'])
class EncodedFileTest(unittest.TestCase):
-
+
def test_basic(self):
f = StringIO.StringIO('\xed\x95\x9c\n\xea\xb8\x80')
ef = codecs.EncodedFile(f, 'utf-16-le', 'utf-8')
Modified: python/branches/release25-maint/Lib/test/test_curses.py
==============================================================================
--- python/branches/release25-maint/Lib/test/test_curses.py (original)
+++ python/branches/release25-maint/Lib/test/test_curses.py Wed Apr 25 08:42:41 2007
@@ -245,7 +245,7 @@
if hasattr(curses, 'resizeterm'):
lines, cols = curses.LINES, curses.COLS
curses.resizeterm(lines - 1, cols + 1)
-
+
if curses.LINES != lines - 1 or curses.COLS != cols + 1:
raise RuntimeError, "Expected resizeterm to update LINES and COLS"
Modified: python/branches/release25-maint/Lib/test/test_descr.py
==============================================================================
--- python/branches/release25-maint/Lib/test/test_descr.py (original)
+++ python/branches/release25-maint/Lib/test/test_descr.py Wed Apr 25 08:42:41 2007
@@ -1216,7 +1216,7 @@
except NameError:
pass
else:
- # _unicode_to_string used to modify slots in certain circumstances
+ # _unicode_to_string used to modify slots in certain circumstances
slots = (unicode("foo"), unicode("bar"))
class C(object):
__slots__ = slots
@@ -1231,7 +1231,7 @@
except (TypeError, UnicodeEncodeError):
pass
else:
- raise TestFailed, "[unichr(128)] slots not caught"
+ raise TestFailed, "[unichr(128)] slots not caught"
# Test leaks
class Counted(object):
Modified: python/branches/release25-maint/Lib/test/test_import.py
==============================================================================
--- python/branches/release25-maint/Lib/test/test_import.py (original)
+++ python/branches/release25-maint/Lib/test/test_import.py Wed Apr 25 08:42:41 2007
@@ -224,13 +224,13 @@
test_import_initless_directory_warning()
def test_infinite_reload():
- # Bug #742342 reports that Python segfaults (infinite recursion in C)
- # when faced with self-recursive reload()ing.
+ # Bug #742342 reports that Python segfaults (infinite recursion in C)
+ # when faced with self-recursive reload()ing.
- sys.path.insert(0, os.path.dirname(__file__))
- try:
- import infinite_reload
- finally:
- sys.path.pop(0)
+ sys.path.insert(0, os.path.dirname(__file__))
+ try:
+ import infinite_reload
+ finally:
+ sys.path.pop(0)
test_infinite_reload()
Modified: python/branches/release25-maint/Lib/test/test_mailbox.py
==============================================================================
--- python/branches/release25-maint/Lib/test/test_mailbox.py (original)
+++ python/branches/release25-maint/Lib/test/test_mailbox.py Wed Apr 25 08:42:41 2007
@@ -681,11 +681,11 @@
box = self._factory(self._path, factory=dummy_factory)
folder = box.add_folder('folder1')
self.assert_(folder._factory is dummy_factory)
-
+
folder1_alias = box.get_folder('folder1')
self.assert_(folder1_alias._factory is dummy_factory)
-
+
class _TestMboxMMDF(TestMailbox):
@@ -767,15 +767,15 @@
key1 = self._box.add(msg)
self._box.flush()
self._box.close()
-
+
self._box = self._factory(self._path)
self._box.lock()
key2 = self._box.add(msg)
self._box.flush()
self.assert_(self._box._locked)
self._box.close()
-
-
+
+
class TestMbox(_TestMboxMMDF):
@@ -805,7 +805,7 @@
def dummy_factory (s):
return None
self._box = self._factory(self._path, dummy_factory)
-
+
new_folder = self._box.add_folder('foo.bar')
folder0 = self._box.get_folder('foo.bar')
folder0.add(self._template % 'bar')
@@ -901,7 +901,7 @@
self.assert_(self._box.get_sequences() ==
{'foo':[1, 2, 3, 4, 5],
'unseen':[1], 'bar':[3], 'replied':[3]})
-
+
def _get_lock_path(self):
return os.path.join(self._path, '.mh_sequences.lock')
Modified: python/branches/release25-maint/Lib/test/test_old_mailbox.py
==============================================================================
--- python/branches/release25-maint/Lib/test/test_old_mailbox.py (original)
+++ python/branches/release25-maint/Lib/test/test_old_mailbox.py Wed Apr 25 08:42:41 2007
@@ -116,7 +116,7 @@
def tearDown(self):
os.unlink(self._path)
-
+
def test_from_regex (self):
# Testing new regex from bug #1633678
f = open(self._path, 'w')
Modified: python/branches/release25-maint/Lib/test/test_re.py
==============================================================================
--- python/branches/release25-maint/Lib/test/test_re.py (original)
+++ python/branches/release25-maint/Lib/test/test_re.py Wed Apr 25 08:42:41 2007
@@ -610,7 +610,7 @@
for typecode in 'cbBuhHiIlLfd':
a = array.array(typecode)
self.assertEqual(re.compile("bla").match(a), None)
- self.assertEqual(re.compile("").match(a).groups(), ())
+ self.assertEqual(re.compile("").match(a).groups(), ())
def run_re_tests():
from test.re_tests import benchmarks, tests, SUCCEED, FAIL, SYNTAX_ERROR
Modified: python/branches/release25-maint/Lib/test/test_sax.py
==============================================================================
--- python/branches/release25-maint/Lib/test/test_sax.py (original)
+++ python/branches/release25-maint/Lib/test/test_sax.py Wed Apr 25 08:42:41 2007
@@ -252,7 +252,7 @@
gen.endDocument()
return result.getvalue() == start+'<my:a xmlns:my="qux" b="c"></my:a>'
-
+
# ===== Xmlfilterbase
def test_filter_basic():
Modified: python/branches/release25-maint/Lib/test/test_set.py
==============================================================================
--- python/branches/release25-maint/Lib/test/test_set.py (original)
+++ python/branches/release25-maint/Lib/test/test_set.py Wed Apr 25 08:42:41 2007
@@ -288,7 +288,7 @@
self.assertEqual(sum(elem.hash_count for elem in d), n)
if hasattr(s, 'symmetric_difference_update'):
s.symmetric_difference_update(d)
- self.assertEqual(sum(elem.hash_count for elem in d), n)
+ self.assertEqual(sum(elem.hash_count for elem in d), n)
d2 = dict.fromkeys(set(d))
self.assertEqual(sum(elem.hash_count for elem in d), n)
d3 = dict.fromkeys(frozenset(d))
@@ -500,7 +500,7 @@
set.__init__(self, iterable)
class TestSetSubclassWithKeywordArgs(TestSet):
-
+
def test_keywords_in_subclass(self):
'SF bug #1486663 -- this used to erroneously raise a TypeError'
SetSubclassWithKeywordArgs(newarg=1)
@@ -1487,7 +1487,7 @@
test_classes = (
TestSet,
TestSetSubclass,
- TestSetSubclassWithKeywordArgs,
+ TestSetSubclassWithKeywordArgs,
TestFrozenSet,
TestFrozenSetSubclass,
TestSetOfSets,
Modified: python/branches/release25-maint/Lib/test/test_syntax.py
==============================================================================
--- python/branches/release25-maint/Lib/test/test_syntax.py (original)
+++ python/branches/release25-maint/Lib/test/test_syntax.py Wed Apr 25 08:42:41 2007
@@ -373,7 +373,7 @@
... elif 1:
... pass
Traceback (most recent call last):
- ...
+ ...
SyntaxError: can't assign to function call (<doctest test.test_syntax[44]>, line 2)
>>> if 1:
@@ -381,7 +381,7 @@
... elif 1:
... x() = 1
Traceback (most recent call last):
- ...
+ ...
SyntaxError: can't assign to function call (<doctest test.test_syntax[45]>, line 4)
>>> if 1:
@@ -391,7 +391,7 @@
... else:
... pass
Traceback (most recent call last):
- ...
+ ...
SyntaxError: can't assign to function call (<doctest test.test_syntax[46]>, line 2)
>>> if 1:
@@ -401,7 +401,7 @@
... else:
... pass
Traceback (most recent call last):
- ...
+ ...
SyntaxError: can't assign to function call (<doctest test.test_syntax[47]>, line 4)
>>> if 1:
@@ -411,7 +411,7 @@
... else:
... x() = 1
Traceback (most recent call last):
- ...
+ ...
SyntaxError: can't assign to function call (<doctest test.test_syntax[48]>, line 6)
"""
More information about the Python-checkins
mailing list