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

Re: flaw in python bindings diff?

From: <cmpilato_at_collab.net>
Date: 2003-01-28 02:01:42 CET

Chris, would you mind taking another run at this patch to incorporate
my and Greg's feedback? Thanks!

Greg Stein gstein@lyra.org writes:

 On Mon, Jan 27, 2003 at 05:12:20PM -0600, cmpilato@collab.net wrote:
  Chris Foote Chris.Foote@v21.me.uk writes:
 ...
   @@ -110,7 +111,10 @@
   
        # open the pipe, forget the end for writing to the child (we won't),
        # and then return the file object for reading from the child.
   - fromchild, tochild = popen2.popen2(cmd)
   + if sys.platform[:3] == 'win':
   + fromchild, tochild = popen2.popen2(string.join(cmd))
   + else:
   + fromchild, tochild = popen2.popen2(cmd)
        tochild.close()
        return fromchild
  
  Wow, I'm shocked that this code wasn't portable to windows. I hate to
  sound like a skeptic ... but I am. Can someone else confirm that this
  change is needed? Or point me to a doc so I can learn another new
  thing today?
 
 Looks like some badness in Python. The windows stuff uses some special
 code to do the pipes, and it looks like the APIs aren't matched up.
 
 So the basic concept of the change is good, but I'd break it out into
 a local function called _compat_popen() or somesuch. That also
 provides a place to document why this is needed. Further, if we end up
 with a lot of compat stuff across the bindings, then we can create a
 _compat.py (imported as svn._compat) which can hold code for Python
 version-compatibility code.
 
 Cheers,
 -g
 
 --
 Greg Stein, http://www.lyra.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 14 02:20:35 2006

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.