This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients ezio.melotti, serhiy.storchaka
Date 2013-01-09.09:28:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1357723737.45.0.474075490157.issue16903@psf.upfronthosting.co.za>
In-reply-to
Content
On 3.2 subprocess.Popen.communicate with universal_newlines=True accepts bytes and doesn't accept strings. 

$ ./python -c "import subprocess; subprocess.Popen(['cat'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, universal_newlines=True).communicate('qwerty')"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/serhiy/py/cpython3.2/Lib/subprocess.py", line 833, in communicate
    return self._communicate(input)
  File "/home/serhiy/py/cpython3.2/Lib/subprocess.py", line 1470, in _communicate
    stdout, stderr = self._communicate_with_poll(input)
  File "/home/serhiy/py/cpython3.2/Lib/subprocess.py", line 1537, in _communicate_with_poll
    input_offset += os.write(fd, chunk)
TypeError: 'str' does not support the buffer interface

On 3.3+ it accepts strings and doesn't accept bytes.
History
Date User Action Args
2013-01-09 09:28:57serhiy.storchakasetrecipients: + serhiy.storchaka, ezio.melotti
2013-01-09 09:28:57serhiy.storchakasetmessageid: <1357723737.45.0.474075490157.issue16903@psf.upfronthosting.co.za>
2013-01-09 09:28:57serhiy.storchakalinkissue16903 messages
2013-01-09 09:28:57serhiy.storchakacreate