Title: Using subprocess.STDOUT causes AttributeError
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.0
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, nelchael
Priority: normal Keywords:

Created on 2008-11-22 20:28 by nelchael, last changed 2008-11-22 20:47 by amaury.forgeotdarc. This issue is now closed.

File name Uploaded Description Edit nelchael, 2008-11-22 20:28 - test case
Messages (2)
msg76258 - (view) Author: Krzysztof Pawlik (nelchael) Date: 2008-11-22 20:28
Using stderr=subprocess.STDOUT causes Python 3.0 (RC1 from Ubuntu 8.10)
to raise AttributeError, important code snippet (whole test program

proc = subprocess.Popen(['whoami'], stdout=subprocess.PIPE,
stdout, stderr = proc.communicate()

nelchael@nelchael-vbox ~$ python2.5 --version
Python 2.5.2
nelchael@nelchael-vbox ~$ python2.5
('stdout:', 'nelchael\n')
('stderr:', None)
nelchael@nelchael-vbox ~$ python3 --version
Python 3.0rc1+
nelchael@nelchael-vbox ~$ python3
Traceback (most recent call last):
  File "", line 4, in <module>
    stdout, stderr = proc.communicate()
  File "/usr/lib/python3.0/", line 663, in communicate
    stdout = self._fo_read_no_intr(self.stdout)
AttributeError: 'Popen' object has no attribute '_fo_read_no_intr'
nelchael@nelchael-vbox ~$
msg76259 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008-11-22 20:47
This "_fo_read_no_intr" method does not exist anywhere in the standard 
python code.

A quick Google search reveals that it certainly comes from a patch 
proposed by the Ubuntu maintainers:

It is very likely that this patch (for 2.5) did not apply correctly to 
the 3.0 source code.
In any case, this is not a Python problem.
Date User Action Args
2008-11-22 20:47:15amaury.forgeotdarcsetstatus: open -> closed
resolution: not a bug
messages: + msg76259
nosy: + amaury.forgeotdarc
2008-11-22 20:28:03nelchaelcreate