[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1299956 - /subversion/trunk/subversion/tests/cmdline/svntest/wc.py

From: Hyrum K Wright <hyrum.wright_at_wandisco.com>
Date: Tue, 13 Mar 2012 08:43:33 -0500

On Tue, Mar 13, 2012 at 1:00 AM, Greg Stein <gstein_at_gmail.com> wrote:
> On Mon, Mar 12, 2012 at 22:21,  <hwright_at_apache.org> wrote:
>>...
>> +++ subversion/trunk/subversion/tests/cmdline/svntest/wc.py Tue Mar 13 02:21:36 2012
>> @@ -29,6 +29,7 @@ import re
>>  import urllib
>>  import logging
>>  import pprint
>> +import cStringIO as StringIO
>>...
>> +  o = StringIO()
>
> I don't see how a func-call to a module can possibly work, so I'm
> assuming this code was not actually tested (last minute change?). That
> may also lead to my query about pprint-to-stream vs pformat.

last-minute (and late-night) change. Fixed in r1300121.

> And, FWIW, the cStringIO module is standard in Python 2.5, so there
> isn't really a need to import "as StringIO" (as you'd see in various
> compat-style import logic).

As mentioned elsethread, cStringIO is a drop-in replacement for
StringIO, so my habit is to import the former as the latter. Another
alternative (which we use in some places) is to just import the
StringIO class from either module.

-Hyrum

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com/
Received on 2012-03-13 14:44:07 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.