Re: [Python-Dev] FW: Bug? Certainly a new *behavior* from subprocess in 2.5 on Win32

2006-07-21 Thread Nick Coghlan
Delaney, Timothy (Tim) wrote:
 Looks like there's a bug in Popen.__del__ in 2.5. I'm not in a position
 to have a look right now.

For those not watching python-checkins, a check for is not None has been 
added before the offending line in Popen.__del__. (by Georg, IIRC)

Cheers,
Nick.

-- 
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---
 http://www.boredomandlaziness.org
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] FW: Bug? Certainly a new *behavior* from subprocess in 2.5 on Win32

2006-07-21 Thread Kevin Jacobs [EMAIL PROTECTED]
On 7/21/06, Nick Coghlan [EMAIL PROTECTED] wrote:
Delaney, Timothy (Tim) wrote: Looks like there's a bug in Popen.__del__ in 2.5. I'm not in a position to have a look right now.For those not watching python-checkins, a check for is not None has been
added before the offending line in Popen.__del__. (by Georg, IIRC)Many thanks for accepting my patch. There remains a potentially related problem in popen2.py, but it may be a lower priority, since most folks should be using subprocess.
 def __del__(self): # In case the child hasn't been waited on, check if it's done. self.poll(_deadstate=sys.maxint) if self.sts  0: if _active: # Child is still running, keep us alive until we can wait on it.
 _active.append(self)The is _active check, unless it intendeds to check for either empty or None, should probably be revised to: def __del__(self): # In case the child hasn't been waited on, check if it's done.
 self.poll(_deadstate=sys.maxint) if self.sts  0: if _active is None: # Child is still running, keep us alive until we can wait on it. _active.append(self)
However, there may be a clever reason for doing what is doing that I do not see.Thanks again,-Kevin
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] FW: Bug? Certainly a new *behavior* from subprocess in 2.5 on Win32

2006-07-21 Thread Georg Brandl
Kevin Jacobs [EMAIL PROTECTED] wrote:
 On 7/21/06, *Nick Coghlan* [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:
 
 Delaney, Timothy (Tim) wrote:
   Looks like there's a bug in Popen.__del__ in 2.5. I'm not in a
 position
   to have a look right now.
 
 For those not watching python-checkins, a check for is not None
 has been
 added before the offending line in Popen.__del__. (by Georg, IIRC)
 
 
 Many thanks for accepting my patch.  There remains a potentially related 
 problem in popen2.py, but it may be a lower priority, since most folks 
 should be using subprocess.
 
 def __del__(self):
 # In case the child hasn't been waited on, check if it's done.
 self.poll(_deadstate=sys.maxint)
 if self.sts  0:
 if _active:
 # Child is still running, keep us alive until we can 
 wait on it.
 _active.append(self)
 
 
 The is _active check, unless it intendeds to check for either empty or 
 None, should probably be revised to:
 
 def __del__(self):
 # In case the child hasn't been waited on, check if it's done.
 self.poll(_deadstate=sys.maxint)
 if self.sts  0:
 if _active is None:
 # Child is still running, keep us alive until we can 
 wait on it.
 _active.append(self)
 
 However, there may be a clever reason for doing what is doing that I do 
 not see.

There's no reason (I know since I added the check myself ;). Thanks
for pointing out that obvious bug. (fixed in rev 50759).

Georg

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] FW: Bug? Certainly a new *behavior* from subprocess in 2.5 on Win32

2006-07-21 Thread John Benediktsson

 The is _active check, unless it intendeds to check for either empty or

 None, should probably be revised to:
 
 def __del__(self):
 # In case the child hasn't been waited on, check if it's done.
 self.poll(_deadstate=sys.maxint)
 if self.sts  0:
 if _active is None:
 # Child is still running, keep us alive until we can 
 wait on it.
 _active.append(self)
 

It probably is obvious, but I think you mean:

if _active is not None:
...

Thanks,
John.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] FW: Bug? Certainly a new *behavior* from subprocess in 2.5 on Win32

2006-07-21 Thread Kevin Jacobs [EMAIL PROTECTED]
That'll teach me to fire off emails while running out the door. Thanks.-KevinOn 7/21/06, John Benediktsson 
[EMAIL PROTECTED] wrote: The is _active check, unless it intendeds to check for either empty or
 None, should probably be revised to: def __del__(self): # In case the child hasn't been waited on, check if it's done. self.poll(_deadstate=sys.maxint) if 
self.sts  0: if _active is None: # Child is still running, keep us alive until we can wait on it. _active.append(self)It probably is obvious, but I think you mean:
if _active is not None:...Thanks,John.___Python-Dev mailing listPython-Dev@python.org
http://mail.python.org/mailman/listinfo/python-devUnsubscribe: http://mail.python.org/mailman/options/python-dev/jacobs%40bioinformed.com

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] FW: Bug? Certainly a new *behavior* from subprocess in 2.5 on Win32

2006-07-20 Thread Delaney, Timothy (Tim)
Larry Hastings wrote:

 I run the following script:
 --
 from subprocess import *
 Popen(ls -l)
 --
 (yeah, I have ls.exe on Windows)
 
 Under Python 2.4.2, this simply dumped the results of ls.exe to the
 terminal--sorry, to the command shell.
 
 Under Python 2.5, both beta 1 and beta 2, it dumps the results to the
 command shell, but *also* prints this:
 
 Exception exceptions.AttributeError: 'NoneType' object has no
 attribute 'append' in bound method Popen.__del__ of
 subprocess.Popen object at 0x00C04EB0 ignored
 
 Calling Popen() with a stdout = subprocess.PIPE does not throw this
 exception.

I've asked Larry to raise this on SourceForge, but with the SF email
problems I thought I'd better forward it here.

Looks like there's a bug in Popen.__del__ in 2.5. I'm not in a position
to have a look right now.

Tim Delaney
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] FW: Bug? Certainly a new *behavior* from subprocess in 2.5 on Win32

2006-07-20 Thread Kevin Jacobs [EMAIL PROTECTED]
Reported to the list about a week ago, with analysis. Didn't get a response. Won't use sourceforge. Sorry about the top post.-KevinOn 7/20/06, Delaney, Timothy (Tim)
 [EMAIL PROTECTED] wrote:Larry Hastings wrote:
 I run the following script: -- from subprocess import * Popen(ls -l) -- (yeah, I have ls.exe on Windows) Under Python 2.4.2, this simply dumped the results of 
ls.exe to the terminal--sorry, to the command shell. Under Python 2.5, both beta 1 and beta 2, it dumps the results to the command shell, but *also* prints this: Exception 
exceptions.AttributeError: 'NoneType' object has no attribute 'append' in bound method Popen.__del__ of subprocess.Popen object at 0x00C04EB0 ignored Calling Popen() with a stdout = 
subprocess.PIPE does not throw this exception.I've asked Larry to raise this on SourceForge, but with the SF emailproblems I thought I'd better forward it here.Looks like there's a bug in Popen.__del__ in 
2.5. I'm not in a positionto have a look right now.Tim Delaney___Python-Dev mailing listPython-Dev@python.org
http://mail.python.org/mailman/listinfo/python-devUnsubscribe: http://mail.python.org/mailman/options/python-dev/jacobs%40bioinformed.com

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com